Forum Replies Created

Viewing 15 posts - 106 through 120 (of 148 total)

  • RE: Dynamic Columns - Cash Flow problem

    Also, you should think carefully about indexes required on the source table and the temporary interim table - pivot is costly without the correct indexes...

  • RE: Dynamic Columns - Cash Flow problem

    Ok, so maybe I'm not quite clear. It seems that you need to group ny Partners with Periods in columns, but also by Accounts with Periods in columns?

    If so,...

  • RE: Dynamic Columns - Cash Flow problem

    Hi Bezan,

    I'm not sure what you mean - the initial criteria limits the data returned to one combination of Partner & Account only.

    To see all combinations, just tweak the...

  • RE: Dynamic Columns - Cash Flow problem

    Jeff Moden (9/1/2010)


    Ooooooo... crud. I'm on my way to work and always miss out on the fun stuff. I'll be watching whoever gets to this one. 😛

    Lol, I'm...

  • RE: Dynamic Columns - Cash Flow problem

    Hi,

    This should get you the data you need, it's then just a case of using the previous advice on dynamic pivots to get the data into the display format you...

  • RE: read notepad file in sql server 2005

    Hi Grasshopper,

    You're going to struggle to work with the file in the format it's in. SQL needs your data to be organised into discrete entities with rows and columns. Your...

  • RE: Null Fun

    Agreed on all counts. Interesting behaviour though.

  • RE: looking for function help

    Hi,

    I think a tally table solution is better here as it accepts any number of values in the input:

    create function dbo.udf_Get_Max_From_String (

    @string_input varchar(4000)

    )

    returns int

    with schemabinding

    as

    begin

    -- make a table to...

  • RE: Need assistance in LIKE

    Do you get an error message, or id it just that it doesn't return the data you expect?

    Maybe you could try

    where charindex(MyFieldName,@variable) > 0

    or you might want to check...

  • RE: How to execute SQL in query reults?

    Hi,

    You need to pass the results of your query to a variable, then call this using either exec or preferably sp_executesql.

    I'm assuming that you'll have more than one stored...

  • RE: Group BY Query not giving expected result

    Hi,

    Try splitting the work using a CTE:

    ; with cte as (

    SELECT T3.state AS [State],

    SUM(T1.Applications) As Total,

    SUM(T1.UnitsSold) as TotalSold,

    SUM(T1.Revenue) as Revenue,

    T1.VendorId

    FROM TABLE1 T1 WITH(NOLOCK)

    INNER JOIN TABLE2 T2 WITH(NOLOCK) ON...

  • RE: Cast Float to Char with Natural Rounding

    Ha really? Lol, that won't work then will it? Complex function it is then.

  • RE: Cast Float to Char with Natural Rounding

    Hi Lutz,

    I'm migrating data between two quite different environments. It's my issue to handle because I've created the problem in the first place by converting from float.

    Paul, cast to...

  • RE: filter based on current day

    Hi Saeed,

    You could try something like this (air code):

    with cte as (

    select MyTable.*,

    case when MON = 1 then 1

    when TUE = 1 then 2

    when WED...

  • RE: Parse Postcode from Multiple Address Fields

    Hi Handkot,

    That would have been my ideal choice too, if I didn't have to remove the value from the old field too. Because of that, I need to know which...

Viewing 15 posts - 106 through 120 (of 148 total)