General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Can Cast() be used in a Where clause as in the following example? The deptid field is defined as char(6). When I execute the following nothing is returned but if I remove the where clause records are returned? What am I missing? Is there a better way to do this?
lnRetVal = SQLEXEC(lnConnHandle, "SELECT prempl, jobid, taxterr, empllast, deptid FROM dbo.prempl Prempl WHERE CAST(deptid) AS decimal(6,0)) < 103 or CAST(deptid) AS decimal(6,0)) > 103 ","lReport")
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only