(XML) value statement is autom. converted to uppercase!
TSchwab
Posts: 80
When I use an XML variable and try to create a SELECT like this:
SELECT T.C.value('@Test', 'INT') as Test FROM @XML.nodes('V') T(C)
is changed to this:
SELECT T.C.VALUE('@Test', 'INT') as Test FROM @XML.nodes('V') T(C)
The keyword value is always converted into (upper case) VALUE and that doesn't work for XML.
It's very anoying... I have to manually change it back to lower case...
Please, help.
Thanks,
Thorsten
Regards,
Thorsten
Thorsten
Comments
Can you try the folowing settings:
1. SQL Prompt 4 --> Options --> Format --> Case --> Reserved Keywords --> change to 'Leave as is'
2. SQL Prompt 4 --> Options --> Format --> Case --> Build-in functions --> change to 'Leave as is'
3. SQL Prompt 4 --> Options --> Format --> Case --> Build-in data types --> change to 'Leave as is'
And than try to replicate the issue and let me know if this fixes the issue.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
that does not help at all.
It works for the word'value but all the other keywords are kept in the case i'm typing them in.
That's not helpful. All other keywords, function and data-types are needed in upper case.
So i have to keep these settings with uppercase.
I don't understand why value is changed to upper case. It's not a reserved keyword, or a function or a data-type?
Sorry, but this solution makes it worse.
Thanks.
Thorsten
Thorsten
Can you send us the complete query so that we can understand the scenario and replicate the issue?
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Here is a sample code:
If I execute the code I get the error message:
"value" is case sensitive and must be in lower case. SQLPrompt changes the value always to upper case.
It must look like this:
Thorsten
I've been pestering Red Gate about this behavior ever since they took over SQL Prompt - without any success, so far :-( Glad to see another user also seems to agree this is an issue that needs to be fixed ASAP.
See this thread here - an "enhancement request" has already been logged - express your interest in it, then we might get them to finally fix it some day!!
http://www.red-gate.com/MessageBoard/vi ... php?t=9434
you are absolutly right. Escpecially that the problem also occures with the keyword modify... :shock:
I hope redgate will have a solution very soon.
Thorsten
It is logged in our internal tracking system (SP-2914).
We are working on this and I will update you as soon as it is fixed.
Many thanks for your patience.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Hi,
I was wondering if there is a time schedule for this error to be fixed?
Thorsten
The quote is referring to version 5 that they are planning to work on in the next quarter.
Thorsten