Forum Replies Created

Viewing 15 posts - 316 through 330 (of 621 total)

  • RE: Transpose table with unknown number of fields

    Ok, I took the liberty of assuming the possibility of there being more than one row in your table is too great to ignore. I also took the liberty...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How do you compare two big tables in same database on the same server?

    WebTechie38 (5/12/2009)


    I need to run this for 15 columns. Folks keep posting this same checksum example with one column.

    Check out BOL for CHECKSUM, and it should make sense why...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: Query help

    I can't see why Lowell's solution does not work, unless everyone, regardless of whether or not they have a photo present, exists in the table selling_photo.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: Transpose table with unknown number of fields

    There is probably a better way to do this, without using dynamic SQL, but here is one way to do it. You said your table has one long row....

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: Linked server

    How can I remove them.

    I found this one...

    sp_dropserver.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: change to bit column

    DBA (5/5/2009)


    what about for the future inserts into the table?, is there a way to add a constraint if the column is null when a new row is entered then...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: change to bit column

    Well, its kind of slow today, so... Probably the easiest way is to open EM, right click the table, choose 'Design table', highlight the column, and populate 0 in...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: change to bit column

    Does your column currently have data in it?

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How can I identify triggers enabled?

    You can right click the table in EM, and choose All Tasks > Manage Triggers, and you can see the triggers on your table. Not sure if there is...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: CASE & UPDATE

    Karthik

    I'm just curious, why do you have two different date formats?

    and PerfDate between '01/01/2009' and '24/apr/2009'

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: Difference between 7 and 7.00

    If you are using strictly column values, rather than variables, where you might not be able to enter 100.0, you can add *1.0 in the denominator to do the same...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How do I get an average of the top two values in a result set ?

    Thank you Andrew. Your explaination made it start to stick, more than my reading BOL last night. I guess I can lurk in the performance tuning forum for...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How do I get an average of the top two values in a result set ?

    Andrew, now I am very confused. I tried adding a clustered index on a test table on two columns, then inserted what I knew to be a duplicate record,...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How do I get an average of the top two values in a result set ?

    andrewd.smith (4/16/2009)


    ALTER TABLE dbo.Test ADD CONSTRAINT

    PK_Test PRIMARY KEY CLUSTERED (RowNum)

    CREATE NONCLUSTERED INDEX IX_Test_Company_Date

    ON dbo.Test(Company, Date)

    ALTER TABLE dbo.Test ADD CONSTRAINT

    ...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • RE: How do I get an average of the top two values in a result set ?

    Andrew, thanks for looking further into it. I'm not too savy at how different index schemes affect performance, but clearly this is something I need to think about. ...

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

Viewing 15 posts - 316 through 330 (of 621 total)