0

I got error similar to this: Unitils dataset - insert into sybase datetime column

My case is that need to insert a date value that is empty. Empty String does not do the thing. Can anyone help me?

Community
  • 1
  • 1
mjgirl
  • 1,214
  • 7
  • 24
  • 42

1 Answers1

0

If you leave your date element off of the row definition, it won't add anything in that field. So with a table definition of:

CREATE TABLE Table (
  id          INTEGER,
  name        VARCHAR,
  birthDate   DATE
);

create a row like this:

<table id="3" name="Katie"/>
<table id="4" name="Christie" birthDate="2001-04-22"/>

to load an empty date in ID 3.

Jeff French
  • 1,151
  • 1
  • 12
  • 19