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
 

 

Problem in Left Outer Join

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

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Wed Dec 17, 2008 4:42 pm    Post subject: Problem in Left Outer Join
Reply with quote

Hi,

i am using a left outer join in a DB2 Query.
This query is unloading some data from a db2 table
i am passing this query as SYSIN DD * from a jcl.
but in the output file one extra space is coming in one of the columns.
not sure why.
Please advise.
Back to top
View user's profile Send private message

Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Wed Dec 17, 2008 5:03 pm    Post subject:
Reply with quote

Post the query, Post the result. It would be helpful to come up with answers.
Back to top
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Wed Dec 17, 2008 5:23 pm    Post subject:
Reply with quote

SELECT SUBSTR('AA',1,2),S.ID,
I.P_ID
FROM TAB1 S
LEFT OUTER JOIN TAB2 I
ON S.P_ID = I.T_ID

AA12345ABCD1234<SPACE>

This extra space i am getting at the end...
:-(
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Wed Dec 17, 2008 5:44 pm    Post subject:
Reply with quote

What is the field length of I.P_ID .did you try HEX ON .Was it Spaces when you tried HEX ON?
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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts How can we have the varying lenth of ... Gunapala CN DFSORT/ICETOOL 6 Fri Oct 14, 2016 7:31 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


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