JustWondering
Technical User
Hello friends,
Please help me to make this complicate query:
I have 3 tables and want the records return from the first table with these conditions:
1. table1.id = table2.id = table3.id
2. table1.code = 4
3. table1.income > $10,000
4. table3.xcode =2 or=3
Here is what come up with:
Select * from table1, table2, table3
where table1.id = table2.id
and table2.id = table3.id
and table1.code = 4
and convert(float,table.income)>10000
and (table3.xcode=2 or table3.xcode=3)
Do you think this will do the work? When I ran it, the return records doesn't seem right to me. I'm not sure. Please give me some advise. Thanks.
Please help me to make this complicate query:
I have 3 tables and want the records return from the first table with these conditions:
1. table1.id = table2.id = table3.id
2. table1.code = 4
3. table1.income > $10,000
4. table3.xcode =2 or=3
Here is what come up with:
Select * from table1, table2, table3
where table1.id = table2.id
and table2.id = table3.id
and table1.code = 4
and convert(float,table.income)>10000
and (table3.xcode=2 or table3.xcode=3)
Do you think this will do the work? When I ran it, the return records doesn't seem right to me. I'm not sure. Please give me some advise. Thanks.