Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL question foxpro 3
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00904009
Message ID:
00904226
Views:
19
>Hello All,
>
>I have a sql question about visual foxpro 2. I have two tables, let's call them table1 and table2. Let's say we have a cId in both tables.
>
>I want to select all records for all fields from table1 and select records for a particular field from table2 where the cId of table2 equals(or is within) the cId of table1 into a query/table/cursor. It's kind of an union I think.
>
>I have tried anything, but nothing works for me. How could this be done?
>
>Help would be appreciated.
>
>Zakaria al Azhar
SELECT Table1.*, Table2.SomeField ;
   FROM Table1
      LEFT OUTER JOIN Table2 on Table1.cId = Table2.cID ;
   INTO...
You may want to use the NVL function around the field from Table2 so that null values don't show up as NULL.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform