Subject | Select with UNION problems |
---|---|
Author | tico_naves |
Post date | 2004-09-06T14:49:10Z |
When using SELECT with UNION like the example, I get an error. I've
made some tests and I think the problem is that the string column
CLIENT must match exactly the same SIZE. But It's a VARCHAR in the
dababase, so how I have to do ?
SELECT SO.IDOS as ID, 'Empty' as CLIENT
FROM SO SO
WHERE
SO.IDCLIENT IS NULL
UNION
SELECT SO.IDOS as ID, CL.NAMECLI as CLIENT
FROM SO SO, CLIENT CL
WHERE
SO.IDCLIENT = CL.IDCLIENT
SO.IDCLIENT IS NOT NULL
The error is :
ISC Error code : 335544569
SQL error -104
Invalid command
Data type unknown
Firebird WI-V1.5.0.4306 Firebird 1.5
Regards
made some tests and I think the problem is that the string column
CLIENT must match exactly the same SIZE. But It's a VARCHAR in the
dababase, so how I have to do ?
SELECT SO.IDOS as ID, 'Empty' as CLIENT
FROM SO SO
WHERE
SO.IDCLIENT IS NULL
UNION
SELECT SO.IDOS as ID, CL.NAMECLI as CLIENT
FROM SO SO, CLIENT CL
WHERE
SO.IDCLIENT = CL.IDCLIENT
SO.IDCLIENT IS NOT NULL
The error is :
ISC Error code : 335544569
SQL error -104
Invalid command
Data type unknown
Firebird WI-V1.5.0.4306 Firebird 1.5
Regards