Forum Replies Created

Viewing 14 posts - 16 through 29 (of 29 total)

  • RE: Tricky Calculation Part 2

    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...

  • RE: Tricky Calculation Part 2

    So,

    the first part of the query would look something like this?

    SELECT

    CONTRY_NAME_LC,

    --Total,

    ...

  • RE: Tricky Calculation, Multiple Query?!?!

    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...

  • RE: Tricky Calculation, Multiple Query?!?!

    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...

  • RE: Combine 2 Queries to work out percentage

    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...

  • RE: Combine 2 Queries to work out percentage

    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...

  • RE: Combine 2 Queries to work out percentage

    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...

  • RE: Combine 2 Queries to work out percentage

    Yep 2008,

    I will give this a shot and let you know how it goes!

    Thanks

  • RE: How do I import this data?!

    ACinKC (9/16/2011)


    I've done things similar to this (importing mainframe data into SQL) using SSIS (and Business Objects too, for that matter) and it was very straightforward and easy. Is...

  • RE: How do I import this data?!

    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,...

  • RE: How do I import this data?!

    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,...

  • RE: How do I import this data?!

    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

  • RE: Cant get my head around this error???

    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...

  • RE: Cant get my head around this error???

    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...

Viewing 14 posts - 16 through 29 (of 29 total)