Board index » delphi » The clause UNION

The clause UNION

Hi people!

Why this is query execute in SQLServer isn't IB?

Select CODE_PACKING,NULL,NULL from PACKING
union
Select CODE_PACKING,CODE_LOCATION,BALANCE from BALANCE_PRODUCT;

CODE_PACKING is CHAR(10)
COD_LOCATION is CHAR(10)
BALANCE is DOUBLE PRECISION

What is up?

PEACE!!

blz!

Bit

 

Re:The clause UNION


Hi

IB doesn't know what the datatypes of the null-values are.
Cast them to the correct datatypes:
cast(null as char(10)) etc.

Harry

"Bit" <sandro_marq...@ig.com.br> schreef in bericht news:3bbc56f9_2@dnews...

Quote
> Hi people!

> Why this is query execute in SQLServer isn't IB?

> Select CODE_PACKING,NULL,NULL from PACKING
> union
> Select CODE_PACKING,CODE_LOCATION,BALANCE from BALANCE_PRODUCT;

> CODE_PACKING is CHAR(10)
> COD_LOCATION is CHAR(10)
> BALANCE is DOUBLE PRECISION

> What is up?

> PEACE!!

> blz!

> Bit

Other Threads