Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,065 total)

  • RE: non clustered index question

    Is it better to first drop the indexes, then truncate the table and recreate the indexes at the end of the inserts?

    Absolutely... performance of the inserts should be much...

  • RE: Over-Engineering

    so you might as well ship something that's 80% right and then plan on fixing it right away

    I have to disagree with that notion.

    If I buy some software, I want...

  • RE: GUID or Int is the best for primary key columns?

    Peso (7/14/2009)


    Also a GUID is not "globally" unique. It is guaranteed to be unique within same sql server only.

    Are you sure?

    This is from BOL

    The uniqueidentifier data type stores 16-byte binary...

  • RE: Select TOP 2 Quanities Per ID

    Russell.Taylor (7/7/2009)


    Thanks for the reply but I am using SQL Server 2000 so does not work.

    Doh!!

    Sorry, ROW_NUMBER isn't supported in SQL 2000.

    There is a solution using a self join (join...

  • RE: Auto Backup Script

    Try this:-

    -- 1 - Declare variables

    DECLARE @CMD1 varchar(8000)

    DECLARE @RestoreRootDirectory varchar(255)

    DECLARE @CurrentDate datetime

    DECLARE @CurrentName varchar(8)

    -- 2 - Initialize variables

    SET @CMD1 = ''

    SET @RestoreRootDirectory = 'c:\backups\test\'

    SET @CurrentDate = GETDATE()

    SELECT @CurrentName =...

  • RE: Select TOP 2 Quanities Per ID

    This will get you the top 2 for each id:-

    WITH cte AS (SELECT id, quantity, ROW_NUMBER() OVER(partition by Id ORDER BY Id, quantity desc) AS 'RowNumber' from mytable)

    select id,quantity from...

  • RE: How to customize "Order By" in my select query?

    Rather than add a SortOrder column to the table, just include one in your query e.g.

    select id, forename, case when forename = 'Kim' then 1 else 2 end as SortOrder

    from...

  • RE: Unable to open BCP host data-file error

    ali.m.habib (7/6/2009)


    so what if I want to run it on my D drive on my pc

    You will need to refer to it using UNC notation (\\mypc\d\\alianz\output\CEMTXOUT_ALIANZ)... which means sharing your...

  • RE: Unable to open BCP host data-file error

    Is this file definately accessible by the server hosting your SQL instance.

    Don't forget, "'D:\alianz\output\CEMTXOUT_ALIANZ'" is referring to the D: drive on the server, not the workstation you are connecting from.

    Also,...

  • RE: Do newbies google ?

    Having all these links in a central place is a good idea, but they are more likley to be seen by the veterans than the newbies.

    The newbies seem to have...

  • RE: Sr SQL Server DBA title....Jr DBA responsibilities???

    That third party tool will not interfere with the SQL Server native backup chain. And the backup chain will not interfere with the third party tool's chain.

    I beg to differ....

  • RE: Use of the GO statement

    Do I need to include the GO statement after declaring the variable

    GO isn't actually a TSQL statement... it is used by the likes of SSMS etc to signify the end...

  • RE: Regarding Datbases

    It's 32767.

    If you need anything like this, look up Maximum Capacity Specifications in BOL.

  • RE: How do undo the merge replication

    What exactly do you mean?

    If you want to remove a merge replication publication, you can right-click the publication in Enterprise Manager and click "Delete"

  • RE: Is there any way to delete records withouta dropping FKs

    I'm shocked and appalled some people have a total disregard for Referential Integrity.

    Can't say I'm shocked... Appalled, yes.;-)

Viewing 15 posts - 571 through 585 (of 1,065 total)