Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using column name assigned with AS CLAUSE in WHERE CLAUS
Message
 
 
To
17/05/2002 12:37:01
Bunny Dockery
New Generation Solutions
St. Catherine, Jamaica
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00658291
Message ID:
00658319
Views:
12
>I have two issues relating to SQL Server:
>(1) Can the column name assigned by the AS CLAUSE be used in the WHERE CLAUSE of a SQL Statement ?


No. It can only be used in ORDER BY clause.

>(2) When using "$" in VFP, you can have
> (a) MYFIELDNAME $ MYSTRING or
> (b) MYSTRING $ MYFIELDNAME.
> Can the the LIKE command in SQL Server achieve the same results as above ?


You can but it could be slow on big tables.
... MYFIELDNAME Like ('%' +  MYSTRING + '%') Or
    MYSTRING Like  ( '%' + MYFIELDNAME + '%')
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform