Forum Replies Created

Viewing 15 posts - 646 through 660 (of 1,241 total)

  • 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.

  • RE: Help with sql query

    sartis (1/5/2016)


    MMartin1 (1/5/2016)


    You provided sample data and the tables structure. Can you also provide what you want the final output to look like? We may be able to fill in...

  • RE: Help with sql query

    You provided sample data and the tables structure. Can you also provide what you want the final output to look like? We may be able to fill in the gap...

  • RE: the use of CTEs

    I prefer CTEs when one recordset depends on the prior. This could be potentially quite confusing with multiple subqueries

    With Cte0 as

    (

    SELECT /* some record set */

    ),

    Cte1 as

    (

    SELECT /* ..*/

    FROM...

Viewing 15 posts - 646 through 660 (of 1,241 total)