Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Multiple Inserts on a single statement
Mon, Mar 17 2014 5:49 PMPermanent Link

drm

yp designs

Avatar

Hi from Venezuela, I'm using DBISAM 4.29 with Delphi XE, my question is simple, I discover that I can use multiple updates on a single statement using this

UPDATE TABLENAME
  SET FIELDNAME = CASE ID
     WHEN 5 THEN 474
     WHEN 7 THEN 454564
     WHEN 36 THEN 14544554
  END
WHERE ID IN (5, 7, 36);

but I cannot use this

INSERT INTO TABLENAME (X,Y,Z) VALUES
(1,2,3),
(4,5,6),
(7,8,9);

why doesn't it work???

when I try to use this code DBISAM Engine returns an error telling that the sintaxis is incorrect, Is there a way to figure out this problem?

Thx a lot
 
Mon, Mar 17 2014 6:31 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

<drm> wrote in message
news:04BE797B-694D-4553-9685-FF53E43A8CD4@news.elevatesoft.com...
>
> INSERT INTO TABLENAME (X,Y,Z) VALUES
> (1,2,3),
> (4,5,6),
> (7,8,9);
>
> why doesn't it work???
>
> when I try to use this code DBISAM Engine returns an error telling that
> the sintaxis is incorrect, Is there a way to figure out this problem?
>
Hi from New Zealand Wink

I'm not a DBISAM4 user but with DBISAM3 the following would work ...



INSERT INTO TABLENAME (X,Y,Z) VALUES(1,2,3)
;
INSERT INTO TABLENAME (X,Y,Z) VALUES(4,5,6)
;
INSERT INTO TABLENAME (X,Y,Z) VALUES(7,8,9)
;

Hope that helps

Cheers

Jeff
--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz



Mon, Mar 17 2014 7:43 PMPermanent Link

drm

yp designs

Avatar

"Jeff Cook" wrote:

<drm> wrote in message
news:04BE797B-694D-4553-9685-FF53E43A8CD4@news.elevatesoft.com...
>
> INSERT INTO TABLENAME (X,Y,Z) VALUES
> (1,2,3),
> (4,5,6),
> (7,8,9);
>
> why doesn't it work???
>
> when I try to use this code DBISAM Engine returns an error telling that
> the sintaxis is incorrect, Is there a way to figure out this problem?
>
Hi from New Zealand Wink

I'm not a DBISAM4 user but with DBISAM3 the following would work ...



INSERT INTO TABLENAME (X,Y,Z) VALUES(1,2,3)
;
INSERT INTO TABLENAME (X,Y,Z) VALUES(4,5,6)
;
INSERT INTO TABLENAME (X,Y,Z) VALUES(7,8,9)
;

Hope that helps

Cheers

Jeff
--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz


Yes dude, that would be the answer in several statements, but in advanced SQL you can insert multiple rows in one statement, but I guess in DBISAM it doesn't work or it is limited Frown
Wed, Mar 19 2014 10:01 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Yes dude, that would be the answer in several statements, but in advanced
SQL you can insert multiple rows in one statement, but I guess in DBISAM it
doesn't work or it is limited Frown>>

DBISAM is our older database engine product.  ElevateDB, our newer product,
supports multiple INSERT values within the same statement.

Tim Young
Elevate Software
www.elevatesoft.com
Image