If you could tell me what output you are hoping for, I could check back once I 
go back to my hotel (with a brief descriptions of these tables as I do not 
have access to my system from the hotel today). I'll try to help you with the 
statement if I can..
Cheers
Joe
----- Original Message ----
From: "Moore, Christopher Allen" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, June 2, 2008 9:01:35 PM
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"." C ity " 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 ;




_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to