• Welcome to the upgraded JDELIST forum and thank you for your patience.
    Please restrict discussions and issues regarding the new forum software to the Off Topic forum. We will be monitoring that forum for issues.
    If you have trouble logging in, please reset your password using the forgotten password form: https://www.jdelist.com/community/index.php?lost-password/
    If you are unable to successfully reset your password, please contact us: Click here!
    We hope that you enjoy the upgraded forum.
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

SQL to retrieve data from a JDE Library/File/Member

Allora

Member
Hi,

We are creating a report where the JDE user ID/PW is passed as a parameter so that it will retrieve the data from the JDE Library/File/Member where Member is the JDE user ID. My current SQL is:
SELECT POCODJ3."SH", POCODJ3."SHAD1", POCODJ3."SHAD2", POCODETJ."OLLNID", POCODETJ."DRDL02 FROM "S10F60DC"."DATAXFER"."POCODJ3" POCODJ3 LEFT OUTER JOIN "S10F60DC"."DATAXFER"."POCODETJ" POCODETJ ON POCODJ3."PHDOCO" = POCODETJ."OLDOCO"

My current SQL is retrieving data from the first member file it finds and it's not retrieving from my own member file.


In JDE SQL it looks like below how the userID as a parameter is appended to the SQL.
SELECT *.01, oamlnm.02 COLHDG("Vnd Name Override") NAME(nmover)oaadd1.02 COLHDG("Address 1 Override") NAME(add1ov)
FROM dataxfer/podocj(&cuser), f4006

I'd like to know how to do this in SQL Server SQL or if I can make it work through the IBM iSeries Access for Windows.

Thanks for any help.
 
Top