AS/400 SQL syntax for F4801 & F4211 join

pfd

Reputable Poster
I am having trouble with the SQL syntax to join F4211 to F4801. I am trying to join the RORN in F4211 to DOCO in F4801. I am trying to strip the ZEROES in RORN and then convert it to a numeric field and then join it to F4801.

I tried the syntax below but it is failing.
STRIP( F4211.SDRORN, LEADING, '0' ) = CONVERT( F4801.WADOCO, SQL_CHAR )


Would someone please help me with the syntax?

Thanks,
Matt
AS/400 V5R3, One World Xe B7333,SP23, Update 7
 
Try this:



Select * from F4211

inner join f4801 on SDRORN = DIGITS(WADOCO)



It should work.



_____

From: [email protected] [mailto:[email protected]] On
Behalf Of pfd
Sent: Monday, January 29, 2007 9:03 AM
To: [email protected]
Subject: AS/400 SQL syntax for F4801 & F4211 join



I am having trouble with the SQL syntax to join F4211 to F4801. I am trying
to join the RORN in F4211 to DOCO in F4801. I am trying to strip the ZEROES
in RORN and then convert it to a numeric field and then join it to F4801.

I tried the syntax below but it is failing.
STRIP( F4211.SDRORN, LEADING, '0' ) = CONVERT( F4801.WADOCO, SQL_CHAR )


Would someone please help me with the syntax?

Thanks,
Matt
AS/400 V5R3, One World Xe B7333,SP23, Update 7

_____


The entire <http://www.jdelist.com/ubb/showflat.php?Cat=&Board=> JDELIST
thread is available for viewing.


Looking for a job? Check out the Job
forum


This is the JDELIST World Mailing List.

To unsubscribe from this list via email, Click
<mailto: [email protected]?Subject=Unsubscribe&Body=Sirs,

P
lease remove this address from the JDELIST World Mailing%

.
 
Re: RE: AS/400 SQL syntax for F4801 & F4211 join

Thanks Mike!

I will try that and let you know how it goes.


Thanks,
Matt
AS/400 V5R3, One World Xe B7333,SP23, Update 7
 
Back
Top