I'm trying to do a set fields from SQL, however, the actual SQL command is
variable. What I'm trying to find is a count of matching records for a query
that the user is building on the fly. The SQL query is built in parts (which
table it is pulling from and the where clause).

 

The problem that I'm having, is that as the where clause is built, Remedy is
escaping the single quotes when it stores the information in the database.
When you pull it back into a character field, it removes the extra single
quotes. However, when I substitute the character field into the set fields
SQL, it again escapes all of the single quotes.

 

Perhaps easier with an example - 

 

I have a table with a couple of character fields, one for the view I'm
pulling from and another with the SQL where clause. When I pull them back to
the set fields action, the SQL is

 

select count(*) from $view$ where $sqlClause$

 

if

view = _WIMM_qs_ev_et

sqlClause = (( evCategory = 'Maintenance' ))

 

what I'm seeing for the SQL is

 

select count(*) from _WIMM_qs_ev_et where (( evCategory = ''Maintenance'' ))

 

The only method that I can think of to get around this, is to do a direct
SQL update statement where I set the return count directly into a record and
then use a set fields to return the result. However, this seems clunky. Does
anyone know of a method where I can prevent the escaping of the single
quotes when I use a set fields actions like this?

 

Thanks,

Roy

 

 

 

//SIGNED//

ROY ASHCRAFT, Contractor, 2 SOS/SYOE

Remedy ARS Support, SAIC

(402) 294-8225, DSN 271-8225

[email protected]

 


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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to