An option (never tried it but no reason why it shouldn't work), is to create
a bat file, that runs the sql statement using SQLPlus (assuming you are on
Oracle), and spool those results to a text file, which name could be
generated by a GUID.

 

You can set that file then to a View field which will display the contents
of a text file.

 

This may take a little more of a development effort outside the AR System to
develop that bat file but it should work.

 

Joe

 

  _____  

From: Action Request System discussion list(ARSList)
[mailto:arslist@ARSLIST.ORG] On Behalf Of Brittain, Mark
Sent: Tuesday, February 05, 2013 4:49 PM
To: arslist@ARSLIST.ORG
Subject: Re: Returning SQL results as a single string.

 

Hi Brad,

 

You might actually need a join form to do this but here is how to get around
the First Matching.

 

Create a Table field for the data source and fields you need.

Create the character field

Create a filter:  Character field   set field ($Character Field$ + Column1$)
+ "," (or other separator)

Create a filter guide and add the filter you just created.

Create a call guide and make sure to select loop table

 

When Call Guide executed, the filter guide will use the filter to check each
row of the table and set the result in the Character field. First time a
created a guide function I did it with active links so I could see it. The
only real difference is you need to have an active link to Change Field:
Refresh Table before using the Call Guide

 

Mark

 

From: Action Request System discussion list(ARSList)
[mailto:arslist@ARSLIST.ORG] On Behalf Of Brad Fike
Sent: Tuesday, February 05, 2013 4:14 PM
To: arslist@ARSLIST.ORG
Subject: Returning SQL results as a single string.

 

** 

Hello Team,

I have a have sql statement and i want to store the results in a character
field during a filter set fields action not just 'Use First Matching
Request'

this is my example sql statement...

    select f.fieldName
    from arschema a, field f
    where a.schemaId = f.schemaId
    and a.resolvedName = 'User'
    and f.fieldName like 'L%'

This is the best I've been able to come up with so far. It works from sql
analyzer but not in the filter...

    DECLARE @Fields VARCHAR(8000)
    SELECT @Fields = COALESCE(@Fields + '; ', '') + f.fieldName
    from arschema a, field f
    where a.schemaId = f.schemaId
    and a.resolvedName = 'User'
    and f.fieldName like 'L%'
    SELECT @Fields as list

Are there any SQL wizards out there? 

Thanks in advance.



Thank You,
Brad Fike
(469) 759-0798 <tel:%28469%29%20759-0798> 
b...@jbfike.com

_ARSlist: "Where the Answers Are" and have been for 20 years_ 

 

  _____  

This e-mail is the property of NaviSite, Inc. It is intended only for the
person or entity to which it is addressed and may contain information that
is privileged, confidential, or otherwise protected from disclosure.
Distribution or copying of this e-mail, or the information contained herein,
to anyone other than the intended recipient is prohibited.

_ARSlist: "Where the Answers Are" and have been for 20 years_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to