Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL equivalent to VAL
Message
From
16/05/2006 18:14:14
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
16/05/2006 18:01:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01122472
Message ID:
01122492
Views:
24
You have one too many ")" should be
CAST(deptid AS decimal(6,0))
>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
Reply
Map
View

Click here to load this message in the networking platform