Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Evaluating Spaces Expand / Collapse
Author
Message
Posted Wednesday, February 16, 2011 8:00 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, January 13, 2014 5:42 AM
Points: 226, Visits: 903
That's great. I'd still like to learn how to deal with spaces for my case, as educational now, more than functional. I will probably be happier using what you have already developed for delimiter splitting.

Thanks,
Chris


Learning something new on every visit to SSC. Hoping to pass it on to someone else.
Post #1065010
Posted Wednesday, February 16, 2011 9:18 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 6:46 PM
Points: 36,944, Visits: 31,446
Stamey (2/16/2011)
That's great. I'd still like to learn how to deal with spaces for my case, as educational now, more than functional. I will probably be happier using what you have already developed for delimiter splitting.

Thanks,
Chris


It's easy. In T-SQL, Spaces are no different than any other character except...
1. '' = '{one space}' = '{virtually any number of spaces}' for comparison purposes.
2. Trailing spaces are not recognized by LEN but are recognized by DATALENGTH.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1065082
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse