× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Any SQL gurus out there? The statement below generates the following 
message when the user tries to compile it as a stored procedure. I'm at a 
loss

MSG ID  SEV  RECORD  TEXT  
SQL0029  30      65  Position 10 INTO clause missing from embedded 
statement.

TIA

Paul Nelson
Arbor Solutions, Inc.
708-670-6978  Cell
pnelson@xxxxxxxxxx

----- Forwarded by Paul Nelson/arbsol.com/US on 03/22/2005 09:45 AM -----


"SQLServer Admin" <SAdmin@xxxxxxxxxxxx>
03/22/2005 09:40 AM
 
        To:     <pnelson@xxxxxxxxxx>
        cc: 
        Subject:        SQL Statement


Paul, 
Here it is 
SELECT DISTINCT HC.HCJOB2, Right(HC.HCUSYC,3)  TRADE, HC.HCITEM, 
A2.A2DESC,HC.HCUVND 
, C5.C5VRNM, HC.HCUDSC, L1.L1LDSC 
, SUM(CASE WHEN HC.HCUCCD IN (6,10) THEN 1 ELSE 
(CASE WHEN HU.HUUORQ IS NULL THEN HC.HCQNTY ELSE HC.HCQNTY * HU.HUUORQ 
END) END) AS [SumofTotalQty] 
, HC.HCUNPR, SUM(HC.HCUAMT) AS Amt, AZ.AZPRJM, HC.HCPLAN, HC.HCELEV, 
AZ.AZTAXR, L1.L1NTAX, SUM(HC.HCUAMT * AZ.AZTAXR * 0.01) AS Tax
, L1.L1DESC, HC.HCUCCD, SUM((CASE WHEN HU.HUUORQ IS NULL THEN HC.HCQNTY 
ELSE HC.HCQNTY * HU.HUUORQ END) * HC.HCUNPR) AS SumTotAmt
FROM CK1FLS.HCUSOL HC 
INNER JOIN CK1FLS.A2JBMS A2 ON HC.HCJOB2 = A2.A2JOBN 
INNER JOIN CK1FLS.AZPROJ AZ ON A2.A2PROJ = AZ.AZPRJM 
LEFT JOIN .CK1FLS.HUUSIM HU ON 
HC.HCUEXT = HU.HUUEXT 
AND HC.HCSALN = HU.HUUSEQ 
AND HC.HCUUNT = HU.HUUUNT 
AND HC.HCUPRM = HU.HUUPRM 
LEFT JOIN CK1FLS.L1ITEM L1 ON HC.HCITEM = L1.L1ITNO 
A2.A2PROJ = EC.Project 
 and HC.HCUUNT = EC.UNIT 
 and HC.HCSALN = EC.SALN 
 and HC.HCSWO = EC.SWO 
 and HC.HCUEXT = EC.[OPTION] 
 and HC.HCBCO = EC.BCO 
 and HC.HCUSYC = EC.COSTCODE 
 and HC.HCUCCD = EC.COSTTYPE 
 and HC.HCLINE = EC.LINE 
WHERE HC.HCJOB2 = JobNumber  AND HC.HCITEM <> '' 
GROUP BY HC.HCJOB2, RIGHT(HC.HCUSYC,3), HC.HCITEM, A2.A2DESC, 
, HC.HCUVND, C5.C5VRNM, HC.HCUDSC, L1.L1LDSC, HC.HCUNPR, AZ.AZPRJM 
, HC.HCPLAN, HC.HCELEV, AZ.AZTAXR, L1.L1NTAX, L1.L1DESC, HC.HCUCCD, 
EC.ZTDESC 
ORDER BY HC.HCJOB2, TRADE, HC.HCITEM 





IMPORTANT NOTICE
 
This message is confidential, intended only for the named recipient/s, and 
may contain information that is exempt from disclosure under applicable 
law or privilege.  If you are not the intended recipient/s, you are hereby 
on notice that the distribution or copying of this message is strictly 
prohibited.  If you receive this message in error, or are not the named 
recipient/s, please notify C.P. Morgan Communities, L.P. at the E-mail 
address above, delete this E-mail from your computer, and destroy any 
copies in any form.  Receipt by anyone other than the intended named 
recipient/s is not a waiver of any attorney-client, work-product, or other 
applicable privilege.
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.