Computing.Net > Forums > Database > Update query shift down by 1

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Update query shift down by 1

Reply to Message Icon

Name: bigwebidea
Date: August 8, 2008 at 08:02:43 Pacific
OS: Windows XP
CPU/Ram: 1gb
Product: HP
Comment:

I'm using MS Access trying to create an update query that shifts the data down by 1 row.
Example:
field1
data 1
data. 2
data(3)

UPDATE DataTable SET DataTable.field2 = field1 [shifted down by 1 row];

field2
[empty]
data 1
data. 2
data(3)

It would also be great if I could reformat the data at the same time.

Example:
field1
data 1
data. 2
data(3)

field2
[empty]
data-1.html
data-2.html
data-3.html

Any help would be appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: Elinor
Date: August 11, 2008 at 13:04:51 Pacific
Reply:

Hi,

Just wondering whether you could give a little more information about the table(s).
For instance, are both those fields in the same table? And what's your primary key and its values?

Thanks,

Elinor

Elinor Hurst
http://elinorhurst.blogspot.com


0

Response Number 2
Name: bigwebidea
Date: August 11, 2008 at 13:22:11 Pacific
Reply:

Yes, both fields are in the same table. Currently, I have it setup in a single table. The primary key is a different field and is a 7 digit number, but if I need to I can change any of this if there is a way to make it work.

There are over 160,000 records

Thanks!


0

Response Number 3
Name: Elinor
Date: August 19, 2008 at 08:15:27 Pacific
Reply:

Honestly, I don't think this can be done using just SQL. :S

Elinor Hurst
http://elinorhurst.blogspot.com


0

Response Number 4
Name: bigwebidea
Date: August 19, 2008 at 13:45:36 Pacific
Reply:

What about the second portion, simply removing all special characters and spaces?

Example:
From:
data 1
data. 2
data(3)

To:
data1
data2
data3


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


IFF statement Combine 2 reports in SQL



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: Update query shift down by 1

Update query problem www.computing.net/answers/dbase/update-query-problem/563.html

querying dates www.computing.net/answers/dbase/querying-dates/662.html

ACCESS Record Merge www.computing.net/answers/dbase/access-record-merge/293.html