2001 4:50 PM
To: CF-Talk
Subject: RE: SQL INSERTS - return ID
I had the same problem a few days ago and that is the way i solved with
SELECT @@IDENTITY
then you are able to retrieve the id and even feed it to another stored proc
by specifying the name of stored proc
ex.
#getreal.id#
what doe
: mjohnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 10:23 AM
To: CF-Talk
Subject: RE: SQL INSERTS - return ID
Using SQL Server you can either do it with a stored procedure or do
something like this.
Mark
-Original Message-
From: Matt Eschenbaum [mailto:[EMAIL PROTECTED
Using SQL Server you can either do it with a stored procedure or do
something like this.
Mark
-Original Message-
From: Matt Eschenbaum [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 4:36 PM
To: CF-Talk
Subject: SQL INSERTS - return ID
Anyone know a trick to return the ID of
Create an insert trigger...
CREATE TRIGGER GetID ON [Name of your table]
FOR INSERT
AS
SELECT [Name of your ID column] FROM inserted
-Rich
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.c
way of doing
>things, that I'm un-aware of... though, the above has worked for me on many
>occasions...
>
>Erik Yowell
>
>-Original Message-
>From: Matt Eschenbaum [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 23, 2001 7:36 PM
>To: CF-Talk
>Subject: SQL INS
-Original Message-
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 5:57 PM
To: CF-Talk
Subject: Re: SQL INSERTS - return ID
select max(id) as maxID from tablename
- Original Message -
From: "Matt Eschenbaum" <[EMAIL PROTECTED]>
To: &qu
ROTECTED]>
> Sent: Monday, April 23, 2001 6:36 PM
> Subject: SQL INSERTS - return ID
>
>
> > Anyone know a trick to return the ID of a record just Inserted into a
> table?
> >
> > Sincerely,
> >
> > Matthew M. Eschenbaum
> > Alla
select max(id) as maxID from tablename
- Original Message -
From: "Matt Eschenbaum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 6:36 PM
Subject: SQL INSERTS - return ID
> Anyone know a trick to return the ID of
Eschenbaum [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 7:36 PM
To: CF-Talk
Subject: SQL INSERTS - return ID
Anyone know a trick to return the ID of a record just Inserted into a table?
Sincerely,
Matthew M. Eschenbaum
Allaire Certified Professional
DevTech Inc.
[EMAIL PROTECTED]
20
Anyone know a trick to return the ID of a record just Inserted into a table?
Sincerely,
Matthew M. Eschenbaum
Allaire Certified Professional
DevTech Inc.
[EMAIL PROTECTED]
206.956.0888
www.dev-tech.com
~~
Structure your ColdFusion code with Fu
10 matches
Mail list logo