The problem is that you are trying to insert into the same table that you
are selecting from. CAST works OK in Local SQL but not inserting back into
a table - you can imagine a scenario where, without a WHERE clause - as id
the case with the SQL below the insert becomes an infinite loop.


-----Original Message-----
Behalf Of Mark Derricutt
Sent: Thursday, 18 March 1999 16:34
To: Multiple recipients of list delphi
Subject: Re: [DUG]: SQL Query...

Mark Derricutt wrote:

> Unfortunately I get "Type Mismatch in Expression", I assume this is
> possibly due to attempting to hardcode the value of ConfigurationID.  If
> I run the SELECT portion on its own it works ok, but returns 1 as 1.0

Ok, looking in my "SQL for Dummies" book I found I can get around this

INSERT INTO CalcMethod ( ConfigurationID, Object, Attribute, Method,
Description )
         SELECT CAST(1 AS INTEGER), Object, Attribute, Method, Description FROM

and casting 1 to an INTEGER.  Works fine when I just do the SELECT, so I
know LocalSQL/Paradox lets me do CASTing, but when I try the INSERT INTO
I now get "Capability not supported".  Does LocalSQL not allow me to use
INSERT INTO and SELECT in the same query?


Mark Derricutt                     | Chalice of Blood
Software Developer                 | New Zealand Christian Music News
Auckland, New Zealand              |
[EMAIL PROTECTED]                | UIN: 1934853
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]

    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]

Reply via email to