Forum Replies Created

Viewing 15 posts - 631 through 645 (of 1,229 total)

  • RE: Stored Procedures slower than queries

    Now if a field does not need updating, I guess the value in the table would stay null.

    How to get around that in some cases (UPDATE X SET field4=7,...

  • RE: Stored Procedures slower than queries

    abdullah.zarour (1/13/2016)


    Hello Michael

    Quick questions. Have you ever partitioned a table? If so, can you provide some actual facts as to what the performance gains you realized?

    Yes , I did...

  • RE: CROSS APPLY on named sets

    Eirikur Eiriksson (1/13/2016)


    SQLRNNR (1/13/2016)


    Jacob Wilkins (1/13/2016)


    edwardwill (1/13/2016)


    Jacob Wilkins (1/13/2016)


    edwardwill (1/13/2016)


    Eirikur Eiriksson (1/12/2016)


    SQLRNNR (1/12/2016)


    I dunno about the "correct" answer on this one. The statements compile for me but produce an error...

  • RE: Stored Procedures slower than queries

    abdullah.zarour (1/13/2016)


    Hello SSC-Enthusiastic ,

    You might try the following point :

    1. Create a table partition.

    2. Configure the SQL Server Instance Option ( Optimize for Ad hoc workloads).

    3. Check Max...

  • RE: Stored Procedures slower than queries

    If that is the case I am wondering how many different permutations of updated columns do you need compared to the number of Id's... which leads me to wonder if...

  • RE: Stored Procedures slower than queries

    Stijn977 (1/11/2016)


    Hi Sir, talk about quick turnaround. I was actually already editing my post, please allow me to give some more details:

    Can you further define "big transaction"?

    ==> 500 to...

  • RE: Best way to merge two large client databases

    Orlando Colamatteo (1/12/2016)


    MMartin1 (1/12/2016)


    Orlando Colamatteo (1/12/2016)


    titsiros (1/12/2016)


    The reason for the merge is because one client acquired the other and they don't want to maintain separate systems.

    I know it's a...

  • RE: Best way to merge two large client databases

    Orlando Colamatteo (1/12/2016)


    titsiros (1/12/2016)


    The reason for the merge is because one client acquired the other and they don't want to maintain separate systems.

    I know it's a grand task because...

  • RE: Nested Case statements Help

    Borrowing from Eirikur's code a little bit,

    Maybe you are looking for something like this ?

    create table #sampleScheduleData

    (

    scheduledClass VARCHAR(50) ...

  • RE: Date Conversion

    I am assuming that this is a string column for a int column would not hold the leading zero by the way.

    declare @myint int = '0123'

    select @myint

    Plus needless to...

  • RE: Date Conversion

    Now i want to convert this into yyyy-mm-dd format ie 2015-01-09

    If you are still introducing this into another string column then

    declare @mystring varchar(10) = '01092015' ;

    select right(@mystring,4) +'-'+

    left(@mystring,2)+'-'+

    substring(@mystring,3,2)asdateFormattedString

    This leaves...

  • RE: Joining 2 Tables with Or condition

    Eirikur Eiriksson (1/11/2016)


    Hugo Kornelis (1/11/2016)


    GilaMonster (1/10/2016)


    Sure, with the same general idea.

    t1 INNER JOIN t2 on t1.Col1 = t2.Col2 OR t1.Col1 = t2.Col3 OR t1.Col1 = T2.Col4

    Don't know what the performance...

  • RE: the use of CTEs

    Sergiy (1/5/2016)


    When data modification logic is extremely complex I would not come anywhere near a CTE.

    It's like updating a view - it might work or might not work, but some...

  • RE: Help with sql query

    Or if you want to make this look more to what you may be familiar with, drawing off of your example ,

    USE tempDB;

    GO

    /* ----------------------------- */

    CREATE TABLE #stakeholder_notes(

    note_id INTEGER NOT...

  • RE: Help with sql query

    Great, Sean's example solves this. You can refer to his last post.

Viewing 15 posts - 631 through 645 (of 1,229 total)