*Dynamic SQL scripts under RPT*
From: <ram%artecon_at_hp-sdd.sdd.hp.com>
Date: 8 Jul 1992 22:00:44 -0500
Message-ID: <9207082150.AA09033_at_artecon>
Date: 8 Jul 1992 22:00:44 -0500
Message-ID: <9207082150.AA09033_at_artecon>
Greetings!
Is there a way to use "dynamic" sql queries under rpt? It works well in SQL. Here's the scenerio: SQL> select part, price from bigtable order by &sortvar The user inputs either "part" or "price" for sortvar and the script does the sort accordingly. The same thing in an rpt does not work :+( ~ ~ ~Received on Thu Jul 09 1992 - 05:00:44 CEST
.declare sortvar a10
.ask "Enter sortvar: " sortvar
~ ~ ~
.define get_parts
select part, price into part, price from bigtable order by &sortvar .. ~ ~ ~ I GET NO ERRORS, and the output is in no particular order. The above scenerio is only a lil' example. I have users who would like to sort on 28 different columns, and I thought it would be nice to write *one* report like the above instead of 28. If someone could throw some light on what's going on here, I would appreciate it. Muchos Gracias. *Ramesh* ram%artecon_at_hp-sdd.sdd.hp.com