
28-Jul-2006, 08:00 AM
|  | Guest | | | | | | | | | | Can't figure how to do a query Hi everybody, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9260-cant-figure-how-to-do-query.html
I am quite stumped on how to write a query. I have two tables that hold
securites for different periods I need to combine both into one table but the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
twist is that they can have different securities in each table. A short
example would be.
Table 1
Security 9/30/2005Market_value
IBM 1000
Microsoft 2000
XYZ 3000
Table 2
Security 12/31/2005Market_value
IBM 1500
Microsoft 2500
America Fund 3000
The results I would like would be
Table 1
Security 9/30/2005Market_value 12/31/2005Market_value
IBM 1000 1500
Microsoft 2000 2500
XYZ 3000
America Fund 3000
The tables show that XYZ was dropped after 9/31/2005 and America Funds was
brought in. I have struggled with this query for a couple of days. Any help
would be appreciated.
Jones
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
28-Jul-2006, 08:00 AM
|  | Guest | | | | | | | | | | Re: Can't figure how to do a query Sorry to seem blunt, but the problem is that your table isn't properly
normalized.
Each company should represent a separate row in a table, not a separate
column on a common row. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
Jeff Conrad has a good set of resources related to table design at http://home.bendbroadband.com/conrad...abaseDesign101
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Jones Barton" wrote in message
news:0F33898B-6B68-44E6-A321-D053D6B00F20@microsoft.com... Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
> Hi everybody,
> I am quite stumped on how to write a query. I have two tables that hold
> securites for different periods I need to combine both into one table but
the
> twist is that they can have different securities in each table. A short
> example would be.
>
> Table 1
> Security 9/30/2005Market_value
> IBM 1000
> Microsoft 2000
> XYZ 3000
>
> Table 2
> Security 12/31/2005Market_value
> IBM 1500
> Microsoft 2500
> America Fund 3000
>
> The results I would like would be
>
> Table 1
> Security 9/30/2005Market_value 12/31/2005Market_value
> IBM 1000 1500
> Microsoft 2000 2500
> XYZ 3000
> America Fund 3000
>
>
> The tables show that XYZ was dropped after 9/31/2005 and America Funds was
> brought in. I have struggled with this query for a couple of days. Any
help
> would be appreciated.
>
> Jones
>
>
>
>
> | 
28-Jul-2006, 08:00 AM
|  | Guest | | | | | | | | | | Re: Can't figure how to do a query Douglas, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
I appreciate your honesty, With that being said, I don't have any control
on how I get the data, Is there any way to accomplish my hopeful outcome
with a query?
Jones
"Douglas J Steele" wrote:
> Sorry to seem blunt, but the problem is that your table isn't properly
> normalized.
>
> Each company should represent a separate row in a table, not a separate
> column on a common row.
>
> Jeff Conrad has a good set of resources related to table design at
> http://home.bendbroadband.com/conrad...abaseDesign101
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Jones Barton" wrote in message
> news:0F33898B-6B68-44E6-A321-D053D6B00F20@microsoft.com...
> > Hi everybody,
> > I am quite stumped on how to write a query. I have two tables that hold
> > securites for different periods I need to combine both into one table but
> the
> > twist is that they can have different securities in each table. A short
> > example would be.
> >
> > Table 1
> > Security 9/30/2005Market_value
> > IBM 1000
> > Microsoft 2000
> > XYZ 3000
> >
> > Table 2
> > Security 12/31/2005Market_value
> > IBM 1500
> > Microsoft 2500
> > America Fund 3000
> >
> > The results I would like would be
> >
> > Table 1
> > Security 9/30/2005Market_value 12/31/2005Market_value
> > IBM 1000 1500
> > Microsoft 2000 2500
> > XYZ 3000
> > America Fund 3000
> >
> >
> > The tables show that XYZ was dropped after 9/31/2005 and America Funds was
> > brought in. I have struggled with this query for a couple of days. Any Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
> help
> > would be appreciated.
> >
> > Jones
> >
> >
> >
> >
> >
>
>
> | 
28-Jul-2006, 08:01 AM
|  | Guest | | | | | | | | | | Re: Can't figure how to do a query What are the names of the fields in your table? You might be able to write a
query that normalizes the data, and then use that query as the basis for
subsequent queries.
--
Doug Steele, Microsoft Access MVP Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260 http://I.Am/DougSteele
(no private e-mails, please)
"Jones Barton" wrote in message
news:9FBA5373-CCB6-472D-A310-732D8E48D8D4@microsoft.com...
> Douglas,
>
> I appreciate your honesty, With that being said, I don't have any control
> on how I get the data, Is there any way to accomplish my hopeful outcome
> with a query?
>
> Jones
>
> "Douglas J Steele" wrote:
>
>> Sorry to seem blunt, but the problem is that your table isn't properly
>> normalized.
>>
>> Each company should represent a separate row in a table, not a separate Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
>> column on a common row.
>>
>> Jeff Conrad has a good set of resources related to table design at
>> http://home.bendbroadband.com/conrad...abaseDesign101
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Jones Barton" wrote in message
>> news:0F33898B-6B68-44E6-A321-D053D6B00F20@microsoft.com...
>> > Hi everybody,
>> > I am quite stumped on how to write a query. I have two tables that
>> > hold
>> > securites for different periods I need to combine both into one table
>> > but
>> the
>> > twist is that they can have different securities in each table. A
>> > short
>> > example would be.
>> >
>> > Table 1
>> > Security 9/30/2005Market_value
>> > IBM 1000
>> > Microsoft 2000
>> > XYZ 3000
>> >
>> > Table 2
>> > Security 12/31/2005Market_value
>> > IBM 1500
>> > Microsoft 2500
>> > America Fund 3000
>> >
>> > The results I would like would be
>> >
>> > Table 1
>> > Security 9/30/2005Market_value 12/31/2005Market_value
>> > IBM 1000 1500
>> > Microsoft 2000 2500
>> > XYZ 3000
>> > America Fund 3000
>> >
>> >
>> > The tables show that XYZ was dropped after 9/31/2005 and America Funds
>> > was
>> > brought in. I have struggled with this query for a couple of days.
>> > Any
>> help
>> > would be appreciated.
>> >
>> > Jones
>> >
>> >
>> >
>> >
>> >
>>
>>
>> | 
28-Jul-2006, 08:01 AM
|  | Guest | | | | | | | | | | Re: Can't figure how to do a query Hi Douglas
In each table I have Fields named History_dte (date), Manager_long, Entity, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
Asset_Class, TotalMv
one table has 12/31/2005 data the other 09/30/2005 data in it.
Jones
"Douglas J. Steele" wrote:
> What are the names of the fields in your table? You might be able to write a
> query that normalizes the data, and then use that query as the basis for
> subsequent queries.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Jones Barton" wrote in message
> news:9FBA5373-CCB6-472D-A310-732D8E48D8D4@microsoft.com...
> > Douglas,
> >
> > I appreciate your honesty, With that being said, I don't have any control
> > on how I get the data, Is there any way to accomplish my hopeful outcome
> > with a query?
> >
> > Jones
> >
> > "Douglas J Steele" wrote:
> >
> >> Sorry to seem blunt, but the problem is that your table isn't properly
> >> normalized.
> >>
> >> Each company should represent a separate row in a table, not a separate
> >> column on a common row.
> >>
> >> Jeff Conrad has a good set of resources related to table design at
> >> http://home.bendbroadband.com/conrad...abaseDesign101
> >>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "Jones Barton" wrote in message
> >> news:0F33898B-6B68-44E6-A321-D053D6B00F20@microsoft.com...
> >> > Hi everybody,
> >> > I am quite stumped on how to write a query. I have two tables that
> >> > hold
> >> > securites for different periods I need to combine both into one table
> >> > but
> >> the
> >> > twist is that they can have different securities in each table. A
> >> > short
> >> > example would be.
> >> >
> >> > Table 1
> >> > Security 9/30/2005Market_value
> >> > IBM 1000
> >> > Microsoft 2000
> >> > XYZ 3000
> >> >
> >> > Table 2
> >> > Security 12/31/2005Market_value
> >> > IBM 1500
> >> > Microsoft 2500
> >> > America Fund 3000
> >> >
> >> > The results I would like would be
> >> >
> >> > Table 1
> >> > Security 9/30/2005Market_value 12/31/2005Market_value
> >> > IBM 1000 1500
> >> > Microsoft 2000 2500
> >> > XYZ 3000
> >> > America Fund 3000
> >> >
> >> >
> >> > The tables show that XYZ was dropped after 9/31/2005 and America Funds
> >> > was
> >> > brought in. I have struggled with this query for a couple of days.
> >> > Any
> >> help
> >> > would be appreciated.
> >> >
> >> > Jones
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >>
>
>
> | 
28-Jul-2006, 08:01 AM
|  | Guest | | | | | | | | | | Re: Can't figure how to do a query Sorry: I don't see how that table definition relates to the sample data
you've given!
How about showing a few sample rows from each table?
Are you saying the data is coming to you from an external source, and that's
why there are two separate tables?
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Jones Barton" wrote in message
news:836414E3-5EB9-439C-9499-870DF089B12D@microsoft.com...
> Hi Douglas
>
> In each table I have Fields named History_dte (date), Manager_long,
Entity,
> Asset_Class, TotalMv
> one table has 12/31/2005 data the other 09/30/2005 data in it.
>
>
> Jones
>
> "Douglas J. Steele" wrote:
>
> > What are the names of the fields in your table? You might be able to
write a
> > query that normalizes the data, and then use that query as the basis for
> > subsequent queries.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no private e-mails, please)
> >
> >
> > "Jones Barton" wrote in message
> > news:9FBA5373-CCB6-472D-A310-732D8E48D8D4@microsoft.com...
> > > Douglas,
> > >
> > > I appreciate your honesty, With that being said, I don't have any
control
> > > on how I get the data, Is there any way to accomplish my hopeful
outcome
> > > with a query?
> > >
> > > Jones
> > >
> > > "Douglas J Steele" wrote:
> > >
> > >> Sorry to seem blunt, but the problem is that your table isn't
properly
> > >> normalized.
> > >>
> > >> Each company should represent a separate row in a table, not a
separate
> > >> column on a common row.
> > >>
> > >> Jeff Conrad has a good set of resources related to table design at Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
> > >> http://home.bendbroadband.com/conrad...abaseDesign101
> > >>
> > >> --
> > >> Doug Steele, Microsoft Access MVP
> > >> http://I.Am/DougSteele
> > >> (no e-mails, please!)
> > >>
> > >>
> > >> "Jones Barton" wrote in
message
> > >> news:0F33898B-6B68-44E6-A321-D053D6B00F20@microsoft.com...
> > >> > Hi everybody,
> > >> > I am quite stumped on how to write a query. I have two tables that
> > >> > hold
> > >> > securites for different periods I need to combine both into one
table Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9260
> > >> > but
> > >> the
> > >> > twist is that they can have different securities in each table. A
> > >> > short
> > >> > example would be.
> > >> >
> > >> > Table 1
> > >> > Security 9/30/2005Market_value
> > >> > IBM 1000
> > >> > Microsoft 2000
> > >> > XYZ 3000
> > >> >
> > >> > Table 2
> > >> > Security 12/31/2005Market_value
> > >> > IBM 1500
> > >> > Microsoft 2500
> > >> > America Fund 3000
> > >> >
> > >> > The results I would like would be
> > >> >
> > >> > Table 1
> > >> > Security 9/30/2005Market_value
12/31/2005Market_value
> > >> > IBM 1000 1500
> > >> > Microsoft 2000 2500
> > >> > XYZ 3000
> > >> > America Fund 3000
> > >> >
> > >> >
> > >> > The tables show that XYZ was dropped after 9/31/2005 and America
Funds
> > >> > was
> > >> > brought in. I have struggled with this query for a couple of days.
> > >> > Any
> > >> help
> > >> > would be appreciated.
> > >> >
> > >> > Jones
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >>
> > >>
> > >>
> >
> >
> > | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Active Discussions | | | | | | | ਨਾਮਾ Today 06:37 AM 2 Replies, 53 Views | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |