two tables with simisar data
hi guys,
i have 2 tables a and b with almost similar columns.
i want to create a report with records from both the tables.
can someone guide me?
thanks
March 30th, 2011 1:25am
Hello,
You could use a
UNION statement to select all data from both tables in one statement:
SELECT
colA,
colB, colC
FROM
TableA
UNION
ALL
SELECT
colA,
colB, colC
FROM
TableB;
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich tglich
Blog
Xing
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2011 1:40am
the query is done, i have a problem with the fields on the report, it is saying its referring to more than 1 field
March 30th, 2011 1:52am
Hello,
I don't understand; you have to explain what you do and how do you define the table/field (expression?)?Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich tglich
Blog
Xing
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2011 1:56am
2 tables a and b have the same columns. when i write the query and execute in SSMS/data it is working fine.
when i drag and drop them in a table. it says more than fields with the similar name exist.
city country language
delhi ind hind table a record
ny us english table b record
i want the report to look like this
March 30th, 2011 2:04am