[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] SQL Question



I am not a DB2 programmer, but I would try something along the lines of 
.....

SELECT
CHARINDEX(' ',name),
     SUBSTRING(name,1,CHARINDEX(' ',name)-1)

Tajinder Chahal wrote:

>Hi All,
> 
>I know this is not a SQL discussion forum but I think SQL is the base language 
>used for all the databases. That is why I'm posting my question here.
>
>Which function in DB2 can I use to get the column value before it hits the 
>blank space.
>
>E.g.
>1. 'How are you' - I only want to display 'How'.
>2. 'This is a test' - I only want to display 'This'.
>
>Any help would be greatly appreciated.
>
>Thanks,
> 
>Tajinder
>
>
>
>_______________________________________________
>sqr-users mailing list
>sqr-users@sqrug.org
>http://www.sqrug.org/mailman/listinfo/sqr-users
>  
>

-- 
F. Christopher Costa, Software Developer
College of the Holy Cross
Information Technology Services
Smith Hall - Room 101
One College Street
Worcester, MA  01610-2395
 
508.793.3865

Here was a non admissible message part of 'text/x-vcard' MIME type. It
has been automatically discarded before sending the message to the
list. 
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users