Hi,
Table Name: Countries
Field1: Ctry
Field2: State
Field3: Population
Table
--------------------------------------------------------------------
Ctry: State Pop
--------------------------------------------------------------------
Ctry1 State1 100
Ctry1 State2 100
Ctry1 State3 100
Ctry2 State1 50
Ctry2 State2 50
Ctry3 State1 100
Ctry3 State2 50
Ctry3 State3 100
I have the table in above format and i want to see the data in below format.
I used sum() but it throws "Data type mismatch" error.
Also I tried DSum but no use.
Can any one help me writing a query to sum the "Pop" field based on Country names in "Ctry" field?
------------------
Ctry: Pop
------------------
Ctry1 300
Ctry2 100
Ctry3 250
Thanks in advance,
Naren
Table Name: Countries
Field1: Ctry
Field2: State
Field3: Population
Table
--------------------------------------------------------------------
Ctry: State Pop
--------------------------------------------------------------------
Ctry1 State1 100
Ctry1 State2 100
Ctry1 State3 100
Ctry2 State1 50
Ctry2 State2 50
Ctry3 State1 100
Ctry3 State2 50
Ctry3 State3 100
I have the table in above format and i want to see the data in below format.
I used sum() but it throws "Data type mismatch" error.
Also I tried DSum but no use.
Can any one help me writing a query to sum the "Pop" field based on Country names in "Ctry" field?
------------------
Ctry: Pop
------------------
Ctry1 300
Ctry2 100
Ctry3 250
Thanks in advance,
Naren
Comment