View a value in a specific position in one big column



IBM's flagship relational database management system

View a value in a specific position in one big column

Postby kihaho » Tue Dec 09, 2008 10:40 pm

Hi,
Could anyone please tell me how to write a select statement to retrieve a value in the specific field, which has a string of indicators?

It’s located in the position 472 in one big field which is 700 byte long - SERS-PR-TRANS-RESTRICT.

I tried this and did not work.

SELECT SERS-PR-TRANS-RESTRICT(472) FROM D332SHC.SERS
WHERE OFFICE = ‘111’
AND ID_CODE = ‘0335’


Thank you!!!
kihaho
 
Posts: 19
Joined: Tue May 06, 2008 11:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: View a value in a specific position in one big column

 

Re: View a value in a specific position in one big column

Postby dick scherrer » Wed Dec 10, 2008 2:45 am

Hello,

For someone here to help, you need to post a more complete description of what you want to do. Keep in mind that we know only what you post about your table definition, your data, or your requirement.

I suspect that you want to retrieve a substring. . . .

Are you using spufi or are you working in some program?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: View a value in a specific position in one big column

Postby dick scherrer » Wed Dec 10, 2008 2:47 am

Hello,

You might want to look here:
http://publibz.boulder.ibm.com/cgi-bin/ ... j10/3.2.94?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: View a value in a specific position in one big column

Postby kihaho » Wed Dec 10, 2008 5:55 pm

Yes, it did. I used the substring as you suggested and it worked great. Thank you!!!!
kihaho
 
Posts: 19
Joined: Tue May 06, 2008 11:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: View a value in a specific position in one big column

Postby dick scherrer » Thu Dec 11, 2008 2:54 am

You're welcome - good to hear it is working :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post