[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Re: Connect by clause problem
- Subject: RE: [sqr-users] Re: Connect by clause problem
- From: "Ray, Christine Marie" <chmray@indiana.edu>
- Date: Tue, 22 Nov 2005 16:45:27 -0500
- Delivery-date: Tue, 22 Nov 2005 16:47:29 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcXvhnTR47rNBBYtQIqTvtE8/b8t+QAHo4zg
- Thread-topic: [sqr-users] Re: Connect by clause problem
It is my understanding that the environment that works and the test
environment are identical.
The reason I believe this is a compile time error is that the error is
displayed before the sqr asks for any parameters. When I do not include
the [$folder] in the sql, the sqr asks prompts for the $folder entry.
I tried your suggestion below about removing the extra characters and
the square braces with the folder variable. I also changed the like to
and equal because the user will be selecting the folder from a drop down
list in a web page. Now the code works.
Thanks for your help !!!
Christine
-----Original Message-----
From: sqr-users-bounces+chmray=indiana.edu@sqrug.org
[mailto:sqr-users-bounces+chmray=indiana.edu@sqrug.org] On Behalf Of
Nathan Stratton Treadway
Sent: Tuesday, November 22, 2005 11:59 AM
To: This list is for discussion about the SQR database reporting
languagefrom Hyperion Solutions.
Subject: [sqr-users] Re: Connect by clause problem
On Fri, Nov 18, 2005 at 04:40:40PM -0500, Ray, Christine Marie wrote:
> I have some sqr code that works in one environment but will not
compile
> to run from the UNIX command line.
What version of SQR is used in the environment that works (and what OS)?
Are you sure the error is a compile time error? For example, did you
pass a value for $folder on the command line? If so, try running the
program without that to see if a prompt for $folder is printed before
the error message shows up. (Normally I would not expect SQR to try to
compile a begin-select block that contained dynamic SQL until run time.)
I don't have a good suggestion as to why the program works in one
environment and not the other... but you may be able to avoid the
problem:
> begin-procedure main
> begin-select
[...]
> from dss.ie_mstr_cat_alph_v
> start with ro_tree_entry_lbl like [$folder]
[...]
> end-select
> end-procedure ! main
>
>
>
> begin-procedure get_input
> Input $folder
> Let $folder = '''' || $folder || ''''
> end-procedure ! get_input
>
Are you sure you need to use dynamic SQL here? I think your select
would work just as well if you said
start with ro_tree_entry_lbl like $folder
(and then didn't add extra ' characters around the input value in
get_input).
(And if the user is never going to enter a folder name with wildcard
characters, you might just want to use "=" instead of "like".)
Nathan
------------------------------------------------------------------------
----
Nathan Stratton Treadway - nathanst@ontko.com - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services -
http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID:
1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users