SQL - spaces in COLs [message #391398] |
Thu, 12 March 2009 02:05 |
Maverick27
Messages: 84 Registered: October 2008
|
Member |
|
|
Can somebody pls. remind the syntax for removing spaces in column when joining SQLs.
I suspect that it definitely the issue of space for the discrepancy in the SQL statements as per attachment.
So when i am joining 2 matching columns from tables i want to get the correct result.
Mave
-
Attachment: sql.jpg
(Size: 29.70KB, Downloaded 428 times)
[Updated on: Thu, 12 March 2009 02:09] Report message to a moderator
|
|
|
|
Re: SQL - spaces in COLs [message #391417 is a reply to message #391400] |
Thu, 12 March 2009 04:02 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
If this is a persistent problem, then I'd consider either
1) fixing the code that keeps adding/allowing spaces into these fields
2) adding insert & update triggers to the table to trim the spaces off the fields when they are inserted/updated, and doing a global update on the columns to remove any spaces.
|
|
|