SPL Warnings in listfile
Posted in 1996
Is there any way to clearly indicate to the stroed procedure compiler that
I am already aware that I am using variables within a SQL statement. I
get a number of compile warnings on statements like:
SELECT count (*) INTO num_records
FROM customer
WHERE customer.id = cust_id;
Warning: cust_id is a variable, not a column
I have tried prefixing the variable with ':', '$', and '.', but they all
generate a syntax error.
I know that these are merely warnings, and the code (if syntactically
correct) will work fine. However, I believe that there should be a way to
write code in a clear enough way that there is no doubt that the code is
doing precisely what the programmer's intented. Any question raised by a
compiler (or human) along the lines of "This might not do what you think
it does" ought to be addressed by clearer code. I just don't know how to
write SPL code clear enough (to the compiler) that states "I am aware that
X is a variable, because the variable X is precisely what I want. If my
tables happen to have a column named X, I still prefer to use the variable
X."
Paul Kapp ----> PLKapp@aol.com -OR- plk@interactive.visa.com