Article View: borland.public.interbase.sql
Article #11116Re: CONVERT A NULL VALUE
From: Martijn Tonies
Date: Fri, 13 Dec 2002 10:15
Date: Fri, 13 Dec 2002 10:15
30 lines
1649 bytes
1649 bytes
Hi Richard, > a simple insert statement: > insert into mytest1 (id, text) values ((select max(id)+1 from mytest1), > 'HALLO') This isn't multi-user safe. > but if the table is empty this doent work because id is the primary key. > how can i convert the NULL result into a valid numic value. NULL isn't a valid numerical value - it's a state, the state of "unknown". > (i dont want to use generators) Why not? This really is the best way to go. -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase & Firebird Firebird Workbench - the developer tool for Firebird Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object."
Technical Details
Message-ID:
<3df9b283@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!feedme.news.mediaways.net!news.uni-x.net!newsgroups.borland.com!not-for-mailReferences:
<3df9a8cf@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,9d535b05926d029a X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-12-13 02:15:42 PST From: "Martijn Tonies" <m.tonies@upscene_remove.com> Newsgroups: borland.public.interbase.sql References: <3df9a8cf@newsgroups.borland.com> Subject: Re: CONVERT A NULL VALUE Date: Fri, 13 Dec 2002 11:15:14 +0100 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 212.238.179.102 Message-ID: <3df9b283@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039774339 212.238.179.102 (13 Dec 2002 02:12:19 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!feedme.news.mediaways.net!news.uni-x.net!newsgroups.borland.com!not-for-mail