![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Just wondering about the reserved word PUBLIC used in DB2. The length of that word is 8 and it screwing with some formatting work that I'm doing. Does anyone know why? Is it because PUBLIC is a reserved word and DB2 adds a newline to the end of them? Any way to remove the newline? R/LTRIM doesn't work and I can't use a SUBSTR because of other ids inside, say, the TABAUTH table. |
#3
| |||
| |||
|
|
On 08.03.11 19:05 , cbiel... (AT) gmail (DOT) com wrote: Just wondering about the reserved word PUBLIC used in DB2. *The length of that word is 8 and it screwing with some formatting work that I'm doing. *Does anyone know why? *Is it because PUBLIC is a reserved word and DB2 adds a newline to the end of them? Any way to remove the newline? *R/LTRIM doesn't work and I can't use a SUBSTR because of other ids inside, say, the TABAUTH table. I'm sorry, I have no clue what you are talking about. Can you be a littlebit more specific? What do you mean by length(PUBLIC) = 8? $ db2 "values length(PUBLIC)" SQL0206N *"PUBLIC" is not valid in the context where it is used. SQLSTATE=42703 $ db2 "values length('PUBLIC')" 1 ----------- * * * * * 6 * 1 record(s) selected. -- Helmut K. C. Tessarek DB2 Performance and Development IBM Toronto Lab |
#4
| |||
| |||
|
|
I thought that it may be due to it being a reserved word. |
|
Plus, when I feed a query into a bash variable (knowing it is PUBLIC) and evaluate it, the data shows that there is a newline at the end of the word, which, again, lead me to believe that DB2 designates their reserved words with a newline. |
|
The last '0a' translates to a newline. So I guess, I'm wondering I can remove that newline because it is pushing some XML formatting over too far. |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |