Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 7,610 total)

  • RE: IDENT_SEED to Find the Seed?

    It looks like you need

    SELECT IDENT_CURRENT('dbo.tablename')

    rather than IDENT_SEED.

  • RE: Make a column immutable, once set it sticks

    You need to be more selective than that. Any reference to the column will turn the "UPDATE flag" on, even if the value is the same. Maybe something...

  • RE: Left join vs Exists

    myzus2004 (10/3/2015)


    Thanks scott for your feedback. Appreciate it .

    The clustered index on InformationOverride table cannnot be changed as the composite index on these 3 columns have unique data.

    I am...

  • RE: Need little Help on JOIN

    I think this might do it, if I understand correctly what you need:

    SELECT cast(0 as bit) as 'Escolha',data, contado , ollocal ,origem, ousrdata,ousrhora

    ...

  • RE: Parsing unstructured CSV file

    Can we see the actual code you used to do the split and column assignment? Maybe there is something there.

  • RE: Help with variables NULL in cursor

    You can check to see if the cursor exists before you DECLARE it. I added "LOCAL" to the cursor declaration so that you know for sure that it's local...

  • RE: Parsing unstructured CSV file

    Sounds like you need a really fast splitter. Check out DelimitedSplit8K.

  • RE: Deadlocks

    Might a job have run and hit that db but using a different user?

  • RE: Deadlocks

    Lynn Pettis (10/1/2015)


    ScottPletcher (10/1/2015)


    You should get rid of the INSULL() in the WHERE clause, as always. Just NEVER use ISNULL() in a WHERE or JOIN. But it's esp....

  • RE: Deadlocks

    You should get rid of the INSULL() in the WHERE clause, as always. Just NEVER use ISNULL() in a WHERE or JOIN. But it's esp. important if that...

  • RE: Left join vs Exists

    No, you can't use EXISTS to return data.

    As to performance, the non-clustered index on the vcv (InformationOverride) table would have to INCLUDE the vote column to be useful.

    Better would very...

  • RE: ANY EASY WAY TO REDUCE THE CODE??

    You could put values into a table and do a lookup.

    You could also use a CROSS APPLY to assign an alias name to the result of the first CASE statement,...

  • RE: Free form text parsing suggestions

    I wondered about that too, but I noticed there's an odd character before "wrap" that looks like a blank, but really isn't. When you copy it in the SSMS...

  • RE: Create Weeks Calendar from Date in SQL 2012

    Here's the code if a month's weeks start in the prior month:

    SELECT

    WeekStartDate,

    WeekEndDate,

    LEFT(DATENAME(MONTH, WeekEndDate), 3) + '_Week' +...

  • RE: Create Weeks Calendar from Date in SQL 2012

    The WeekName logic contradicts itself. If:

    8/30/2015 9/5/2015 = Sep_Week1

    then shouldn't:

    9/27/2015 10/3/2015 = Oct_Week1 rather than "Sep_Week5"

    It's impossible for that week to be both Sep_Week5 and Oct_Week1 ... or...

Viewing 15 posts - 4,741 through 4,755 (of 7,610 total)