Archives of the TeradataForum
Message Posted: Wed, 21 Feb 2007 @ 15:17:30 GMT
I have a question for the Forum.
I have noticed some inconsistent behavior when trying to tql queries with comments inside SQL statements for analysis.
We have tried both /**/ and -- for several queries.
Most work, but sometimes the comments are stripped somewhere between SQL Assistant (or BOBJ) the ODBC connection.
I am using ODBC 188.8.131.52 , with SQL assistant 7.1.0.08.
I have run the same query twice, and when I look at the session monitor, I have seen it with the comment, and then without?
Does this have anything to do with Caching, or is this just an ODBC rewrite /translation issue?
This query generally ( once it worked) does not make it through ODBC with out the comments being stripped.
SELECT /* FQJQuery11 */ PO1.Coid , PO1.Company_Code , Count(Distinct(PO1.Purchase_Order_Num)) as PO_Automated_Cnt FROM Edwsc.Consolidated_Service_Cntr as CO1 JOIN EDWSC.Purchase_Order_CDC AS PO1 ON CO1.Company_code = PO1.Company_code AND CO1.Child_COID = PO1.COID AND CO1.Procuring_Ind = 'Y' JOIN Edwsc.Facility_Vendor_CDC as FV ON PO1.Company_Code = FV.Company_Code AND PO1.COID = FV.COID AND PO1.Source_System_Code = FV.Source_System_Code AND PO1.Facility_Vendor_Num = FV.Facility_Vendor_Num AND PO1.Vendor_Type_Code = FV.Vendor_Type_Code AND FV.Active_DW_Ind = 'Y' JOIN EDWSC.PO_Line_Item_CDC PI1 ON PO1.Company_Code = PI1.Company_Code AND PO1.Coid = PI1.Coid AND PO1.Source_System_Code = PI1.Source_System_Code AND PO1.Purchase_Order_Num = PI1.Purchase_Order_Num AND PO1.Purchase_Order_Date_Time = PI1.Purchase_Order_Date_Time AND PI1.Active_DW_Ind = 'Y' JOIN EDWSC.Par_Location_Bin_CDC PLB ON PI1.Company_Code = PLB.Company_Code AND PI1.Coid = PLB.Coid AND PI1.Dept_Num = PLB.Dept_Num AND PI1.Par_Class_Code = PLB.Par_Class_Code AND PI1.Facility_Item_Num = PLB.Facility_Item_Num AND PLB.Active_DW_Ind = 'Y' WHERE PO1.Source_System_Code = 'S' AND PO1.Active_DW_Ind = 'Y' AND PO1.PO_Status_Code NOT IN ('R', 'V') AND (PO1.Purchase_Order_Date BETWEEN (Cast( (Cast ((Add_Months(Current_Date,-27) (Format'yyyy-mm')) as Char(7)) || '-01') AS DATE)) and Current_Date) AND (trim(PO1.Purchasing_system_user_id) not in ('','0000000')) AND PO1.PO_Stat_Ind <> 'Y' AND FV.Order_Type_Code in ( 'A','B') AND PLB.Order_Type_Code in ('A','J') GROUP BY 1, 2;
Eric W. Barner
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|