Topic Options
Rate This Topic
#77848 - 12/19/02 02:14 AM SQL Statement
kevin_shaffer Offline
journeyman

Registered: 03/11/04
Posts: 114
**

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

Top
#77849 - 12/19/02 02:39 AM Re: SQL Statement [Re: andrew_baker]
vivake28 Offline
newbie

Registered: 03/11/04
Posts: 9
In the SQL statement you are passing the Column name (assuming 'subtotal' is
the col. name) and from the AL you pass the column value.
If that is correct then you need to replace that with the column name.
Regards,
Vivake Panagariya

-----Original Message-----
From: Kevin Shaffer [mailto:kevin.shaffer@EVERGREENSYS.COM]
Sent: Thursday, December 19, 2002 8:14 AM
To: ARSLIST@ARSLIST.ORG
Subject: SQL Statement

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------=NextPart00101C2A768.ED6F0AB0
Content-Type: text/plain

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a
different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks




You may control your subscription options, including UNSUBSCRIBE,and ACCESS
THE ARCHIVES at http://www.ARSLIST.org. For ARSList support, please send
eMail to support@arslist.org

------=NextPart00101C2A768.ED6F0AB0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

**



charset=3Dus-ascii">
5.5.2653.12">
SQL Statement



In SQL Analyzer I type in this command and I get the =
result I want



SELECT SUM(subtotal)

FROM HARSOFTWARELICENSEBREAKDOWN

WHERE SLMREQUESTID =3D 00000000000064



When I create an active link and run the following =
SQL statement I get a different result.  Can anyone see what I am =
doing wrong. 



SELECT SUM($SubTotal$)

FROM HARSOFTWARELICENSEBREAKDOWN

WHERE SLMREQUESTID =3D $SLM Request ID$



Thanks






To UNSUBSCRIBE, email the message "unsubscribe arslist" to:
listserv@arslist.org
You may also control your subscription options, including UNSUBSCRIBE, at
http://www.ARSLIST.org This posting was submitted via the Web interface

------=NextPart00101C2A768.ED6F0AB0--


You may control your subscription options, including UNSUBSCRIBE,and ACCESS THE ARCHIVES at http://www.ARSLIST.org. For ARSList support, please send eMail to support@arslist.org

Top
#77850 - 12/19/02 02:36 AM Re: SQL Statement [Re: andrew_baker]
jiri_pospisil Offline
journeyman

Registered: 03/11/04
Posts: 121
Not sure what is your database, but in ORACLE I would try:

SELECT SUM(SubTotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = '$SLM Request ID$'

Regards

Jiri Pospisil

-----Original Message-----
From: Kevin Shaffer [mailto:kevin.shaffer@evergreensys.com]
Sent: 19 December 2002 14:14
To: ARSLIST@arslist.org
Subject: SQL Statement


**

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a
different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks


To UNSUBSCRIBE, email the message "unsubscribe arslist" to:
listserv@arslist.org You may also control your subscription options,
including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted
via the Web interface




NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.


You may control your subscription options, including UNSUBSCRIBE,and ACCESS THE ARCHIVES at http://www.ARSLIST.org. For ARSList support, please send eMail to support@arslist.org

Top
#77851 - 12/19/02 02:46 AM Re: SQL Statement [Re: andrew_baker]
brian goralczyk Offline
Stealth Member

Registered: 06/12/01
Posts: 357
**
Kevin,

Are you certain that the value that it is using is 64? Check your sql logs and see what Remedy is actually sending to the database. Also, how are the results different?

Brian Goralczyk
Verizon Wireless

-----Original Message-----
From: Kevin Shaffer [mailto:kevin.shaffer@EVERGREENSYS.COM]
Sent: Thursday, December 19, 2002 9:14 AM
To: ARSLIST@ARSLIST.ORG
Subject: [ARSLIST] SQL Statement


**

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

Top
#77852 - 12/19/02 02:48 AM Re: SQL Statement [Re: andrew_baker]
mark_brittain Offline
Stealth Member

Registered: 03/11/04
Posts: 55
** **

This drove me crazy too. Thing to remember is that the Request ID is a character field and not a number field. Now I am not sure what database you are using but with Oracle you have to put a single quote on each side of the field name like this ‘$SLM Request ID$’ Some databases require a double quote so you may have to work it a bit.



Good Luck



Mark



-----Original Message-----
From: Kevin Shaffer [mailto:kevin.shaffer@EVERGREENSYS.COM]
Sent: Thursday, December 19, 2002 9:14 AM
To: ARSLIST@ARSLIST.ORG
Subject: SQL Statement



In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface
You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

Top
#77853 - 12/19/02 02:51 AM Re: SQL Statement [Re: andrew_baker]
ashraf elrefaey Offline
journeyman

Registered: 11/02/01
Posts: 144
**
Hi Kevin,

In the active link, you're passing the value rather than the SQL field name. The following should work fine from the active link:

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Best regards,

Ashraf Elrefaey
Remedy Developer
Group IT

**** COLT TELECOMUNICATIONS


-----Original Message-----
From: Kevin Shaffer [mailto:kevin.shaffer@EVERGREENSYS.COM]
Sent: 19 December 2002 14:14
To: ARSLIST@ARSLIST.ORG
Subject: SQL Statement


**

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface



*************************************************************************************
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. +44 20 7390 3900

This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message. Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
*************************************************************************************

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

Top
#77854 - 12/19/02 02:57 AM Re: SQL Statement [Re: andrew_baker]
dale2 Offline
Stealth Member

Registered: 03/11/04
Posts: 34
**
Kevin,
Turn on SQL and Active Link logging to capture the exact SQL statement Remedy is sending to the database.

Take Care
Dale Jones

----- Original Message -----
From: Kevin Shaffer
To: ARSLIST@ARSLIST.ORG
Sent: Thursday, December 19, 2002 9:14 AM
Subject: SQL Statement

**

In SQL Analyzer I type in this command and I get the result I want

SELECT SUM(subtotal)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = 00000000000064

When I create an active link and run the following SQL statement I get a different result. Can anyone see what I am doing wrong.

SELECT SUM($SubTotal$)
FROM HARSOFTWARELICENSEBREAKDOWN
WHERE SLMREQUESTID = $SLM Request ID$

Thanks

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

You may also control your subscription options, including UNSUBSCRIBE, at http://www.ARSLIST.org This posting was submitted via the Web interface

Top


Moderator:  Matt Reinfeldt