Hi Everyone,
I’m trying to put a online version of our sales order out on our intranet. We usually access the information through Crystal, so I thought to take the sql from there make some adjustments and thank you Ma’am. Anyway out the gate sc says no go.
Here’s the query;
SELECT “SO_Master”.“ORDDTE_27”, “SO_Master”.“ORDNUM_27”, “SO_Master”.“COMNT1_27”, “SO_Master”.“COMNT2_27”, “SO_Master”.“CUSTID_27”, “SO_Master”.“COMNT3_27”, “SO_Master”.“ORDID_27”
, “Sales_Rep_Master”.“SLSNME_26”, “SO_Master”.“FOB_27”, “Customer_Master”.“DSCRTE_23”, “SO_Master”.“COMMIS_27”, “SO_Master”.“CUSTPO_27”, “SO_Master”.“TERMS_27”, “SO_Master”.“NAME_27”
, “SO_Master”.“ADDR1_27”, “SO_Master”.“ADDR2_27”, “SO_Master”.“CITY_27”, “SO_Master”.“STATE_27”, “SO_Master”.“ZIPCD_27”, “SO_Master”.“CNTRY_27”, “Customer_Master”.“NAME_23”
, “Customer_Master”.“ADDR1_23”, “Customer_Master”.“ADDR2_23”, “Customer_Master”.“CITY_23”, “Customer_Master”.“STATE_23”, “Customer_Master”.“ZIPCD_23”, “Customer_Master”.“CNTRY_23”
, “Customer_Master”.“ADDR3_23”, “Customer_Master”.“ADDR4_23”, “SO_Master”.“ADDR3_27”, “SO_Master”.“ADDR4_27”, “SO_Master”.“ADDR5_27”, “Customer_Master”.“ADDR5_23”, “SO_Master”.“STYPE_27”
, “SO_Master”.“REP1_27”, “SO_Detail”.“LINNUM_28”, “SO_Detail”.“DELNUM_28”, “Part_Sales”.“PMDES1_29”, “SO_Detail”.“PRICE_28”, “SO_Detail”.“CURQTY_28”, “SO_Detail”.“PRTNUM_28”
, “SO_Detail”.“SLSUOM_28”, “SO_Detail”.“CURDUE_28”, “SO_Master”.“SHPVIA_27”, “SO_Detail”.“ORDNUM_28”
FROM (((“GNCMAX5”.“dbo”.“SO_Master” “SO_Master” LEFT OUTER JOIN “GNCMAX5”.“dbo”.“Customer_Master” “Customer_Master” ON “SO_Master”.“CUSTID_27”=“Customer_Master”.“CUS TID_ 23”) LEFT OUTER JOIN “GNCMAX5”.“dbo”.“Sales_Rep_Master” “Sales_Rep_Master” ON “SO_Master”.“REP1_27”=“Sales_Rep_Master”.“SLSR EP_2 6”) LEFT OUTER JOIN “GNCMAX5”.“dbo”.“SO_Detail” “SO_Detail” ON “SO_Master”.“ORDNUM_27”=“SO_Detail”."ORDNUM_28 ") LEFT OUTER JOIN “GNCMAX5”.“dbo”.“Part_Sales” “Part_Sales” ON “SO_Detail”.“PRTNUM_28”=“Part_Sales”.“PRTNUM_2 9”
WHERE “SO_Master”.“ORDNUM_27”=‘20084224’
ORDER BY “SO_Master”.“ORDNUM_27”, “SO_Detail”.“LINNUM_28”, “SO_Detail”.“DELNUM_28”
This is the error I get:
[SIZE=12px]Incorrect syntax near ‘GNCMAX5’.
At first I thought sc didn’t like the DB name on everything or the duplication of the table names so I got rid if them. Error just kept moving farther down the line.[/SIZE]
Thanks for looking…comments welcomed…Help is very appreciated