[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] SQR logic in SQL
- Subject: [sqr-users] SQR logic in SQL
- From: "DICKMAN, ERIC C." <ERIC.DICKMAN@dfps.state.tx.us>
- Date: Mon, 28 Jun 2004 10:29:07 -0500
- Delivery-date: Mon, 28 Jun 2004 10:30:23 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
> Hello Everyone,
>
> I am fairly new to the programming language of SQR. I am attempting to
> dynamically populate some SQL values in SQR and when the value does not
> exist it creates problems the SQL (returns nothing). Is it possible to
> put SQR logic around the SQL. I created an example below of SQR logic in
> SQL Is it possible to do something like that or is there another was to
> handle this problem in the SQR? The CARYEAR value is '' (no parameter
> entered by the user) many times, because the values in passed in from a
> Search page.
>
> I pass in the follow variables:
> CARTYPE = ('Mustang','Corvette','Accord','Ranger')
> CARYEAR = ('')
>
> ask {CARTYPE}
> ask {CARYEAR}
>
> move '{CARTYPE}' to $input_car_type
> move '{CARYEAR}' to #input_car_year
>
> SELECT *
> FROM CAR C,
> YEAR Y,
> WHERE C.FAST > 150
> AND C.TYPE IN ([$input_car_type])
>
> if $input_car_year <> ''
> AND Y.YEAR IN ([#input_car_year])
> end-if
>
Thanks,
Eric
NOTE: The Texas Department of Protective and Regulatory Services (TDPRS) has
changed its name to the Department of Family and Protective Services(DFPS)
resulting in the following e-mail address format change for all employees:
firstname.lastname@dfps.state.tx.us
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users