A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Increment a single column?



 
 
Thread Tools Display Modes
  #1  
Old June 16th, 2005, 10:00 AM
Noozer
external usenet poster
 
Posts: n/a
Default 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  
Old June 16th, 2005, 11:02 AM
Douglas J Steele
external usenet poster
 
Posts: n/a
Default

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  
Old June 16th, 2005, 11:19 PM
Sharkbyte
external usenet poster
 
Posts: n/a
Default

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  
Old June 17th, 2005, 06:33 AM
Noozer
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 05:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.