RE: [Arsperl-users] Remedy Query to SQL
Brought to you by:
jeffmurphy
|
From: Bowman, B. A <Bow...@st...> - 2005-04-07 19:06:19
|
Thanks Carey, That is very similar to what I thought I'd need to do. I was just = hoping that I wouldn't :) -----Original Message----- From: ars...@ar... [mailto:ars...@ar...]On Behalf Of Carey Matthew Black Sent: Thursday, April 07, 2005 2:19 PM To: ars...@ar... Subject: Re: [Arsperl-users] Remedy Query to SQL Brent, I must say I am a bit confused by what your trying to do.... I would think that you could more simply use the API to do the search (with a Remedy formated query) than to use the API to convert it to an SQL statement then use an SQL connection to do the search. (But maybe you have some reasons for trying to do what you are trying to do?) However, I can imagine a way of converting a Remedy query to an SQL query, but you are not going to like doing it. You have to know a good deal about Remedy's API and it will be error prone. (IMHO.) Your best bet (if you really have to do this) is to use a combination of the following ARSPerl functions: ars_GetFieldTable This will get a hash of Field ID to Field DB name. ars_GetListVUI Get a list of all views for the form in question ars_GetField Get the "displayInstanceList" and further the "dInstanceList" value for the VUI (View) that the query was built for.... You can then map field Label (for the view) to field ID/Field DB name. You will have to build a similar hash to what ars_GetFieldTable returns but based on the Field Labels for the View instead of the Fields DB Name. Then.... Parse the query to translate: * the English field names to field ID's (which nicely map to the Column names on the DB tables.) * The values might have wild cards or other differences in the notation between double quotes and single quotes for your RDBMS syntax. * And likely other things.... But maybe that would help you along your path? --=20 Carey Matthew Black Remedy Skilled Professional (RSP) ARS =3D Action Request System(Remedy) Solution =3D People + Process + Tools Fast, Accurate, Cheap.... Pick two. Never ascribe to malice, that which can be explained by incompetence. http://www.fellowshipchurch.com On Apr 7, 2005 11:53 AM, Bowman, Brent A <Bow...@st...> wrote: > I want to get the conversion without ever querying the ARS. I want to = go directly to Oracle, but let the user input a Remedy style query. >=20 > -----Original Message----- > From: ars...@ar... > [mailto:ars...@ar...]On Behalf Of Covert, Jack > Sent: Thursday, April 07, 2005 12:01 PM > To: ars...@ar... > Subject: RE: [Arsperl-users] Remedy Query to SQL >=20 > How about running the query with SQL logging on? >=20 > -----Original Message----- > From: Bowman, Brent A [mailto:Bow...@st...] > Sent: Thursday, April 07, 2005 7:09 AM > To: ars...@ar... > Subject: [Arsperl-users] Remedy Query to SQL >=20 > Listers, >=20 > I am wondering if there is a simple algorithm available to convert a = remedy > qualification directly to an SQL query that I can use with oracle. Is = there > something available in arsperl? >=20 > Thanks, >=20 > Brent Bowman ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick _______________________________________________ Arsperl-users mailing list Ars...@ar... https://lists.sourceforge.net/lists/listinfo/arsperl-users |