Fwd: Re: Host Variables Insertion
Posted in 1998
}From johnl@informix.com Wed Jan 7 13:35:50 1998 }Received: from osprey (osprey.informix.com [158.58.28.18]) by kingcrab.informix.com (8.8.5/8.7.3) with SMTP id NAA12031; Wed, 7 Jan 1998 13:35:49 -0800 (PST) }Received: from anubis.informix.com by osprey (5.x/SMI-SVR4) } id AA23165; Wed, 7 Jan 1998 13:35:48 -0800 }Received: from localhost by anubis.informix.com (SMI-8.6/SMI-SVR4) } id NAA11194; Wed, 7 Jan 1998 13:35:48 -0800 }Date: Wed, 7 Jan 1998 13:35:48 -0800 (PST) }From: Jonathan Leffler <johnl@informix.com> }X-Sender: johnl@anubis }To: PRAVEEN MOHANAN <praveen_mohanan@hotmail.com> }Cc: informix-list@rmy.emory.edu }Subject: Re: Host Variables Insertion }In-Reply-To: <19980107205837.19854.qmail@hotmail.com> }Message-Id: <Pine.GSO.3.96.980107133133.22644M-100000@anubis> }Mime-Version: 1.0 }Content-Type: TEXT/PLAIN; charset=US-ASCII } }On Wed, 7 Jan 1998, PRAVEEN MOHANAN wrote: }> I am trying to insert data into a table and the stmt is }> EXEC SQL INSERT INTO TABLE abc (field1) VALUES (:host1 + :host2); }> Is the stmt valid? } }No. } }> But it works with pro*c. } }All sorts of Pro*C extensions work in Pro*C but not in Informix. There }are lots of Informix extensions that work in Informix but won't work in }Pro*C. The ANSI SQL standard does not allow the notation you are trying }to use; Informix happens to hew closer to the standard than Orrible does }in this area. } }> It gives me error 42000 : Syntax error or access violation; } }That's a syntax error by any other name! In ANSI SQL, and in Informix }SQL, you can only use simple variables or constants for each value in }the VALUES list of an INSERT statement. } }Yours, }Jonathan Leffler (johnl@informix.com) #include <witticism.h> } } Thanks... No Wonder I like working in Informix so much. It really lets u use the brain. Regards, Praveen ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com