IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem in Left Outer Join


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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: Canada

PostPosted: Wed Dec 17, 2008 5:44 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
Search our Forums:

Back to Top