> From: "Dimoline, Simon" <[EMAIL PROTECTED]>
> Subject: DB2 SQL problem
> Date: Fri, 10 Jan 2003 18:45:51 -0000
Any sql experts in the group. My problem is a query where I need to match
prefixes. For example I want to match PNC.C.PA to PNC.P.US so I want to
compare PNC.C with PNC.C in effect.
My latest effort, which partially works is
codeB = SUBSTR(codeA, 1, LOCATE('.', codeA)) || SUBSTR(codeA,(POSSTR(codeA,
'.')+1), LOCATE('.',codeA)) || 'US'
Where codeA = PNC.C.PA and codeB = PNC.P.US
Simon
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc