Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 4,087 total)

  • RE: Using SQL Server Profiler 2012 with SQL 2014

    Have you looked at using extended events? Profiler has been deprecated for running traces. (Although, you didn't specify that you were running a trace.)

    Drew

  • RE: Total by Group.

    You really should test your sample data scripts before posting.

    * Your action table is missing the field event_name referenced in the view.

    * You're view is missing the full_name field referenced...

  • RE: Filling the missing rows/gap in the data

    seismicbeat (10/31/2016)


    Hello,

    Thanks all for all the help, sorry for not providing you the queries and not showing how I compile the data. The data is provided to me in an...

  • RE: Using Lag/Lead and OVER() to get growth pattern

    alex.sqldba (11/2/2016)


    I am not sure what you mean by join to a calendar table?

    Calendar Tables[/url]

    Drew

  • RE: Total by Group.

    If you want tested results, post sample data and expected results as insert scripts as outlined in the first link in my signature. A picture of data is no...

  • RE: Merge two tables and insert/update respectively

    The Dixie Flatline (11/1/2016)


    if ID 001 gets another record with sequence 3 , then this record should go as an insert in target.

    So far you've only coded for an UPDATE...

  • RE: Total by Group.

    Use Grouping Sets.

    FROM CalcPart

    GROUP BY GROUPING SETS ((subdepartment), (subdepartment,dutyhours,day,friday,saturday))

    Drew

  • RE: Tunning the Query

    Since you haven't provided table definitions, index definitions, and the actual execution plan (as a .sqlplan file), there's not much advice that we can give you.

    I did notice that you're...

  • RE: Show data upto 2 decimal places but with exact values

    snowprincess42073 (10/31/2016)


    Hi all,

    I would like to show the data up to 2 decimal places but without rounding off the integers. If the number is 4.6758 then data retrieved should be...

  • RE: how insert data to oracle with four part name?

    Please don't cross post. You already have a thread on this topic here. When you cross post, you fragment the discussion.

    Drew

  • RE: MERGE only when not null

    shorton2 (11/1/2016)


    drew.allen (11/1/2016)


    You do realize that for most purposes ISNULL and COALESCE are the same. I'm confused why you think that ISNULL won't work, but COALESCE will.

    Drew

    I figured it...

  • RE: MERGE only when not null

    You do realize that for most purposes ISNULL and COALESCE are the same. I'm confused why you think that ISNULL won't work, but COALESCE will.

    Drew

  • RE: pivot table giving all null values

    You're creating columnsequences named 'market1', 'market2', etc., but you're looking for columnsequences 'm1', 'm2', etc. I just changed your script to create columnsequences with the shorter name.

    select delegatesname, m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18,m19,m20,m21,m22,m23,m24,m25,m26,m27,m28,m29,m30,m31,m32,m33,m34,m35,m36,m37,m38,m39,m40,m41,

    m42,m43,m44,m45,m46,m47,m48,m49

    into...

  • RE: why my query returns scientific notation for a varchar field?

    ScottPletcher (10/31/2016)


    Latin actually is the base for many romance languages.

    Latin is the base for ALL Romance languages. I have an MA in Linguistics, so I have some idea what I'm...

  • RE: Strange result using SUM with ISNULL(NULLIF...

    david.jack (10/31/2016)


    drew.allen (10/28/2016)


    david.jack (10/28/2016)


    ScottPletcher (10/27/2016)


    Seems more confusing than the natural CASE statement to me:

    SUM(CASE WHEN VAL1 <> 0 THEN VAL1 ELSE VAL2 END)

    VAL1 can return NULL unfortunately so using a...

Viewing 15 posts - 2,191 through 2,205 (of 4,087 total)