Forum Replies Created

Viewing 15 posts - 2,806 through 2,820 (of 5,393 total)

  • RE: Need help with custom ordering, null first/last

    Problem is if I go with the suggested approach, then I will have to make varchar columns for example 'zzzzzzzzzzzzzz' in the inner case statement

    You're right. You can use REPLICATE(<maximum...

    -- Gianluca Sartori

  • RE: Need help with custom ordering, null first/last

    You're on the right track, just make sure that every WHEN brach returns the same data type.

    dt.Name appears to be a char/varchar column, so I guess that changing 1 into...

    -- Gianluca Sartori

  • RE: My Tempdb is Full

    Surendra Patle (8/31/2011)


    ...

    3) Or you can delete the log(.ldf) file from disk and add another as below.

    As I followed this recently therefore elaborating the steps:-

    1) Right click one...

    -- Gianluca Sartori

  • RE: I have to find out DATE from start date & end date

    Something like this?

    DECLARE @UserDate datetime

    SET @UserDate = '20110810'

    DECLARE @SampleData TABLE (

    Startdate datetime,

    Enddate datetime

    )

    INSERT INTO @SampleData VALUES ('20110801', '20110812')

    SELECT *

    FROM @SampleData

    WHERE @UserDate BETWEEN StartDate AND EndDate

    -- Gianluca Sartori

  • RE: My Tempdb is Full

    Tempdb contains user objects (temporary tables, table variables) and internal objects (hash tables, bitmaps and so on).

    If your tempdb fills because you create lots of temp tables, just drop them.

    If...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    WayneS (8/30/2011)


    Gianluca Sartori (8/30/2011)


    jcrawf02 (8/30/2011)


    Gianluca Sartori (8/30/2011)


    On the plagiarism, I don't see it. After all, musical notes are just seven. 😉

    You must not sing the blues...

    I prefer hard-rock. 😛

    Oh, well...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    jcrawf02 (8/30/2011)


    Gianluca Sartori (8/30/2011)


    On the plagiarism, I don't see it. After all, musical notes are just seven. 😉

    You must not sing the blues...

    I prefer hard-rock. 😛

    -- Gianluca Sartori

  • RE: Find String like 'aaaaa' or 'bbbbbb' or 'cccccc' etc....

    Cadavre (8/30/2011)


    peanuts91 (8/30/2011)


    Thanks Gianluca.

    But If I have a field containing for example 'Abraham', it will detect the A appears 3 times. But not 3 times in a row like aaa.

    How's...

    -- Gianluca Sartori

  • RE: Find String like 'aaaaa' or 'bbbbbb' or 'cccccc' etc....

    peanuts91 (8/30/2011)


    Thanks Gianluca.

    But If I have a field containing for example 'Abraham', it will detect the A appears 3 times. But not 3 times in a row like aaa.

    Try this...

    -- Gianluca Sartori

  • RE: dbcc freeproccache for only 1 stored procedure

    Roy Ernest (8/30/2011)


    Sorry if I am being stupid but why not just run sp_recompile for just that stored proc? It will recreate the plan.

    Quite true, indeed. Maybe freeproccache with @plan_handle...

    -- Gianluca Sartori

  • RE: dbcc freeproccache for only 1 stored procedure

    gregory.anderson (8/30/2011)


    Is this possible? If so, is that the "sql_handle" parameter?

    That's it.

    -- Gianluca Sartori

  • RE: CONCATENATE not working

    This is Oracle code.

    CONCATENATE and TRIM are Oracle functions.

    Is this a migrated database?

    -- Gianluca Sartori

  • RE: Find String like 'aaaaa' or 'bbbbbb' or 'cccccc' etc....

    This should do:

    ;with data (string) as (

    SELECT 'Saaaateres'

    UNION ALL

    SELECT 'NoRepeats'

    UNION ALL

    SELECT 'aabbbcdef'

    ),

    tenRows (N) AS (

    SELECT 1

    UNION ALL SELECT 2

    UNION ALL SELECT 3

    UNION ALL SELECT...

    -- Gianluca Sartori

  • RE: Starting / execute CL program on AS400 / iSeries

    jje_de (8/30/2011)


    Gianluca Sartori (8/30/2011)


    ..... into a stored procedure and then call it from SQL Server.

    .....Gianluca

    Hi Gianluca,

    thanks for your reply!

    Ok, if this is a way, I try it. COuld you say...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    This one made me smile.

    "Close the ticket". :hehe:

    I think he confused SSC with MS support.

    -- Gianluca Sartori

Viewing 15 posts - 2,806 through 2,820 (of 5,393 total)