Click here to Skip to main content
15,921,226 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL Server Cursor - Quick Question Pin
Colin Angus Mackay26-May-06 21:20
Colin Angus Mackay26-May-06 21:20 
Questionproblem with sql server Pin
lucky123456026-May-06 9:12
lucky123456026-May-06 9:12 
AnswerRe: problem with sql server Pin
Colin Angus Mackay26-May-06 11:31
Colin Angus Mackay26-May-06 11:31 
QuestionSQL - SELECT Question Pin
ensger26-May-06 7:23
ensger26-May-06 7:23 
AnswerRe: SQL - SELECT Question Pin
Kschuler26-May-06 9:30
Kschuler26-May-06 9:30 
GeneralRe: SQL - SELECT Question Pin
ensger26-May-06 18:02
ensger26-May-06 18:02 
GeneralFound it - thanks Pin
ensger27-May-06 1:01
ensger27-May-06 1:01 
QuestionGet XML node as 'text' data type Pin
Jim Conigliaro25-May-06 8:53
Jim Conigliaro25-May-06 8:53 
We are using XML to pump data into a SQ: Server 2005 database. We pass an XML document into a stored procedure, the stored procedures chunks out the data and inserts it into the appropriate tables. Fine. Works great, easy to maintain, excelent performance. Here's the problem. One of the columns we are pushing data into is of data type text and the .value fuction of the XML node does not support conversion of a node's data to the 'text' data type. For example:

CREATE PROCEDURE as MyProcedure @myData xml<br />
BEGIN<br />
    INSERT INTO MyTable (FirstName, LastName, Notes)<br />
    SELECT<br />
          MyNode.value('FirstName[1]','varchar(50)'),<br />
          MyNode.value('LastName[1]','varchar(100)'),<br />
          MyNode.value('Notes[1]','text')<br />
    FROM  @myData.Notes('Person') as R(MyNode)<br />
END


The problem is with the notes field. The cast to the data type text fails with the following error:
The data type 'text' used in the VALUE method is invalid.

The workaround thus far has been to use varchar(8000), but it will result in truncation if the data is too long.

Any ideas?

Jim Conigliaro
jconigliaro@ieee.org
AnswerRe: Get XML node as 'text' data type Pin
Arjan Einbu25-May-06 12:49
Arjan Einbu25-May-06 12:49 
QuestionBest Practices for including a SQL DB as part of your apps Pin
gantww25-May-06 8:24
gantww25-May-06 8:24 
AnswerRe: Best Practices for including a SQL DB as part of your apps Pin
Rob Graham25-May-06 11:10
Rob Graham25-May-06 11:10 
QuestionSQL server 2005 express ed Pin
Paps225-May-06 7:54
Paps225-May-06 7:54 
QuestionLogin system help? Pin
eric_tran25-May-06 5:34
eric_tran25-May-06 5:34 
AnswerRe: Login system help? Pin
Colin Angus Mackay25-May-06 10:31
Colin Angus Mackay25-May-06 10:31 
QuestionProblems with MSDE & Networking Pin
nathan2240525-May-06 4:46
nathan2240525-May-06 4:46 
AnswerRe: Problems with MSDE & Networking Pin
woudwijk25-May-06 11:09
woudwijk25-May-06 11:09 
QuestionOdd question - Datasets and Sprocs Pin
NameNotTaken25-May-06 4:16
NameNotTaken25-May-06 4:16 
AnswerRe: Odd question - Datasets and Sprocs Pin
Colin Angus Mackay25-May-06 10:03
Colin Angus Mackay25-May-06 10:03 
GeneralRe: Odd question - Datasets and Sprocs Pin
NameNotTaken25-May-06 10:07
NameNotTaken25-May-06 10:07 
GeneralRe: Odd question - Datasets and Sprocs Pin
Colin Angus Mackay25-May-06 10:21
Colin Angus Mackay25-May-06 10:21 
QuestionRetrival of Table Information in SQL Server Pin
GBal25-May-06 3:42
GBal25-May-06 3:42 
AnswerRe: Retrival of Table Information in SQL Server Pin
albCode25-May-06 4:12
albCode25-May-06 4:12 
GeneralRe: Retrival of Table Information in SQL Server Pin
GBal25-May-06 21:31
GBal25-May-06 21:31 
GeneralRe: Retrival of Table Information in SQL Server Pin
sathish s25-May-06 21:40
sathish s25-May-06 21:40 
Questionurgent help needed Pin
Naveed Kamboh25-May-06 0:53
Naveed Kamboh25-May-06 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.