If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Increment a single column?
Just wondering if there is a simple way to do this...
I have an MS Access table that I'm using from an ASP page. It's quite simple... Just one row with six columns. I want to be able to specify a column and increment the value in that column. Something like this.. I want to increment the value in column three: UPDATE Counters Set [3] = [3]+1 ; Thanks! |
#2
|
|||
|
|||
Do you not know the name of the field? As far as I know, you cannot refer to
a field by its ordinal position in a SQL statement, other than in the ORDER BY clause. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Noozer" wrote in message news:Jcbse.4410$El.3955@pd7tw1no... Just wondering if there is a simple way to do this... I have an MS Access table that I'm using from an ASP page. It's quite simple... Just one row with six columns. I want to be able to specify a column and increment the value in that column. Something like this.. I want to increment the value in column three: UPDATE Counters Set [3] = [3]+1 ; Thanks! |
#3
|
|||
|
|||
Can you alter the table structure to become 2 columns, with 6 rows. Use 1
column for the Column Names you are currently using, and the second as your counter. Then you are able to identify which row to update. Sharkbyte "Douglas J Steele" wrote: Do you not know the name of the field? As far as I know, you cannot refer to a field by its ordinal position in a SQL statement, other than in the ORDER BY clause. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Noozer" wrote in message news:Jcbse.4410$El.3955@pd7tw1no... Just wondering if there is a simple way to do this... I have an MS Access table that I'm using from an ASP page. It's quite simple... Just one row with six columns. I want to be able to specify a column and increment the value in that column. Something like this.. I want to increment the value in column three: UPDATE Counters Set [3] = [3]+1 ; Thanks! |
#4
|
|||
|
|||
I was able to modify my coding to pass proper column names instead of their
ordinal index. It's working fine now. "Sharkbyte" - wrote in message ... Can you alter the table structure to become 2 columns, with 6 rows. Use 1 column for the Column Names you are currently using, and the second as your counter. Then you are able to identify which row to update. "Douglas J Steele" wrote: Do you not know the name of the field? As far as I know, you cannot refer to a field by its ordinal position in a SQL statement, other than in the ORDER BY clause. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Noozer" wrote in message news:Jcbse.4410$El.3955@pd7tw1no... Just wondering if there is a simple way to do this... I have an MS Access table that I'm using from an ASP page. It's quite simple... Just one row with six columns. I want to be able to specify a column and increment the value in that column. Something like this.. I want to increment the value in column three: UPDATE Counters Set [3] = [3]+1 ; Thanks! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how can i subtract single integer value from the entire column | naga s chintala | Charts and Charting | 5 | May 1st, 2005 01:38 AM |
Table Design | A. Williams | Database Design | 3 | April 29th, 2005 07:02 PM |
Take data in a single column of access and split it into two colum | Accesschallenged | General Discussion | 10 | March 8th, 2005 09:03 PM |
unable to repair inobox | Sudheer Mumbai | General Discussion | 1 | February 20th, 2005 11:55 AM |
How can I combine IF, COLUMN, and LARGE formulas in a single cell? | Liam Judd | Worksheet Functions | 1 | November 17th, 2004 07:52 AM |