PDA

View Full Version : Help with Maketable query



jamescol
08-26-2004, 10:11 PM
I'm hoping one of you Access gurus here can help this guy with a maketable query (Acc 97). I'm not proficient with this kind of query.

http://forums.techguy.org/t266291.html

Thanks,
James

TonyJollans
08-27-2004, 02:12 AM
Hi James,

It's hard to tell from the thread exactly what is going on but a couple of thoughts.

Where is the order being checked? What else (post-query) might affect it? When you run a Query it should order records according to the Order By in the query. When the results of that query are written to a table they are not explicitly ordered within that table. If you then look at that table the query no longer has anything to do with the sequence of the records and they may be displayed in any order. In effect (AFAIK) putting an Order By on a Make Table query is pointless - records in a table do not have any inherent order. If you want to process the records in the new table in a particular sequence you need to say so at the time you process them. Do the records show in the expected sequence when the query results are checked from query design?

Not directly related to the problem but, assuming his date fields are Date/Time datatypes there is no point in ordering separately on the year and month components - just order by on the date.

Anne Troy
08-27-2004, 02:15 AM
James: Do you know how many times I've wanted to do that? I'm glad you did it. If everyone thinks that it's appropriate to do that, I say we do it.

"THAT" meaning post a link from another forum where we're having trouble.

I think it's a cool idea.

TonyJollans
08-27-2004, 02:31 AM
I guess it depends on the forum. If the link works for everybody (and not just members of the linked to forum) then it seems fine to me.

Only thing is I wasn't sure where to post - here or there. I decided I have enough trouble keeping tabs on what I do as it is and that I'd probably forget to go back and check the tech support guy - I might forget to check here of course :)

jamescol
08-27-2004, 12:36 PM
Tony,
I was think the same thing about why the order matters if it's just another table. But I didn't ask the guy. Maybe he's displaying the table in a dataview as if it were a report.

I'm just not familiar with the maketable syntax to be much help either way.

James

jamescol
08-27-2004, 12:39 PM
James: Do you know how many times I've wanted to do that? I'm glad you did it. If everyone thinks that it's appropriate to do that, I say we do it.

"THAT" meaning post a link from another forum where we're having trouble.

I think it's a cool idea.

You know, I didn't even think about the appropriateness of my post here. I was just thinking of the best way to help the guy, and didn't figure TSM would like it if I told him to check here for the "cream of the crop" Access coders. :)

James

TonyJollans
08-27-2004, 02:16 PM
I just posted there as well. The questioner says it's sorted all by itself - I'll see if he comes back.