Forum Replies Created

Viewing 15 posts - 256 through 270 (of 442 total)

  • RE: convert Float

    What does it look like once you export it, and how do you export it, can you show us the query you ran?

    Thanks

    Cheers,

    J-F

  • RE: Conditionally select from cte

    irobertson (6/8/2009)


    Hi,

    Can I conditionally select from a cte? I'm not sure it's possible.

    E.g.

    declare @input_variable int

    ;with cte as (

    select Col1

    , Col2

    , Col3

    , Col4

    from MyTable

    )

    if @input_variable = 1

    begin

    select sum(Col1)...

    Cheers,

    J-F

  • RE: Previous record of same type, unknown ID distance

    Hi,

    I'm not sure I get what you are looking for here. You say you now have a after hour solution to fix your data (date between last purchase). Now, do...

    Cheers,

    J-F

  • RE: Previous record of same type, unknown ID distance

    Lynn Pettis (6/4/2009)


    Here is a variation using a CTE and the row_number() function. Not wanting to fight with it, I am just sending it up as a attachment as...

    Cheers,

    J-F

  • RE: Previous record of same type, unknown ID distance

    Lynn Pettis (6/4/2009)


    For some reason, I can't post the code directly. Please see the attached file for something I hope helps.

    Hey Lynn, I've been trying to do this query...

    Cheers,

    J-F

  • RE: Indexes

    I'm glad it helped Simon,

    Have a nice day, and yes, execution plans are REALLY useful to know, 😉

    Cheers,

    J-F

  • RE: Indexes

    Hi Simon,

    I've used your query to show you the difference between the indexed tables, and non indexed tables.

    Practically, you don't see much difference because the data you query is long,...

    Cheers,

    J-F

  • RE: (ltrim) and remove the leading spaces

    jchesnut (6/1/2009)


    I created this code but it still returns centered....aaaarrrrggggh!

    I'm not sure if it matters but I used SSIS to import the data into my DB too...:w00t:

    select distinct servername,

    ltrim(servername)

    as...

    Cheers,

    J-F

  • RE: Triggers Basic

    Hi,

    A trigger gets fired once for every sql batch it is assigned.

    In example, it you do something like this :

    Insert into table A (ID, text)

    select top 10 ID, text...

    Cheers,

    J-F

  • RE: (ltrim) and remove the leading spaces

    jchesnut (6/1/2009)[hr}

    select distinct servername

    from fs_filestats;

    then you will need to do something like this, to get the distinct trimmed server names.

    select distinct LTRIM(servername) as TrimmedServerName

    from fs_filestats;

    Hope I understood you,

    Cheers,

    J-F

  • RE: (ltrim) and remove the leading spaces

    Your 2 top rows look finely left trimmed, what are you trying to accomplish, are you trying to remove the spaces between the 2 words?

    Can you explain what you are...

    Cheers,

    J-F

  • RE: Give auditor rights to select only within a single database

    Thanks guys, I'll keep on looking on BOL, and try to make sense of it all.

    I'll also check for articles by Brian Kelley,

    Thanks again,

    Cheers,

    J-F

  • RE: Give auditor rights to select only within a single database

    Thanks Roy, this has helped a lot, I understood a bit more how the security works, like by Database. This all looked like really complicated at first, but looks better...

    Cheers,

    J-F

  • RE: Long execution times when including simple SQL functions into a join

    Pieter (5/21/2009)


    J-F,

    Although I haven't worked with table-value functions, I am not sure that they work for my scenario. The validated phone number needs to be linked up to the original...

    Cheers,

    J-F

  • RE: Long execution times when including simple SQL functions into a join

    Florian Reischl (5/20/2009)


    @J-F:

    I stopped your function at two minutes.

    Greets

    Flo

    Ouch... And I thought it would perform better... Do you have the exec plan Flo, just for reference.

    Thanks,

    Cheers,

    J-F

Viewing 15 posts - 256 through 270 (of 442 total)