Forum Replies Created

Viewing 15 posts - 121 through 135 (of 225 total)

  • RE: Removing Duplicate Rows

    Gary, this should get you started.  Assuming that the duplicate record you want to keep is arbitrary, you can left join to a derived table to get the information you...

  • RE: Removing Duplicate Rows

    Gary, I replied earlier to your problem and have since deleted that post.  I was not reading clearly and have since noticed that you have an indentity column as your...

  • RE: Order By using a variable

    Regarding the error, I found that

    Set @order = 2

    select empid, empname

    from employees

    order by case @order

    when 1 then empid --(or 1)

    when 2 then empname

    when....end

    works when the actual columns receiving the "order...

  • RE: DR restores - what SQL ops are needed?

    The MSDE DB's mentioned in the thread have very low transaction rates.  They typicaly feed one to two user apps that are used a couple times per week only.  Accordingly,...

  • RE: Indexes named "_WA_Sys_*"???

    GBN, can you ellaborate?  This is from BOL:

    "Creating a PRIMARY KEY or UNIQUE constraint automatically creates a unique index on the specified columns in the table. There are no significant...

  • RE: INSERT in AS400/DB2

    OK, now I see the whole SELECT * FROM LINKEDSERVER.CATALOG.SCHEMA.TABLENAME syntax.  This is actually based on an interpretation that SQL is making regarding native AS400 objects.

    Anyway, I tried both of...

  • RE: INSERT in AS400/DB2

    AS400's don't use owners, catalogs, DB's etc (well, not like MS SQL anyway).  Typically you would SELECT * FROM Library.Table (aka Library.FILE)

    Therefore, I'm not sure about your syntax here with...

  • RE: T-SQL for the Analyst

    With today's post I just noticed this thread for the first time.  Regarding "analysts", I think it is important to specify what it is an analyst analyzes.  At my company,...

  • RE: Indexes named "_WA_Sys_*"???

    Ahh yes, that makes sense.  Thanks for the quick response.  So, assuming that all data was transfered would you expect that extreme table fragmentation in the source DB might account...

  • RE: tsql help

    From your post I guess you are trying to duplicate ID = '222', but not '1111', right?

    How about:

    select *

    From lookup_vw(nolock)

    where cod = 'oac'

    and acc_id in ('1111', '222')

    UNION ALL

    select *

    From...

  • RE: Overhead when using datatype varchar ?

    I think varchar has a 1 to 2 byte overhead for storing its variable length information.  There is also a very small computational increase in processing varchars as opposed to...

  • RE: General SQL question

    Curtis, this will depend on lots of things.  First of all, do you have FK relationships and constraints on the SQL tables?

    I would suggest doing a search on google for...

  • RE: Bulk Copy vs Simple recovery models

    Recovery model

    Benefits

    Work loss exposure

  • RE: Bulk Copy vs Simple recovery models

    I don't think so.  I believe bulkcopy still logs changes at the extent level (or page level...I can't remember) instead of every single record as for FULL.  I believe this is...

  • RE: INSERT Question

    Sure, based on your example + the user ID you have:

    ID1   ID2   ID3   Adress         City   Zip      UserID

    1      A      T     123 My St.    My    12345    ME

    ID1   ID2   ID3   Adress         City   Zip     ...

Viewing 15 posts - 121 through 135 (of 225 total)