Re: 30 tables I need the Same 5 fields from wach of them!!!

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Matt_Fairfield (MattFairfield_at_discussions.microsoft.com)
Date: 01/06/05


Date: Thu, 6 Jan 2005 06:05:07 -0800

hey Brendan
Thanks for your help i will give it a try!

Nope you dont have to tell me its bad design i said the same thing but you
have to work with what was developed!!!!
I'll let ya know

"Brendan Reynolds" wrote:

> You need a union query ...
>
> SELECT Field1, Field2 FROM FirstTable
> UNION SELECT Field1, Field2 FROM SecondTable
> etc., etc., etc.
>
> If the table names are numbered, something like Table1, Table2, Table3 etc.,
> it might be possible to write some code to build the SQL statement, and it
> might be a little faster, or at least a little less tedious, than typing 30
> SELECT statements.
>
> Do you need me to tell you that this is not a good database design?
>
> --
> Brendan Reynolds (MVP)
> http://brenreyn.blogspot.com
>
> The spammers and script-kiddies have succeeded in making it impossible for
> me to use a real e-mail address in public newsgroups. E-mail replies to
> this post will be deleted without being read. Any e-mail claiming to be
> from brenreyn at indigo dot ie that is not digitally signed by me with a
> GlobalSign digital certificate is a forgery and should be deleted without
> being read. Follow-up questions should in general be posted to the
> newsgroup, but if you have a good reason to send me e-mail, you'll find
> a useable e-mail address at the URL above.
>
>
> "Matt_Fairfield" <MattFairfield@discussions.microsoft.com> wrote in message
> news:A55F0E42-313A-40BA-A706-600445293004@microsoft.com...
> >I have 30 different tables and i need to pull the date, time,ID, plus a
> > couple other columns from each.
> > Can i do it in one step??
> > So i want to tell the query to go pick these 5 columns from all the
> > different tables.
> > Thanks Matt
>
>
>



Relevant Pages

  • Re: Wildcard Criteria
    ... Many thanks for that Brendan. ... > character and not as a wildcard. ... > GlobalSign digital certificate is a forgery and should be deleted without ... >> records which DO NOT have an asterix at the start of the field. ...
    (microsoft.public.access.queries)
  • Re: Text-to-Speech problem
    ... Hi Brendan: ... > versions of Windows is different to the version included in Windows 2000 and ... > relevant newsgroup. ... > GlobalSign digital certificate is a forgery and should be deleted without ...
    (microsoft.public.data.ado)
  • Re: Invalid argument??
    ... Thanks very much Brendan, you were right, it works now! ... >Public Sub TestDbSeeChanges() ... >GlobalSign digital certificate is a forgery and should ... >a useable e-mail address at the URL above. ...
    (microsoft.public.access.formscoding)
  • Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)
    ... > Brendan Reynolds ... > GlobalSign digital certificate is a forgery and should be deleted without ... >> MsgBox Me.Recordset Is Nothing ... >> End Sub ...
    (microsoft.public.access.formscoding)
  • Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)
    ... > Brendan Reynolds ... > GlobalSign digital certificate is a forgery and should be deleted without ... >> MsgBox Me.Recordset Is Nothing ... >> End Sub ...
    (microsoft.public.access.forms)