Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable Declaration

Status
Not open for further replies.

tapks

IS-IT--Management
Sep 6, 2001
72
IN
Dear friends!

I am facing a problem while I am trying to read an xml string inside a stored procedure. The length of the xml string is more than 15000 characters. Is there any way I can declare a variable in my stored procedure so that I can use that XML string to read.

Please help me in this regard.


Thanks in advance.

Tapks
 
haven't tried it...

DECLARE @myVar TEXT

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Hi!

It is not possible to define

DECLARE @myVar TEXT

inside a procedure.

Any other way.
 
I'm sure you get an error when the varchar is over 8K, can you split the value into 2 variables prior to the SP call?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
If not, can you create a table with an ID column and a text column. INSERT the string into the text column and call the stored procedure with just the column ID?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top