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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


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