PDA

View Full Version : UNION SELECT trims results


reubenb
10-11-2005, 03:24 PM
hi
when using a SQL statement, a UNION SELECT with two tables, the database is cutting short my results
why is this?
when i select only one table it is fine but when i do two tables it cuts it as if i had a Left() on the results.

can you tell me please how to fix this?
thanks

TheShaner
10-11-2005, 06:31 PM
I've never encountered this, but one thing you may want to think about:

Are your field lengths that are being matched up between the two tables the same? Like if each table has a name field. If one table has the name field with a max of 30 characters and the other with a max of 40, then when you UNION it will take the max of the first table, which is 30, so values in the 2nd table will be trimmed to fit that length.

I actually don't know if this really happens, but I think it does. This is the only thing I can think of right now.

-Shane

reubenb
10-12-2005, 04:50 AM
Hmm, I checked it and they are all Memos...

any other ideas? It's really weird?