Solved

Getting the row I just inserted

Posted on 2000-02-17
2
150 Views
Last Modified: 2013-12-24
Using CFQUERY and SQL, how do I get the row I just inserted - I have a column that is an AutoNumber, and I need to get the number of the record I just added so I can refer to it in other tables. Help!
0
Comment
Question by:Arachn1d
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
FRehman earned 50 total points
ID: 2534350
<cfquery name="GetName" datasource="#DSN#">
select max(columnid) as maximum from table1
</cfquery>
use this columnid for another table
<cfquery name="hello" datasource="#DSN#">
select * from table2
where table2.testid=#GetName.maximum#
</cfquery>
this is you requrment
0
 

Author Comment

by:Arachn1d
ID: 2536263
Not really what I was looking for, but I came up with an alternative in the mean time.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question