Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread SQL Code valid?
Sun, Apr 15 2007 6:18 AMPermanent Link

"Ian Branch"
Hi Guys,

   Is the following SQL valid when loadedint TEDBQuery.SQL and followed by an
ExecSQL?

----
BEGIN;
INSERT INTO accounts
 (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
VALUES
 ("10100", "MOTOROLA CELLULAR WARRANTY", "WTY", 1, 1);

INSERT INTO accounts
 (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
VALUES
 ("10200", "TWO WAY WARRANTY", "WTY", 1, 1);

INSERT INTO accounts
 (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
VALUES
 ("10101", "CELLULAR TIME & MATERIAL", "T&M", 1, 0);

INSERT INTO accounts
 (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
VALUES
 ("10110", "CELLULAR SERVICE WARRANTY", "SVC", 0, 1);
COMMIT;
----

Regards,

Ian
Sun, Apr 15 2007 6:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


Nope - its a script which is unsupported just now. You'll need to process each statement individually.

Roy Lambert
Sun, Apr 15 2007 6:56 AMPermanent Link

"Ian Branch"
Roy Lambert wrote:

> Ian
>
>
> Nope - its a script which is unsupported just now. You'll need to process
> each statement individually.
>


Hi Roy,

   Bummer, I was afraid of that.  So much for that plan.  For now.

Regards,

Ian

--
Sun, Apr 15 2007 3:56 PMPermanent Link

Dave Harrison
Ian,
Can't you do the following?

INSERT INTO accounts
  (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
VALUES
  ("10100", "MOTOROLA CELLULAR WARRANTY", "WTY", 1, 1),
  ("10200", "TWO WAY WARRANTY", "WTY", 1, 1),
  ("10101", "CELLULAR TIME & MATERIAL", "T&M", 1, 0),
  ("10110", "CELLULAR SERVICE WARRANTY", "SVC", 0, 1);

This works in MySQL.

Dave
Sun, Apr 15 2007 4:36 PMPermanent Link

"Ian Branch"
Dave Harrison wrote:

> Ian,
> Can't you do the following?
>
> INSERT INTO accounts
>   (ACCTNUMB, ACCTDESC, JOB_CODE, TAXABLE, COSTASSELL)
> VALUES
>   ("10100", "MOTOROLA CELLULAR WARRANTY", "WTY", 1, 1),
>   ("10200", "TWO WAY WARRANTY", "WTY", 1, 1),
>   ("10101", "CELLULAR TIME & MATERIAL", "T&M", 1, 0),
>   ("10110", "CELLULAR SERVICE WARRANTY", "SVC", 0, 1);
>
> This works in MySQL.
>
> Dave

Hi Dave,

   Yup, works in MySQL but not in EDB, yet.

Regards,

Ian

--
Sun, Apr 15 2007 10:10 PMPermanent Link

"Ralf Bertoldi"
Ian Branch wrote:

>    Is the following SQL valid when loadedint TEDBQuery.SQL and followed
> by an ExecSQL?


a stored procedure would execute the statement...
something like this:

PREPARE stmt FROM 'INSERT INTO accounts (?,?,?,?,?)';
START TRANSACTION;
EXECUTE stmt USING '10100', 'MOTOROLA CELLULAR WARRANTY', 'WTY', 1, 1;
EXECUTE stmt USING '10200', 'TWO WAY WARRANTY', 'WTY', 1, 1;
EXECUTE stmt USING '10101', 'CELLULAR TIME & MATERIAL', 'T&M', 1, 0;
EXECUTE stmt USING '10110', 'CELLULAR SERVICE WARRANTY', 'SVC', 0, 1;
COMMIT;
UNPREPARE stmt;

but I think that's not what you've been looking for..

regards
ralf
Mon, Apr 16 2007 5:26 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ian,

<< Is the following SQL valid when loadedint TEDBQuery.SQL and followed by
an ExecSQL? >>

As already indicated, support for scripts if forthcoming, but not available
yet.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image