[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Dynamic column type
- Subject: Re: Dynamic column type
- From: Chris Marshall <Crmarsha@ADVO.COM>
- Date: Thu, 19 Nov 1998 09:59:26 -0500
Gang -
I notice that SQR allows dynamic formatting of its edit
string with the use of a colon in front of the variable.
print $myvar edit :$myformat
I have also seen dynamic SQL statments generated with
the use of square brackets ...
from mytable
where [$SQLConditions]
Have you tried either one of these?
Let me know if it works.
Cheers,
Chris
------------------------------------------------------------------------------------------
In regards to this query back in May; did/has anyone managed to get a variable to dynamically assign NUMBER or CHAR to the dynamic column definition?
ie: let $ctype = 'NUMBER'
begin-select
[$A1] &A1=$ctype
.........
We cant get a clean compile using $ctype this way.
TIA
Adrian Clayfield
a..
b.. Subject: Re: Dynamic SQL Headscratcher
c.. From: Steve Bollinger <c_sbolli@QUALCOMM.COM>
d.. Date: Wed, 20 May 1998 09:15:36 -0700
Have you tried a variable as coltype? ie. let $ctype = 'char' or 'number'at the
time you define $scope1. then[$SCOPE1] &SCOPE1=$ctype ....................
Steve Bollinger
At 08:43 AM 5/20/98 -0600, you wrote:>I'm working
on a report that allows the users to include three of ten (orso) columns as an
option (ie: they can pick 1, 2, or 3 columns to includein 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 programdynamically write another program based on the
user preferences....>>Thanks.>Salim.
========================================================================
Integrated Business Technologies Pty Ltd
Level 11 55 Hunter St Sydney 2000
Mobile: 0413 115580 Fax: 61 2 9223 4384
Email: adclay@ibt.com.au
========================================================================