You should be able to just use "PID" in the where clause.

David Jordan

-----Original Message-----
[] On Behalf Of George Gallen
Sent: Thursday, 29 December 2011 2:51 AM
To: U2 Users
Subject: [U2] MS-SQL Question

I'm querying a sequel server , I have a column in one table that the data is in 
the form of "X|Y|Z".

I have the following in my SELECT:

substring(colname ,charindex('|',colname)+1, charindex('|',colname, 
charindex('|',colname)+1) - charindex('|',colname) -1) as "PID"

Is there anyway that I can then use the "PID" designation  in a where clause, 
without having to retype the string again?

I can't add a virtual column to the table , and I can't add a procedure either.

U2-Users mailing list
U2-Users mailing list

Reply via email to