🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11114

CONVERT A NULL VALUE

#11114
From: Dolleschall Richard
Date: Fri, 13 Dec 2002 09:30
11 lines
1306 bytes
a simple insert statement:
insert into mytest1 (id, text) values ((select max(id)+1 from mytest1),
'HALLO')

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.

(i dont want to use generators)

richard
Technical Details
Message-ID: <3df9a8cf@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!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,9d535b05926d029a,start
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-13 01:39:15 PST
From: "Dolleschall Richard" <rad@elite.at>
Newsgroups: borland.public.interbase.sql
Subject: CONVERT A NULL VALUE
Date: Fri, 13 Dec 2002 10:30:16 +0100
Lines: 13
Organization: elite solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.46.134.36
Message-ID: <3df9a8cf@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1039771855 62.46.134.36 (13 Dec 2002 01:30:55 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail