You do realize, with this approach, that you are pulling a record set
for every record, right?  If you have 1000 records, you will perform
1000 queries against the db table.  A filter table walk would be much
more efficient.  Alternatively, you could write a stored procedure
that returned the entire record set as a single string, which would be
even more efficient.

Axton Grams

On Mon, Jun 16, 2008 at 8:15 AM, Dwayne Martin <[EMAIL PROTECTED]> wrote:
> Here's my algorithm.  There may be better ones.
>
> You have an Active Link Guide:  "FormName:Find Records" with these ALs and 
> Label:
>
> "FormName:Find:INNER 10 Initial get first record"
>   Select a from c order by a
>   result = $1$
>
> "FormName:Find:INNER 20 add first record, error if empty"
>   If result != NULL
>       add it to the field
>   else
>        Send Message saying that there are no records
>        Exit guide
>
> Label: "Again"
>
> "FormName:Find:INNER 30 get next record"
>    Select a from c where a > $result$ order by a
>    result = $1$
>
> "FormName:Find:INNER 40 add record, go to again"
>   If 'result' != NULL
>        Add result to field, go to "Again"
>   (No Else needed, the guide will exit when there are no more records)
>
> You should be able to do without the first to ALs.  Just set "result" to "" 
> to start out.  But it seems like I ran into trouble doing it that way.  (It's 
> been a while since I tried it.)
>
> Good luck,
> Dwayne Martin
> James Madison University
>
> ---- Original message ----
>>Date: Fri, 13 Jun 2008 15:26:27 -0400
>>From: Frank Caruso <[EMAIL PROTECTED]>
>>Subject: Re: Get all results from a SQL call
>>To: [email protected]
>>
>>   ** 1. Create SQL view of the data from your Remedy
>>   database.
>>   2. Create a View form in Remedy using that SQL view
>>   3. Create a table field using that new View. Now
>>   when the table refreshes it will have a local copy
>>   of all of the records and you can table walk it.
>>
>>   On Fri, Jun 13, 2008 at 3:08 PM, Brittain, Mark
>>   <[EMAIL PROTECTED]> wrote:
>>
>>     Hi All & TGIF,
>>
>>     I need to do a SQL query to a database outside of
>>     Remedy and gets all of
>>     the contact records for a customer and drop them
>>     into a field in a
>>     ticket. Of course I can get the first or display a
>>     list if there are
>>     multiple. There has to be a way to get all records
>>     that meet the
>>     criteria.
>>
>>     ARS 6.3 patch 20
>>     Oracle 9.2
>>     SunOS 5.9
>>
>>     Any ideas?
>>
>>     Thanks
>>     Mark
>>
>>     Mark Brittain
>>     Remedy Developer
>>     NaviSite ESM Operations
>>     315-453-2912 x5418 (Office)
>>     315-317-2897 (Cell)
>>
>>     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.
>>
>>     
>> _______________________________________________________________________________
>>     UNSUBSCRIBE or access ARSlist Archives at
>>     www.arslist.org
>>     Platinum Sponsor: www.rmsportal.com ARSlist:
>>     "Where the Answers Are"
>>
>>   __Platinum Sponsor: www.rmsportal.com ARSlist:
>>   "Where the Answers Are" html___
>

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

Reply via email to