[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] sqr problem - generic begin-select
- Subject: RE: [sqr-users] sqr problem - generic begin-select
- From: kevin.reschenberg@sparkpath.com
- Date: Fri, 21 Jan 2005 09:46:14 -0700
- Delivery-date: Fri, 21 Jan 2005 11:46:54 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Also specify a pseudonym and type for the column, like this:
[$Column1Name] &mycolumn=char
Then refer to the value as &mycolumn in your code. SQR won't construct
a name like &Box_1 from the variable the way it does with regular
static column names.
Kevin Reschenberg
www.sparkpath.com
www.sqr-info.com
-------- Original Message --------
Subject: RE: [sqr-users] sqr problem - generic begin-select
From: Jeff.Steinfeldt@wellsfargo.com
Date: Fri, January 21, 2005 7:59 am
To: sqr-users@sqrug.org
Try a bind variable. Assign your column name to a text variable and
then
add that variable name to the select list enclosed in the square
brackets.
LET $Column1Name = 'Box_1'
BEGIN-SELECT
Last_Name
...
...
...
[$Column1Name]
...
...
...
END-SELECT
-----Original Message-----
From: sqr-users-bounces+jeff.steinfeldt=wellsfargo.com@sqrug.org
[mailto:sqr-users-bounces+jeff.steinfeldt=wellsfargo.com@sqrug.org] On
Behalf Of Jay Sagadraca
Sent: Friday, January 21, 2005 9:48 AM
To: sqr-users@sqrug.org
Cc: Jay V. Sagadraca
Subject: [sqr-users] sqr problem - generic begin-select
Hello,
Here is my problem:
1. I have a flat file that I bcp in to a table. Let's say the
columns in the tmp_table are :
- Last Name
- First Name
- Address 1
- Address 2
- City
- State/Provincial Code
- Country Code
- Postal Code
- Box_1
- Box_2
- Box_3
2. After a few months, I have another flat file that is almost
similar to the above except the boxes are now the following :
- Box_1
- Box_3
- Box_4
3. Now, I have the following which was derived from #1 :
begin-select
Last_Name
First_Name
Address_1
Address_2
City
State_Prov_Code
Country_Code
Postal_Code
Box_1
Box_2
Box_3
from tmp_table
end-select
4. Now my question is, is there a command in sqr wherein you can do
the following to have a generic begin-select in the sqr inorder that you
will not be changing the previous sql?
begin-select
Last_Name
First_Name
Address_1
Address_2
City
State_Prov_Code
Country_Code
<any column> *this can be interchangeable
<any column>
<any column>
from tmp_table
end-select
Please help me.
Thank You,
Jay Sagadraca
Jay V. Sagadraca
Markham, Ontario, Canada
email : knight7883@yahoo.ca
---------------------------------
Post your free ad now! Yahoo! Canada Personals
_______________________________________________
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
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users