Re: SQL question

From: Matt Marrow [LOGICA][dc] <mmarrow_at_zeus>
Date: 1996/08/27
Message-ID: <4vv9i9$8mm_at_zeus.mobile.com>#1/1


I don't quite understand your question, but hopefully this will solve what I *think* you're trying to do:

                                        
INSERT INTO <whatever>                    
VALUES (<your_values>                         
WHERE NOT EXISTS ( SELECT 'X'            
                   FROM <whatever>     
                   WHERE integer_column = <value you're inserting>
                 );                         
                                           
Hope this helps                         
                                        
Matt.    mmarrow_at_pacbell.mobile.com    
                                          
Keith Shave (kshave_at_MBnet.MB.CA) wrote:

: I want to insert a record into a regular database table. I simply want
: to check if an integer value is already inserted, and if not, insert the record.Is there a simple way to do this. I am building web pages, and when I try
: a 'select into', and the value isn't actually in the table, I get an error
: loading the page. I thought a non-existent table value would return a
: SQLCODE=100. I tried using this, but the page still will not load. The page
: only loads when a valid integer is selected from the table.
 

: Any ideas?
: --
: kshave_at_mbnet.mb.ca -------
Received on Tue Aug 27 1996 - 00:00:00 CEST

Original text of this message