|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need to use UNION ALL in CRystak 8.5 between 2 tables. I need to select 3 columns in total from both the tables. one of them is same in both the tables, other 2 are different and will have to come one from each table. I could use UNION ALL for common fields, but when I select the extra fields,it gives me error. I could run the run on SQL server without any problem. Table A :- Co_No Xy_Nm ------------- ------------------------- 204 DAVID 204 W 204 KELLY (3 row(s) affected) Table B:- Co_No Yz_Nm ---------- ------- 204 BARRY (1 row(s) affected) SQL Query:-- SELECT A."Co_No", "-" Yz_Nm, A."Xy_Nm" FROM A UNION ALL SELECT B."Co_No", B."Yz_Nm", "-" Xy_Nm FROM B OUTPUT WHEN RUN ON SQL SERVER:- Co_No Xy_Nm Yz_Nm ------ ------ --------- 204 DAVID - 204 W - 204 KELLY - 204 - BARRY But This query does not run on Crystal "Show SQL Query". Its not allowing me to select additional rows. Whats the alternate way?? Can somebody suggest me. Appreciate your help in this. Thanks. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > UNION ALL in Crystal Reports 8.5 - Pls Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|