Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)

  • RE: Importance of UPSERT

    Roy

    The concept of using an upsert is interesting. What if the update failed and the insert was executed instead? Then you would have the same read profile whether...

  • RE: Row size in bytes

    This will get the maximum possible rowsize for the employees table in the pubs database:

    select sum(sc.length)

    from sysobjects so

     join syscolumns sc on so.id = sc.id

    where so.name = 'employee'

     and...

  • RE: Question of the Day for 01 Mar 2006

    You guys all have it wrong.  The answer, option D, is abolutely correct.  What is wrong is the question.  The question should have read:

    What does this return?

    SELECT sin(1.5575191894826692)

    and if...

  • RE: Question of the Day for 25 Jan 2006

    I know, people who complain about the QOD need to get a life, but...

    This would likely have returned a mask of 0x4000 since a DBA ran it and would have...

  • RE: We''''ll find them by Zip Code (I HOPE)

    You can get the zip database from the US Postal Service.  They also offer free web services if you are constantly connected.  Check them out:
     
     
    Now, you wouldn't want to...
  • RE: Avoiding a table scan

    This is faster because you have now joined the tables (in the older syntax) so that SQL can work on a smaller set.  A cleaner way and in my experience...
  • RE: A question about servers

    Server consolidation is a fact of life, but edswartwout is right, moving to one is a bit drastic, and since the presence or absence of a specific contractor is probably...
  • RE: Friday the 13th

    Hey Steve!
     
    Kids are great aren't they.  I have to forewarn you though,
     
    "And more reasonable."
     
    probably won't last forever.  Just like most things in this wonderful world, I have found my children's reasonability...
  • RE: data types

    Datalength(expression) will work to determine the size of the data in a row.

    Datatype is stored in 2 bytes, but only once for each column.

    For var* and nvar* data types, actual...

  • RE: Designing Cross Database Queries

    As always, to each his own.  The code in the view does have to change, and it often has to be different from environment to environment (an often dangerous practice...

  • RE: Designing Cross Database Queries

    I prefer to use a linked server.  This method is the most flexible and supports multiple environments (dev,test,prod).

    You imply in your article that the linked server name must be the actual...

  • RE: Question of the Day for 21 Oct 2004

    Very poor question.  Undocumented useless join option.

    By process of elimination, I thought the cross join would have been an answer, only the author left off the where clause.  The following...

  • RE: Question of the Day for 20 Oct 2004

    None of the answers were axectly correct.  sp_who actually execs this sql when loginname param is null:

    select  @spidlow =     0

      ,@spidhigh = 32767

    /* loginame arg is null */

    select spid,

        ecid,

        status,

           loginame=rtrim(loginame),

        hostname,

       ...

  • RE: To know the size of a column...Help

    Depends on what you are after.

    select datalength(col1) from document

    Will return the actual length in bytes of each individual row.

    select sum(datalength(col1)) from document

    Will return the total bytes used by that column...

  • RE: Question of the Day for 27 Apr 2004

    What if you aren't developing in Java?  Another poor question without enough information to come to the correct answer.  "You are a UNIX developer.." certainly doesn't imply you are using Java! ...

Viewing 15 posts - 1 through 15 (of 18 total)