Ask a Question related to Coldfusion Database Access, Design and Development.
-
Monizzle #1
How to Create an Auto-Number in a Query?
I want to create a verity search collection by indexing the contents of a Union
Query. My Union query collects data from multiple databases/DSNs.
I believe the cfindex function (used to create a verity collection) needs a
primary key from query. However, I do not know how to create an auto-number
primary key in a query.
Could someone offer some help?
For reference, here?s the cfindex tag:
<cfindex collection="myCollection" action="update" type="custom" body="title,
article_body" key="autonumber_id" title="title" query="union_articles">
Monizzle Guest
-
Using Data Merge with Auto Page Number
InDesign CS2, Mac OS X.4.8, 1GB RAM, Xerox Phaser 8550 printer. I'm producing a 10-14 page newsletter twice a month for a small local group. I've... -
Auto generate unique order number sequential
Hi: I need help on how to code in a CFFORM an order number. This order number must be auto generated, be unique and sequential. By the way I'm... -
How to get back the current count of a auto incrementing number.
hi How to get the current value of a auto incrementing number generated using CREATE SEQUENCE seqname START 1 Is there any way and if yes... -
Auto-create thumbs?
I've seen a couple of ASP sites that allow the upload of images and then automatically create a thumb-nail equivalent of the image. Normally, I've... -
Auto Increment a number field
I have a memo field (History) and a number field (Count). What I require is that when the history field is updated then the count field will... -
Dan Bracuk #2
Re: How to Create an Auto-Number in a Query?
In your union query, select the constant 10000 as an extra field. Then loop through the query and set this field to the current rownumber.
Dan Bracuk Guest
-
Monizzle #3
Re: How to Create an Auto-Number in a Query?
Dan,
Not sure I understand. Are you suggesting that I establish an alias column in
my union query and then cfloop over it, using a SQL update query to update the
Union results to #currentrow#?
I thought I could only update tables, not queries.
You must mean that I can place a loop in my SQL statement, but I have no clue
how to do this.
If you could get me started it would be much appreciated.
BTW, thanks for being such great presence on these forums. I?m sure you?re
keeping ColdFusion alive for a lot of folks.
Monizzle Guest



Reply With Quote

