> that wont work - db would look for a field with the generated UUID as a
> name... you need to have a subselect:
>
[snip]
> SELECT (select '#CreateUUID()#') as MyUUID, name, VersionID + 1
nope, you don't need a "subselect". in fact for some DBs (say sql server)
you don't even need to have the i
.
(The incremented version id also needs to change, but this can be done by +1
it seems, thank you)
>From: Daniel Lancelot <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: RE: Problem with Insert Using Select
>Date: Fri,
.
(The incremented version id also needs to change, but this can be done by +1
it seems, thank you)
>From: Daniel Lancelot <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: RE: Problem with Insert Using Select
>Date: Fri,
ld work...
HTH
Dan
-Original Message-
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: 09 February 2001 05:49
To: CF-Talk
Subject: RE: Problem with Insert Using Select
You answered your own question in your last paragraph - you _can_ put
constants and expressions in your select statement.
You answered your own question in your last paragraph - you _can_ put
constants and expressions in your select statement.
Try something like this:
INSERT into tbl (MyUUID, name, VersionID)
SELECT '#CreateUUID()#', name, VersionID + 1
FROM tbl
WHERE MYUUID = '#form.MyUUID#'
Bob
-Original Me
5 matches
Mail list logo