Guest athen_12 Posted August 28, 2010 Share Posted August 28, 2010 hi, i am trying to create an asp search from database tables. just for an instance a thought came in my mind whether it is possible to collect data from different table at one call.there are table1, table2 and table3 which has several columns.what im doing issql="select * from table1 where cust_id like '"& uid &"%' and gender='"& gender &"' or first_name like '"& fname &"%' and gender='"& gender &"' order by id desc;"it searches only from 1 table. this is working well and does a perfect search. now i wish to add another criteria e.g. age which is in the table table2. well i can also put age column in table2 but just for example. so is it possible some how to fit this criteria in my above sql?i will be very thankful to you Link to comment Share on other sites More sharing options...
justsomeguy Posted August 28, 2010 Share Posted August 28, 2010 I'm not sure of the specific structure of your database, but you may want to use either a UNION or JOIN. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.