Kbase P104614: When coding a SQL INSERT statement, how do you set a columns value to null?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/24/2005 |
|
Status: Unverified
GOAL:
When coding a SQL INSERT statement, how do you set a columns value to null?
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
FIX:
When building a string which contains an INSERT statement that will be sent to either an ODBC or JDBC driver to execute the way to set a fields value to null (i.e. the 4GL Unknown value) is to use the word NULL as follows:
INSERT INTO PUB.SomeTable (SomeCharField, SomeLogicalField, SomeDateField) VALUES(NULL, NULL, NULL);