Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 6,036 total)

  • RE: Heap has same page count, fewer fragments

    Can you post the full sets returned by the view for both tables?

    The numbers look a bit odd.

    Was there any DB shrinking done after the index was created?

    And I...

  • RE: Heap has same page count, fewer fragments

    Run this:

    ALTER INDEX IndexName ON SchemaName.TableName REBUILD

    Check the fragmentation stats.

    Now let them defragment the HEAP to match the outcome.

  • RE: Identity insert without reseed

    salliven (5/14/2013)


    Hi!

    Can I insert a table without identity reseed?

    Exapmle:

    CREATE TABLE #table (id int IDENTITY (1,1), col1 int)

    INSERT INTO #table DEFAULT VALUES

    -- Id = 1

    -- If I insert identity values, then...

  • RE: Using reserved words as column names

    Luis Cazares (5/2/2016)


    Sioban Krzywicki (4/29/2016)


    Eric M Russell (4/29/2016)


    If you really want, you can also model an entire database containing objects with only spaces for names.

    create database [ ];

    GO

    use...

  • RE: Using reserved words as column names

    Alan.B (4/29/2016)


    This thread has gotten so out of hand.

    Well, it was not in good hands from the very beginning.

    Is there any demonstrable problem with naming a column "number"?

    I think...

  • RE: Storing encypted SSN's

    create table employee_id_mapping

    (

    employee_id bigint identity(1000000,1),

    By using bigint here you're gonna just waste the system resources.

    You may have 4 records in your database per every possible SSN number and still stay...

  • RE: Using reserved words as column names

    j-1064772 (4/29/2016)


    Can't help myself.

    I am calling out every one to push this even further down the road.

    Have we reached bottom yet ?

    Like some people brackets, I hate Latin alphabet.

    It's not...

  • RE: Find column values based on min and max of other columns

    So, what's the problem with this task?

    Are you able to google "GROUP BY"?

  • RE: Count differs while using the date values

    pstanand (4/28/2016)


    Hi,

    So shall I use the below one? Suggest me.

    select count(1) from sap_plant

    where lastupdate >='20160419'

    and lastupdate <'20160428';

    Thanks

    Regards,

    pstanand

    Yes.

    That would be correct.

    If you use paramerters you may wish to user following...

  • RE: Using reserved words as column names

    There is nothing wrong with objects or columns named Number, Version, Join, etc.

    The names don't affect performance or quality of the code anyway.

    It's not a bad coding practice either.

    The real...

  • RE: Count the number of hours between two dates

    jkbarr30 (4/28/2016)


    ... and what hour they are here

    Can you define this please?

    Arrived on 8:50 and placed in bed on 9:10 - it's obviously within 1st hour.

    But arrived on 8:10 and...

  • RE: XML to SQL tables

    Alan.B (4/28/2016)


    It's expensive, especially when you look at the number of lob reads, but it's the fastest way to parse XML data using the SQL engine that I'm aware of.

    XML...

  • RE: XML to SQL tables

    Jeff Moden (4/28/2016)


    A lot of people incorrectly consider CROSS APPLY to be RBAR because it behaves like a correlated subquery when single row returns are produced by CROSS APPLY.

    It...

  • RE: Storing encypted SSN's

    http://opendata.stackexchange.com/questions/5595/how-should-us-ssn-be-anonimized

    Since SSN has only 9 digits, changing hash function will not suffice because attacker can simply apply the function to all 10^9 SSN's and match the result against the database.

    Any...

  • RE: DIR /B switch

    Jeff, don't be so sure.

    It's MS Windows we're talking about here.

    Ever noticed Modified Date earlier than Created Date?

    I did. Not once, not twice.

Viewing 15 posts - 1,456 through 1,470 (of 6,036 total)