Subject | Re: [firebird-support] Union of select statements. |
---|---|
Author | Thomas Miller |
Post date | 2003-09-12T15:37:15Z |
you need to cast both columns
select CAST(' - ' AS VARCHAR(30)) FROM TABLE 1
UNION {ALL}
select CAST(COLUMN2 AS VARCHAR(30)) FROM TABLE 1
Check the CAST syntax. I can't remember if it is AS or ","
Mahesh Ishwar wrote:
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus
select CAST(' - ' AS VARCHAR(30)) FROM TABLE 1
UNION {ALL}
select CAST(COLUMN2 AS VARCHAR(30)) FROM TABLE 1
Check the CAST syntax. I can't remember if it is AS or ","
Mahesh Ishwar wrote:
>Hello All,--
>I've 2 select statements which are individually working fine.
>select ' - ' column1 from table1;
>select column2 from table2;
>
>But when I make a union of these two statements, it gives me a 'Data Type unknown error'.
>
>What I'm doin' wrong?
>Thanx.
>Mahesh.
>
>
>
>---------------------------------
>Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
>
>[Non-text portions of this message have been removed]
>
>
>
>To unsubscribe from this group, send an email to:
>firebird-support-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus