Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using 2 fields in SQL Sub-Query Problem
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
MS SQL Server
Miscellaneous
Thread ID:
01044768
Message ID:
01044772
Views:
12
This message has been marked as the solution to the initial question of the thread.
>What is the correct to concatenate 2 character fields in a sub-query for SQL Server? I have tried the plus sign, a comma and the double-pipes (Oracle equivalent). TIA!
>SELECT * FROM SQLTable WHERE
>   CField1, cField2 IN
>   (select CField1, cField2 from SQLTable2
>    WHERE...)
SELECT st1.* FROM SQLTable st1
  JOIN SQLTable2 st2 
    ON st1.CField1 = st2.CField1
      AND st1.CField2 = st2.CField2
      AND  <WHERE clause for st2 here>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform