Forum Replies Created

Viewing 15 posts - 76 through 90 (of 101 total)

  • RE: Regd Column Name

    Click on my name to the left and there will be an option to send email...

  • RE: Regd Column Name

    Can you post your stored proc and then I can show you the changes.

  • RE: Regd Column Name

    When you run your stored proc do you get the full output of seven days? If so you could drop the table at the start of the sp and...

  • RE: Regd Column Name

    So... as each day comes along you want to add a NEW column to the final destination table? i.e. after a year there would be 365 columns...

  • RE: Regd Column Name

    hmmmmm. I did something a while back that may be similar to your requirements. I ended up using a dynamic sql string and a temp table inside a...

  • RE: Regd Column Name

    Hi,

    The column names shouldn't be a problem, so long as you put them in square brackets.

    E.g.

    create table #temp

    (

    [source] varchar ,

    [type] int,

    [10/11] int,

    [09/11] int,

    [08/11] int,

    [07/11] int,

    [06/11] int,

    [05/11] int,

    [getdate()] datetime

    )

    select * from...

  • RE: Divide By Zero

    Hi ,

    There are at least a couple of options you can use.

    1. use a common table expression - http://msdn.microsoft.com/en-us/library/ms190766.aspx

    Something a bit like this (untested)....

    with cteAppt( [list all...

  • RE: Help with Data transformation

    Hi,

    Well I'm not sure if this is the 'optimal' solution... But it does work! If you are running this across millions of rows it might be a bit...

  • RE: update

    Heres an example of what you can do. Note that you DO need a common ID to join the two table...

    Firstly some example tables. We have two tables...

  • RE: Weirdness in SQL numeric handling

    Hey glad to help! There isn't much activity on the forums when I am logged in so it is great to help out where I can. I think...

  • RE: Weirdness in SQL numeric handling

    Cast it as a string (after casting as decimal) and then you can add the strings together:

    select cast(cast(@res1 as decimal(20,4)) as varchar(30)) + 'pt'

  • RE: Weirdness in SQL numeric handling

    I think that rounding is correct.

    Try this for example:

    declare @res1 as float, @res2 as float

    select @res1 = 123.123456789

    select @res2 = 123.123444444

    select cast(@res1 as decimal(20,4))

    select cast(@res2 as decimal(20,4))

  • RE: Concatenating a varchar(max) column

    Hi,

    I'm not sure what else you are doing with this data - but I don't think you need to loop through all your rows and put everything into a table...

  • RE: Weirdness in SQL numeric handling

    Hi,

    Is this what you are after?

    select cast(@res as decimal(20,4))

  • RE: Display Duplicates

    I get the same execution plan for both queries and the exact same run-time. But I am running it on a measly 5 records. I'd be interested to...

Viewing 15 posts - 76 through 90 (of 101 total)