[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Irritating sqr error -Reply
- Subject: Re: Irritating sqr error -Reply
- From: the dragon <ceprn@HOTMAIL.COM>
- Date: Wed, 27 Oct 1999 15:53:12 CDT
>>The problem only occurs when the variable being assigned ends in #,$ etc.
>>So database column names are not an issue. Unless you are assigning
>>values to database columns after they have been selected (shudder).
I agree; however, you never *have to* to use database columns in your code,
except in the code which directly accesses the database.
>>It is true that I do have the ability to name my variables other names.
>>But I don't really appreciate having to write code like the following just
>>because the compiler isn't all that smart. I don't like code with
>>unnecessary complications just waiting to trip someone up during the next
>>upgrade.
All compilers are like that - just consider the # and $ as reserved words
and don't use them, as you would in any other programming language.
>>Where pc.check# = #selected_check_number instead of the prettier
Where pc.check# = #selected_check#
OK, while I don't know all the programming languages (OK, I only know a
couple) what language would allow you to use special/reserved characters in
the naming of the variables?
Also, in many cases I am modifying existing peoplesoft programs and I do not
have the option of changing the variable name. Instead I am forced to use
the more efficient MOVE command instead of the slow, plodding LET command I
prefer. :)
You can always modify existing PS programs to make them better, faster,
easier to understand - after all, someone has to write them the correct way
since PS chooses not to. :-)
jim
>>> the dragon <ceprn@HOTMAIL.COM> 10/27/99 03:37pm >>>
Jim,
Yes, I agree that someone was watching their tonsils when the designed the
databases, in more ways than one... However, keep in mind that if you are
ever dealing with a #variable# or $variable$ in a program, you have yourself
to blame. It's very simple to change the name of a variable as it is
selected from the database - creating a &variable that won't cause problems
and then a $variable or #variable that doesn't cause problems. No one ever
said you have to use the column name as a variable internally to the sqr.
Yes, this makes the code less confusing (in some cases), but it can also
cause processing problems.
begin-select
tbl.page# &page_nbr
tbl.line# &line_nbr
tbl.transit# &transit_nbr
let #page_nbr = &page_nbr
let #line_nbr = &line_nbr
let $transit_nbr = &transit_nbr
from ps_stoopid_over_normalized_table tbl ! :-)
where 1 = 1
and tbl.page = 67 ! don't know if this is number or character
end-select
clark 'the dragon' willis
dragon enterprises, consulting services
you wrote....
If only PS hadn't named all these fields page#, line#, transit#, etc etc
etc.
jim
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com