View previous topic :: View next topic
|
Author |
Message |
madmartinsonxx
New User
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
|
|
|
|
When i run the following under SPUFI i am getting an Sqlcode -104. We have release 9. Is this particular approach only valid in a DB2 program with cursor processor ? Thanks in advance.
Code: |
WITH XXXX1(C1) AS
(VALUES (' ABC')
,(' ABC ')
,('ABC '))
SELECT C1 AS C1
,STRIP(C1) AS C2
,LENGTH(STRIP(C1)) AS L2
,STRIP(C1,LEADING) AS C3
,LENGTH(STRIP(C1,LEADING)) AS L3
,STRIP(C1,LEADING,'A') AS C4
FROM XXXX1; |
|
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
"with xxxx1 as (values ...)" isn't supported on the DB2 z/OS
you'll have to do something like
Code: |
with xxxx1(C1) as (
select ' ABC' from sysibm.sysbummy1 union ALL
select ' ABC ' from sysibm.sysbummy1 union ALL
select 'ABC ' from sysibm.sysbummy1 )
select ... |
|
|
Back to top |
|
|
madmartinsonxx
New User
Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
|
|
|
|
Thank you for response. That's awesome. I looked this morning but could not find a link to exactly what I can do under z/os and what I cannot do. If such a thing exists and you have it handy that would be greatttttt! Have a great weekend and go Patriots. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
|