dbTalk Databases Forums  

Space

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Space in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
anonymous
 
Posts: n/a

Default Space - 01-26-2005 , 10:12 AM






I have a fields with the space char in data.
How to find a space character in query?
'Smith David'


Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Space - 01-26-2005 , 11:56 AM






You can look for a space with Char(32).
One way is to return the position of the space with
CHARINDEX...e.g. in pubs database you could do something
like:
SELECT pub_name, CHARINDEX(Char(32), pub_name)
FROM publishers

-Sue

On Wed, 26 Jan 2005 08:12:29 -0800, "anonymous"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
I have a fields with the space char in data.
How to find a space character in query?
'Smith David'


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.