Monday, March 19, 2012
Cr9.0
below it, is a section that has district as a group.
below it, is detail section with game field in it.
query:
select country, CityName, district,
case when (population > 200) then game else null end
from country, province, city
group CityName, district
my problem is how to suppress the page header when game is null.You can conditionaly suppress your Page Header (or a PH section).
In the Section Expert, check the Suppress option for your PageHeader, click the 'x+2' button and print such a formula:
Count({table.game},{table.district})=0
Sunday, February 19, 2012
country city area ..... help
hi all :
i am working in HR system , the user table is linked to the counter table and the city and the area tables . i want to fill this tables with all the country and cities and its area all over the world , i think that i could find such data on the internet , can any one help me how to find this tables and the data . beside the nationality table .... any help please
I am not sure you will get it on single location. May be wikipedia help you.. http://en.wikipedia.org/wiki/List_of_countries|||And...
http://en.wikipedia.org/wiki/List_of_cities
Counting total number of items in each category
Hello everyone,
I have 2 tables. One with a list of countries and another with a list of users. The users table stores the Country they are from as well as other info.
Eg the structure is a little bit like this...
Countries:
--
CountryId
CountryName
Users:
UserId
UserName
CountryId
So, the question is how to a list all my countries with total users in each. Eg, so the results are something like this......
CountryName TotalUsers
United Kingdom 334
United States 1212
France 433
Spain 0
Any help woulld be great as I have been fumbling with this all morning. Im not 100% with SQL yet!!
Cheer
Stephen
here You go...
Code Snippet
Create Table #countries (
[CountryId] int ,
[CountryName] Varchar(100)
);
Insert Into #countries Values('1','USA');
Insert Into #countries Values('2','UK');
Insert Into #countries Values('3','IN');
Create Table #users (
[UserId] int ,
[UserName] Varchar(100) ,
[CountryId] int
);
Insert Into #users Values('1','John','1');
Insert Into #users Values('2','Dale','1');
Insert Into #users Values('3','Thome','2');
--With ZERO COUNT
Select
[CountryName],
Count([UserId])
from
#countries C
left Outer Join #users U on C.[CountryId] = U.[CountryId]
Group By
[CountryName]
--Without ZERO COUNT
Select
[CountryName],
Count([UserId])
from
#countries C
Inner Join #users U on C.[CountryId] = U.[CountryId]
Group By
[CountryName]
|||Super! Many thanks and thank you for replying so quickly.
Makes sense now - easier than what I was trying to do!!! ![]()