Solved

XML inserts to a table with a time stamp

Posted on 2002-03-21
3
276 Views
Last Modified: 2012-08-14
OK XML/SQL gurus, answer this...

I created a simple table :
A int
B datetime
C money

and used OPENXML to insert test values using a simple XML string like

<Order A="33" B="21-Dec-2000" C="78.7"/>

No problem. I noticed that any fields not matched against attribute names don't get set. fair enough.
Then I added a timestamp field to the table. I got this error

Server: Msg 273, Level 16, State 1, Line 7
Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with a default of NULL for the timestamp column.

I am not even trying to insert a value to time stamp. I tried the WITH clause and specific column names , but
that didn't work.

Any experts out there ?

0
Comment
Question by:josereyes
3 Comments
 
LVL 3

Accepted Solution

by:
mgmanoj earned 50 total points
ID: 6906322
Go to table editor allow null in timestamp column or put default value in that.

Manoj
0
 

Expert Comment

by:CleanupPing
ID: 9280716
josereyes:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question