Viewing 14 posts - 16 through 29 (of 29 total)
I placed this around the functions in the derived table
CAST (SUM(case when GeoResolutionCode = 1 then 1 else 0 end)AS FLOAT) Coordinate,
and then rounded them on the outer selection
ROUND(SUM(Coordinate/Total*100.00),2)Coordinate,
Seems...
November 8, 2011 at 5:49 am
So,
the first part of the query would look something like this?
SELECT
CONTRY_NAME_LC,
--Total,
...
November 8, 2011 at 5:29 am
Excellent,
They both work really well!
Now to get these numbers as a %, is there someway I can include the calculation within the SUM statement?!
select CONTRY_NAME_LC,
COUNT (GeoResolutionCode) as Total,
SUM(case when...
November 8, 2011 at 3:28 am
Morning Guys,
Thanks for your responses, I will give both a go as it does not hurt to learn how to do both approaches!
I will let you know how it...
November 8, 2011 at 2:37 am
Hi Guys,
Just want to say thanks for all your help with this, this is the final working code
use EM_REFDATA;
with A as
(
Select CountryCode, CAST(COUNT (GeoResolutionCode) AS FLOAT) as Total
From...
November 3, 2011 at 3:59 am
Okay getting there slowly on this one....
use EM_REFDATA;
with A as
(
Select CountryCode, COUNT (GeoResolutionCode) as Total
From EM_REFDATA.dbo.Cargo_Mapping
Group by CountryCode
),
B as
(
Select CountryCode,
COUNT (GeoResolutionCode) as Geo
From Cargo_Mapping
Where GeoResolutionCode <='6'
Group...
November 2, 2011 at 12:08 pm
use EM_REFDATA;
with A as
(
Select CountryCode, COUNT (GeoResolutionCode) as Total
From EM_REFDATA.dbo.Cargo_Mapping
Group by CountryCode
),
B as
(
Select CountryCode,
COUNT (GeoResolutionCode) as Geo
From Cargo_Mapping
Where GeoResolutionCode <='6'
Group By CountryCode
)
Select...
November 2, 2011 at 11:32 am
Yep 2008,
I will give this a shot and let you know how it goes!
Thanks
November 2, 2011 at 11:24 am
ACinKC (9/16/2011)
September 19, 2011 at 6:11 am
Okay that makes sense, I copied the data into wordpad!
Now receiving this error:
Msg 208, Level 16, State 82, Line 1
Invalid object name 'BULKDATA'.
Sorry to keep bugging you with this,...
September 15, 2011 at 10:08 am
Lowell,
I cant thankyou enough for doing this for me, although I am having a slight issue. When I execute this procedure I am getting the below error:
Msg 4866, Level 16,...
September 15, 2011 at 9:28 am
Sean,
Thanks for getting back to me on this! Row-by-row could take some time
Although there is less information would it be simpler to use this dataset > http://www.aoml.noaa.gov/hrd/hurdat/easyread-2011.html
Many Thanks
September 14, 2011 at 10:43 am
Thanks for the reply so do I need to change the other 4 error lines into SQL and not mySQL the file is too big to post on the forum!
Many...
September 9, 2011 at 1:31 pm
Hey Guys,
Thanks for your replies, yup so looks like its mySQL is it a simple case of replacing those 4 lines of code with the SQL equivelent?
I have tried pasting...
September 9, 2011 at 1:02 pm
Viewing 14 posts - 16 through 29 (of 29 total)