Try


SELECT COUNT(*)

FROM Session_Tracking

WHERE Incident_ID = Incident_Number IS NOT NULL AND PassOffReason IS NOT
NULL



Joe

  -----Original Message-----
  From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of McManus Michael A SSgt HQ 754
ELSG/DOMH
  Sent: Thursday, July 19, 2007 4:47 PM
  To: [email protected]
  Subject: SQL help


  **
  So I stink and SQL and I imagine itÂ’s a syntax error so I figured IÂ’d
check here.  We have a field on our incident form that tracks the total
number of passoffs a ticket goes through.  Currently itÂ’s not working so IÂ’m
trying to make it happen.  HereÂ’s the SQL IÂ’m trying to use.



  SELECT COUNT(*)

  FROM Session_Tracking

  WHERE Incident_ID = '$Incident_Number$' AND PassOffReason <> NULL



  Session Tracking gets incident info pushed to it every time a ticket is
modified.  If a passoff occurs, the user is forced to select a reason.  So I
figured, if I count all the tickets where the ID matches the current ticket,
and there is a value in that field, then I can set that field to SQL result
set $1$ and it should work.  I made a test ticket and created a couple
sessions, 4 I think, and 2 of them have a value in the PassOffReason field,
but when the active link runs, it sets that field to 0.



  Any ideas? WeÂ’re on 5.1.2. SQL 2K Win 2K3



  Thanks,



  Michael A. McManus, SSgt, USAF

  Remedy Developer

  HQ 754 ELSG/DOMH

  DSN: 596-6478 / Comm: 334-416-6478

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.9/907 - Release Date: 7/18/2007
3:30 PM

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

Reply via email to