This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @Author Parixit | |
| * @Date 30 MAY 2016 | |
| * @use companyServiceTest | |
| **/ | |
| /* | |
| coldbox.system.testing.BaseModelTest need to extends for unit testing for below example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset x = 21945.16 /> | |
| <cfset y = 17256.13 /> | |
| <cfset z = x - y /> | |
| <cfoutput>#z#</cfoutput> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset x = 21945.16 /> | |
| <cfset y = 17256.13 /> | |
| <cfset z = PrecisionEvaluate(x - y) /> | |
| <cfoutput>#z#</cfoutput> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from document | |
| where documentid = <cfqueryparam value="#arguments.documentid#" cfsqltype="cf_sql_numeric"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from document | |
| where documentid = <cfqueryparam value="#arguments.documentid#" cfsqltype="cf_sql_integer"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--- This will be you dbQuery for your export ---> | |
| <cfset qList = queryNew("c1,c2,c3") /> | |
| <cfloop from="1" to="10" index="i"> | |
| <cfset queryAddRow(qList, 1) /> | |
| <cfset querySetCell(qList, "C1", i) /> | |
| <cfset querySetCell(qList, "C2", "10/" & i & "/1985") /> | |
| <cfset querySetCell(qList, "C3", "Vikas" & i) /> | |
| </cfloop> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.trimLeft = function(){ return this.replace(/^\s+/,'') } | |
| String.prototype.trimRight = function(){ return this.replace(/\s+$/,'') } | |
| String.prototype.trim = function(){ return this.trimLeft().trimRight() } | |
| function readSheet(){ | |
| var dataFileId = ""; //TODO: add your data.txt file id | |
| var ssFileId = ""; //TODO: add your spreadsheet file id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from document | |
| where documentid = <cfqueryparam value="#arguments.documentid#" cfsqltype="cf_sql_numeric"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from document | |
| where documentid = <cfqueryparam value="#arguments.documentid#" cfsqltype="cf_sql_integer"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * | |
| from ( | |
| select NULL as FieldStatus | |
| union all | |
| select 1 as FieldStatus | |
| union all | |
| select 20 as FieldStatus | |
| union all | |
| select NULL as FieldStatus |