Re: 30 tables I need the Same 5 fields from wach of them!!!
From: Matt_Fairfield (MattFairfield_at_discussions.microsoft.com)
Date: 01/06/05
- Next message: Hasan: "Can I pick several unique in one feild and using dates remove any."
- Previous message: Rick Brandt: "Re: Can a query return a result greater than 255 characters?"
- In reply to: Brendan Reynolds: "Re: 30 tables I need the Same 5 fields from wach of them!!!"
- Next in thread: Matt_Fairfield: "Re: 30 tables I need the Same 5 fields from wach of them!!!"
- Messages sorted by: [ date ] [ thread ]
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
>
>
>
- Next message: Hasan: "Can I pick several unique in one feild and using dates remove any."
- Previous message: Rick Brandt: "Re: Can a query return a result greater than 255 characters?"
- In reply to: Brendan Reynolds: "Re: 30 tables I need the Same 5 fields from wach of them!!!"
- Next in thread: Matt_Fairfield: "Re: 30 tables I need the Same 5 fields from wach of them!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|