Forum Replies Created

Viewing 15 posts - 1,021 through 1,035 (of 1,246 total)

  • RE: Dynamic SQL Question

    Can you give a good example of some of the multi-valued parameters that you have used dynamic SQL for? I mean, I have plenty of multi-valued parameter reports that do...

  • RE: Dynamic SQL Question

    xsevensinzx (9/21/2015)


    Jason A. Long (9/21/2015)


    I think it depends a lot on what the SQL is being used for...

    Personally I write a lot of report procs that can have a several...

  • RE: best practice to do this join

    jaakkojuntunen (9/21/2015)


    Any ideas how to implement the logic above? Thanks already for your answers, have helped a lot!

    br,

    Jack

    It would be helpful if you were to supply some representative test...

  • RE: Dynamic SQL Question

    I think it depends a lot on what the SQL is being used for...

    Personally I write a lot of report procs that can have a several optional/multi-valued parameters. For those,...

  • RE: How to get rid of NULL in my results from case when

    Unfortunately, miskeyd CPT codes are tough to deal with. Legitimate CPT codes can and do begin with leading 0's and removing them can cause them to change meaning.

    Here's a bit...

  • RE: Pattern Matching in SQL Server

    Eirikur Eiriksson (9/20/2015)


    Quick question Jason, can you post the source for the dbo.SplitCSVToTable8K function?

    😎

    It's simply a renamed version of Jeff Moden's DelimitedSplit8k function. It was renamed to fit an existing...

  • RE: Pattern Matching in SQL Server

    I won't call this an elegant solution by any stretch of the imagination, but it's the only "1:00 am" solution that's coming to mind at the moment...

    IF OBJECT_ID('tempdb..#temp') IS NOT...

  • RE: A quick interesting query

    WayneS (9/17/2015)


    I don't think that this will add in the calculated average into subsequent columns.

    Good catch! here's another attempt using CTE...

    IF OBJECT_ID('tempdb..#months') IS NOT NULL

    DROP TABLE #months;

    create table #months...

  • RE: A quick interesting query

    Something like this???

    IF OBJECT_ID('tempdb..#months') IS NOT NULL

    DROP TABLE #months;

    create table #months (

    jan float,

    feb float,

    mar float,

    apr float,

    may float,

    jun float,

    jul float,

    aug float,

    sep float,

    oct float,

    nov float,

    dec float);

    insert into #months values(1.22,4.55,6.13,0,0,0,0,0,0,0,0,0);

    insert into #months...

  • RE: DATEDIFF between date for bills

    reynoso.gonzalez (9/17/2015)


    Good morning,

    I would like to know how I can make a script in SQL Server you can determine the difference days with bills based on date.

    I show you an...

  • RE: Painful datetime conversion

    What the heck... I'll put a dog in the hunt...

    CAST(CAST(VHRGDT AS CHAR(8)) + ' ' + STUFF(STUFF(RIGHT('0' + CAST(VHRGTM AS VARCHAR(6)), 6), 5, 0, ':'), 3, 0, ':') AS...

  • RE: Implicit conversion comparing INT column to 0

    Looks like you have a real head scratcher on your hands... Nothing else comes to mind at the moment...

  • RE: Contains use on Dynamic Parameters

    Something like this?

    DECLARE @searchParam VARCHAR(100);

    SET @searchParam = 'search text';

    IF @searchParam LIKE '% %'

    BEGIN

    PRINT 'Not Working'

    END

    ELSE

    BEGIN

    PRINT 'Working'

    END;

  • RE: Implicit conversion comparing INT column to 0

    No conversion is taking place when I test your code... Perhaps different collation settings???

    (I tested with SQL_Latin1_General_CP1_CI_AS)

  • RE: Multiple queries in the same stored procedure

    Sean Lange (9/16/2015)


    I don't know why so many developers want everything in sql wrapped up in a single procedure but have no problem creating 10,000 class files. It makes no...

Viewing 15 posts - 1,021 through 1,035 (of 1,246 total)