Click to See Complete Forum and Search --> : ADODC


cyseng10
April 19th, 2001, 11:04 PM
i currently using ADODC as calling my database. i facing a problem when i need to call 2 table data and displayed at same data grid table. the 2 tables datas and fields are same. currently, i write my sql at SQL COMMAND text box as provide at the ADODC properties. please assits me for the problem. here is my current sql command SELECT "DATA" FROM TABLE_NAME. HOW TO ADD ANOTHER TABLE.

Regards,
Wilson Chai

Cakkie
April 20th, 2001, 02:02 AM
If I get it right you just want all the records of table1 and table2, then you can use the SQL UNION statement:

SELECT * FROM table1
UNION
SELECT * FROM table2

If table1 looks like this
"test1"
"test2"

and table2 looks like this
"test4"
"test5"

the result looks like this:
"test1"
"test2"
"test4"
"test5"


Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook