Archives of the TeradataForum
Message Posted: Wed, 06 Nov 2013 @ 20:32:43 GMT
I think I might just have been caught out by the V14 version of OREPLACE ....
I'm trying to build up some dynamic SQL and in the string I've got a placemarker called '$$VALUEPAIRSTRING'
I receive a long string of Account Numbers in through a Stored Procedure and replace '$$VALUEPAIRSTRING' using OREPLACE :
SET sG_SqlStatement = OREPLACE(sG_SqlStatement,'$$VALUEPAIRSTRING',sP_ValuePairTx);
Thing is, what I end up with is the value of $$VALUEPAIRSTRING being replaced by only up to 512 bytes of sP_ValuePairTx ! I'm losing Accounts off the end when sP_ValuePairTx is a very long list.
You can try it in SqlAssistant with this :
SEL OREPLACE('my sql containing $$VALUEPAIRSTRING and other sql; ','$$VALUEPAIRSTRING','GB,01000001;GB,01000002 ... etc, etc, up to a long list (i.e. > 512 bytes).
What's returned is 'my sql containing
Any idea what I can do about this ?
P.S. I'm getting desperate !
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|