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

Re: Dynamic SQL Headscratcher



David Donnelly's response was on target.  Select all the columns that
might be chosen and conditionally print the ones you need. Unless you
are talking about MANY MANY columns, there shouldn't be any significant
performance issues, especially if the program runs on a server.


>Date:         Wed, 20 May 1998 08:43:11 -0600
>Reply-To: SQR-USERS@USA.NET
>From: Salim Lakhani <sl@USA.NET>
>Subject:      Dynamic SQL Headscratcher
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>
>I'm working on a report that allows the users to include three of ten
(or so) columns as an option (ie: they can pick 1, 2, or 3 columns to
include in the std report.)
>
>To further complicate the issue, these columns can be numeric or
character type.
>
>The following code works (but only when they have all three columns
selected and when all three are of numeric type):
>
>...
>avg_total_cash
>[$SCOPE1]       &SCOPE1=NUMBER
>[$SCOPE2]       &SCOPE2=NUMBER
>[$SCOPE3]       &SCOPE3=NUMBER
>  do PRINT_DETAIL
>  from ...
>
>Any ideas on how to accomplish this?
>
>The only thing I've been able to think of is having one program
dynamically write another program based on the user preferences....
>
>Thanks.
>Salim.
>
>
>
>____________________________________________________________________
>Get free e-mail and a permanent address at
http://www.netaddress.com/?N=1
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com