Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to add a space after each field value in SQL query job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 72
Location: india

PostPosted: Thu Mar 01, 2012 11:45 am    Post subject: How to add a space after each field value in SQL query job
Reply with quote

Hi,

I have to fetch 3 column fields in a SQL and I want to put a space after each value. For ex:

SELECT A.EMPT, B.REC, B.DATE
FROM EMP A, STDC B

If I wish to run the above query in a IKJEFT job (not in SPUFI) and send the data to a file, the records are coming without any space after each value.. Like
INS120203866ACFBSMNS2012-01-21-13.21.35.042100

So I want to put a space in between. Like:
INS120203866 ACFBSMNS 2012-01-21-13.21.35.042100

Thanks
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Mar 01, 2012 11:54 am    Post subject:
Reply with quote

GHU!

how about:

SELECT A.EMPT,' ', B.REC, ' '.B.DATE
FROM EMP A, STDC B
Back to top
View user's profile Send private message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 72
Location: india

PostPosted: Thu Mar 01, 2012 12:02 pm    Post subject: Reply to: How to add a space after each field value in SQL q
Reply with quote

got it ! Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us