I am trying run an SQL in code to access a SQL server.
Anyone know how you UNION 2 SQLs in one call?
thnks
Printable View
I am trying run an SQL in code to access a SQL server.
Anyone know how you UNION 2 SQLs in one call?
thnks
Just separate them with the UNION keyword. The datatypes and number of fields returned must match in both (or how ever many) queries. Save any Order By clauses for the end and refer to the fields by number (i.e. 'Order By 2' ).