Forum Replies Created

Viewing 15 posts - 2,251 through 2,265 (of 4,087 total)

  • RE: lookup value for each row

    marc.corbeel (10/17/2016)


    On the sample data their were no indexes indeed, but on the db I tested the solutions, there are indexes on the currency id and on the date...

    This sounds...

  • RE: Dynamically checking for columns and update

    drew.allen (10/17/2016)


    hegdesuchi (10/15/2016)


    Hi ,

    Thank you!yes I agree with you! My client wants to check if columns are same .update only if they are not same. I could think only of...

  • RE: lookup value for each row

    The only index in your sample table was on the identity field, which is not an appropriate index for this approach. You need to create an index like below.

    CREATE INDEX...

  • RE: lookup value for each row

    marc.corbeel (10/17/2016)


    Hi Draw.

    I tried your 2nd solution, and it is much slower than the earlier solutions... (for 160 currencies)

    I did say that it required that the appropriate index be in...

  • RE: Dynamically checking for columns and update

    hegdesuchi (10/15/2016)


    Hi ,

    Thank you!yes I agree with you! My client wants to check if columns are same .update only if they are not same. I could think only of this...

  • RE: lookup value for each row

    There are two issues with all of the solutions provided so far. They all read the exchangerates table twice: once to get the exchange rate and once to get...

  • RE: How to get full name of the employer by getting rid of null values in between

    marc.corbeel (10/14/2016)


    This is strange...

    when I copy from my SQL studio Manager to this forum, each time the double space is replaced by single one

    Anyone knows this issue???

    It's because you didn't...

  • RE: query and compare values in a text based column

    Why did you abandon the XML approach? It performs better than manipulating the strings.

    I did notice that the sample XML data you provided does not match the case of...

  • RE: Query to compare values between multiple columns

    Y.B. (10/13/2016)


    I believe this gets you what you are looking for...

    SELECT

    s1.LocID,

    s1.Name1 as s1Name1,

    s1.Name2 as s1Name2,

    s2.Name1 as s2Name1,

    s2.Name2 as s2Name2

    FROM #Server1 s1

    JOIN #Server2 s2 ON s2.LocID =...

  • RE: TSQL Assistance

    Again, your WHERE clause is converting your OUTER JOIN to an INNER JOIN. You want to find record where the value is MISSING. Use the following.

    SELECT DISTINCT

    CourseInfo.CourseStateCode ,

    CourseInfo.CourseTeacherID...

  • RE: TSQL Assistance

    Since English is a left-to-right language, you will almost exclusively see people using LEFT outer joins.

    A RIGHT outer join says include all records from the RIGHT table (Responsibilities) regardless of...

  • RE: Using SP in UDF

    The standard workaround is to create a view that uses RAND() and/or NEWID() and then select from the view in the UDF.

    And the reason they can't be used is that...

  • RE: insert into table with foreign key constraint

    dianerstein 8713 (10/12/2016)


    I am trying to load the valid lockID values into the cust table with the following sql:

    DECLARE @Startlockid INT=0

    DECLARE @MyTableVar table( lockID int);

    insert...

  • RE: Performance question

    river1 (10/12/2016)


    Dear All, for quite some time I have a performance degradation in my DB server.

    I have a total of 128 GB of memory on it and SQL Server configured...

  • RE: insert into table with foreign key constraint

    Also, if you just disable and reenable the foreign key constraint, that constraint will no longer be trusted, which, again, defeats the purpose of having the constraint in the first...

Viewing 15 posts - 2,251 through 2,265 (of 4,087 total)