Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

created the code below to pass back to a report

Status
Not open for further replies.

Terris

IS-IT--Management
Jul 26, 2002
27
US
How do I get the cursor available in the data environment so that I can join fpartno and fpartrev to another cursor that already exists in the data environment?

lnHandle = CURSORGETPROP("ConnectHandle","inonhd")

lcsql='SELECT inonhd.fpartno, inonhd.fpartrev, sum(inonhd.fonhand) AS fonhand ' + ;
'FROM inonhd JOIN inloca ON inonhd.flocation = inloca.flocation ' + ;
"WHERE INLOCA.FCMRPEXCL = 'N' " + ;
'GROUP BY inloca.fcmrpexcl, inonhd.fpartno, inonhd.fpartrev '

lnReturn = SQLEXEC(lnHandle, lcSQL, 'tnetonhd')
SELECT tnetonhd
=AFIELDS(laitem,'tnetonhd')
SELECT 0
CREATE CURSOR netonhd FROM ARRAY laitem
SELECT * FROM tnetonhd INTO CURSOR netonhd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top