List:MaxDB« Previous MessageNext Message »
From:Elke Zabach Date:April 28 2003 5:20am
Subject:RE: IDENTITY_INSERT OFF?
View as plain text  
Erik Myllymaki wrote:

> 
> Is there an equivalent to MSSQL Server's SET IDENTITY_INSERT 
> OFF on sapdb
> SERIAL columns?
> 
> The context is, I am dynamically creating SQL statements through a web
> application, so would rather perform:
> 
> CONNECT
> DELETE from table1 where pid = 99999
> 
> INSERT table1(pid,x,y,z) values(99999,1,2,3)
> 
> COMMIT
> 
> instead of
> 
> UPDATE table1 x=1,y=2,z=3 where pid = 99999

Fine, where is the problem? 
Or did you mean, than one of those columns
mentioned : pid, x, y, or z is a SERIAL-column?
(If you had written this...)

But where is the problem then?
As the reference manual implies, one can insert rows specifying
the serial-value one would like to have. Therefore your INSERT
should work without any option-setting or unsetting.

Elke
SAP Labs Berlin

Thread
IDENTITY_INSERT OFF?Erik Myllymaki27 Apr
RE: IDENTITY_INSERT OFF?Elke Zabach28 Apr
  • ODBC/WIN: Tracing SQL Execution TimeGerald Nowitzky28 Apr
  • Re: IDENTITY_INSERT OFF?Erik Myllymaki29 Apr