Solved

XML inserts to a table with a time stamp

Posted on 2002-03-21
3
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

691 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