T
tiger0268 via AccessMonster.com
I am not very experienced in SQL, so I need some help. Alright, typically
when I create an update query, I do a select query and get my desired results
and then convert it over to an Update query; however, this time I have run
into a few problems. I know it is simple, I just can't figure it out. Below
is my select query:
SELECT MAIN.PostID, Count(MAIN.PostID) AS PostCount, MAIN.Title, First(MAIN.
PostDate) AS FirstOfPostDate, MAIN.PostNumber, MAIN.Post
FROM MAIN
GROUP BY MAIN.PostID, MAIN.Title, MAIN.PostNumber;
Basically, I have the following scenario:
ID Title Date PostNumber Post
1 string1 Date1 1 Post1
1 string1 Date2 1 Post2
2 string2 Date3 1 Post3
2 string2 Date4 1 Post4
3 string3 Date5 1 Post5
3 string3 Date6 1 Post6
3 string3 Date7 1 Post7
....
I want it to look like this:
ID Title Date PostNumber Post Expr:
Count
1 string1 Date1 1 Post1
2
2 string2 Date3 1 Post3
2
3 string3 Date5 1 Post5
3
And I want to assign the CountValue to the PostNumber.
ID Title Date PostNumber Post Expr:
Count
1 string1 Date1 2 Post1
2
2 string2 Date3 2 Post3
2
3 string3 Date5 3 Post5
3
when I create an update query, I do a select query and get my desired results
and then convert it over to an Update query; however, this time I have run
into a few problems. I know it is simple, I just can't figure it out. Below
is my select query:
SELECT MAIN.PostID, Count(MAIN.PostID) AS PostCount, MAIN.Title, First(MAIN.
PostDate) AS FirstOfPostDate, MAIN.PostNumber, MAIN.Post
FROM MAIN
GROUP BY MAIN.PostID, MAIN.Title, MAIN.PostNumber;
Basically, I have the following scenario:
ID Title Date PostNumber Post
1 string1 Date1 1 Post1
1 string1 Date2 1 Post2
2 string2 Date3 1 Post3
2 string2 Date4 1 Post4
3 string3 Date5 1 Post5
3 string3 Date6 1 Post6
3 string3 Date7 1 Post7
....
I want it to look like this:
ID Title Date PostNumber Post Expr:
Count
1 string1 Date1 1 Post1
2
2 string2 Date3 1 Post3
2
3 string3 Date5 1 Post5
3
And I want to assign the CountValue to the PostNumber.
ID Title Date PostNumber Post Expr:
Count
1 string1 Date1 2 Post1
2
2 string2 Date3 2 Post3
2
3 string3 Date5 3 Post5
3