[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Dynamic sqr?



Sorry, I guess I didn't read your question closely enough.

SQR does not allow you to create dynamic procedures at execution time, only
dynamic SQL.  You might be able to use the #IF statement to generate dynamic
code at compile time.  However, since #IF statements are executed at compile
time, you won't be able to query the database to determine what to use.  You
can pass substitutions to your program via the ASK command, but I still
don't think that will get you what you're looking for.

The only other thing I can think of is you could have an SQR the does the
query and then executes another SQR (via the Call System Using command).
The first program could pass a switch on the command line that the second
program could pick up via the ASK command.  The second program could then
use that value in #If statement to control which #include to bring into its
compilation.

I know....none of those sound like very good solutions to your problem, but
I think that's about it.


I hope this helps.
Ed Kelly

>From: Randy Kirkpatrick <randyk@MESSAGEMEDIA.COM>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: Re: Dynamic sqr?
>Date: Tue, 27 Jun 2000 09:14:45 -0600
>
>Ed,
>
>Thanks, but I'm not looking for dynamic sql, I'm looking to call an sqr
>procedure that is dynamically built which calls another procedure. I have a
>table in the database which I can  query and build statements to call those
>other procedures. I can not find a way to call a procedure where you don't
>know the procedure name at run time. In my example, I have a report which
>is
>essentially built from one or more other reports that are chained together
>and displayed as one report. To do this, each report is built using a
>separate procedure in it's own include file. I use an evaluate statement to
>find out which of these reports should be included in the master report. My
>database table contains information which lets me build this evaluate
>statement dynamically. Presently, the evaluate statement is static and I
>update it manually. I would like to eliminate this step and make this
>dynamic. I'm alco using Brio Portal which makes this an interesting
>problem.
>
>Randy
>
>
>
>-----Original Message-----
>From: Discussion of SQR, Brio Technology's database reporting language
>[mailto:SQR-USERS@list.iex.net]On Behalf Of Ed Kelly
>Sent: Monday, June 26, 2000 8:32 PM
>To: SQR-USERS@list.iex.net
>Subject: Re: Dynamic sqr?
>
>
>Yes.  Build the SQL statement in a String variable.  The statement can then
>be execute in a Begin-SQL paragraph by placing it in square brackets [].
>
>For example:
>
>Let $Test = 'Update TEST_TBL Set Column1 = ''Sample'' where Key = ''Test'''
>
>Begin-SQL
>[$Test]
>End-SQL
>
>I hope this helps.
>Ed Kelly
>
>
>
>
> >From: Randy Kirkpatrick <randyk@MESSAGEMEDIA.COM>
> >Reply-To: sqr-users@list.iex.net
> >To: SQR-USERS@list.iex.net
> >Subject: Dynamic sqr?
> >Date: Mon, 26 Jun 2000 10:35:19 -0600
> >
> >List Members,
> >
> >Is there any way to create an sqr procedure from a database query and run
> >that procedure dynamically? I'm presently using an evaluate command which
> >processes procedures based on an id. This procedure is in a separate
> >include
> >file which I maintain manually, but I'd really like to put this
>information
> >in the database and run these procedures dynamically at runtime.
> >
> >
> >
> >Randy Kirkpatrick    Oracle DBA
> >               messagemedia
> >       e-mail l e-customers l e-business
> >www.messagemedia.com        NASDAQ: MESG
> >  6060 Spine Road, Boulder CO    80301
> >(303) 381-7727
> >
> >
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com