General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
The WHERE clause makes me lose records from table1, if the table2.field3 is not greater than 5. If I start with 25 records in table1, I want to end up with 25 records in table1. Just want the field3 added if it mets the criteria, otherwise i want field3 to be blank.
>Try
>
>SELECT Table1.Cust_No, Table1.Field1, Table1.Field2, Table2.Field3 ;
> FROM Table1 LEFT OUTER JOIN Table2 ;
> ON Table1.Cust_No = Table2.Cust_No ;
> WHERE Table2.Field3 > 5
>Regards,
>Jim
>>Have table1 with cust_no, field1, field2. table2 has cust_no, field3. want to create a table with table1 fields and table2.field3 if field3 > 5. Want to end up with the same number of record from table1.
>>
>>The WHERE field3 > 5 makes me lose records from table1.
>>
>>thanks
>>
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