Is it a typo in the email or do you have an = after the Status in the 3rd line? I believe it should be a comma there "AST_ComputerSystem"."assetlifecyclestatus" AS 'Status'= should be "AST_ComputerSystem"."assetlifecyclestatus" AS 'Status', Fred
________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Moore, Christopher Allen Sent: Monday, June 02, 2008 8:02 PM To: [email protected] Subject: SQL help ** I'm trying to do a query on 2 tables- SIT:Site and AST:ComputerSystem. I'm a bit rusty on my SQL. The error this gives is: Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '='. Can anyone help? Thanks! Chris SELECT "AST_ComputerSystem"."Company" AS 'Agency', "AST_ComputerSystem"."assetlifecyclestatus" AS 'Status'= CASE "AST_ComputerSystem"."assetlifecyclestatus" WHEN 0 THEN 'Ordered' WHEN 1 THEN 'Received' WHEN 2 THEN 'Being Assembled' WHEN 3 THEN 'Deployed' WHEN 4 THEN 'In Repair' WHEN 5 THEN 'Down' WHEN 6 THEN 'End of Life' WHEN 7 THEN 'Transferred' WHEN 8 THEN 'Delete' WHEN 9 THEN 'In Inventory' WHEN 10 THEN 'On Loan' WHEN 11 THEN 'Disposed' WHEN 12 THEN 'Reserved' WHEN 13 THEN 'Return to Vendor' END, "AST_ComputerSystem"."Name" AS 'Instance Name', "SIT_Site"."Site", "SIT_Site"."Street" AS 'Street', "SIT_Site"."City" AS 'City', "SIT_Site"."State Province" AS 'State', "SIT_Site"."Zip/Postal Code" AS 'Zip', "SIT_Site"."Additional_Site_Details", <snip: too long for the list> FROM "SIT_Site" "SIT_Site" INNER JOIN "AST_ComputerSystem" "AST_ComputerSystem" ON "SIT_Site"."Site"="AST_ComputerSystem"."Building" WHERE "AST_ComputerSystem"."assetlifecyclestatus" <> 8 and "AST_ComputerSystem"."datasetid" = 'BMC.ASSET' and "AST_ComputerSystem"."classid" IN ('BMC_COMPUTERSYSTEM', 'BMC_VIRTUALSYSTEM', 'BMC_LPAR') AND "AST_ComputerSystem"."item" in ('Intel','UNIX') order by 1, 2, 3 ; __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

