Forum Replies Created

Viewing 15 posts - 8,731 through 8,745 (of 13,882 total)

  • RE: Which of these indexes should be deleted?

    sm_iransoftware (1/29/2015)


    I run this query on my database.

    Most of the result are : PK_ ... ?

    Why?

    (note that in all our tables , we insert an id column - identical -...

  • RE: Which of these indexes should be deleted?

    umarrizwan (1/28/2015)


    DECLARE @dbid INT

    SELECT @dbid = DB_ID(DB_NAME())

    SELECT OBJECTNAME = OBJECT_NAME(I.OBJECT_ID),

    INDEXNAME = I.NAME,

    I.INDEX_ID

    FROM SYS.INDEXES I

    JOIN SYS.OBJECTS O

    ON I.OBJECT_ID = O.OBJECT_ID

    WHERE OBJECTPROPERTY(O.OBJECT_ID,'IsUserTable') = 1

    AND I.INDEX_ID NOT IN (

    SELECT S.INDEX_ID

    FROM SYS.DM_DB_INDEX_USAGE_STATS S

    WHERE S.OBJECT_ID...

  • RE: Need to increase query performance

    prasadau2006 (1/28/2015)


    Hello Friends,

    I need help with the following query, this query is taking more than 20mins to complete. I'm using a left join to

    pull the data.

    Query:

    Insert into dbo.SecondTable

    Select b.*...

  • RE: How to optimize the below query?

    A quick note: starting a CTE with a semicolon is like starting a sentence with a '.'

  • RE: How to optimize the below query?

    toraghubiz (1/28/2015)


    Table Dept has two columns (did(int) , dname(varchar)).

    Table emp has five columns (eid(int), mid(int), nme(varchar), did(int), city(varchar)).

    Now I need to get the names of all departments having more than...

  • RE: Just an idea ...

    DonlSimpson (1/27/2015)


    I know this is fairly radical, but I enforce an alphabetic order to the column list in the schema. My only concession is pk first.

    I got...

  • RE: Append SQL Table with SSIS Package

    atul.jadhav (1/27/2015)


    Dear Phil Parkin

    yes, that's why I created table and have separate Year and Month column in my excel/sql table

    please give way

    I told you the way. I'm not going to...

  • RE: Append SQL Table with SSIS Package

    atul.jadhav (1/27/2015)


    Is there a unique key in the source Excel data?

    It seems that your ideal flow would be something like:

    1) Process Excel file. For each row:

    2) Does row exist in...

  • RE: Append SQL Table with SSIS Package

    Is there a unique key in the source Excel data?

    It seems that your ideal flow would be something like:

    1) Process Excel file. For each row:

    2) Does row exist in target...

  • RE: Which of these indexes should be deleted?

    sm_iransoftware (1/26/2015)


    Which search? (select from dmv's or select from taht table)

    I have no idea what you mean. Did you check the link?

  • RE: Which of these indexes should be deleted?

    sm_iransoftware (1/26/2015)


    Then what is the best way to get Unused indexes?

    A brief search suggested this[/url].

  • RE: Selecting and merging records for a singular complete record

    k.allen.emt (1/25/2015)


    Phil,

    that looks like it would work for data you give to the statement itself.

    I'm looking to go through close to 6 million records in leadsdb.leads

    not manually do it

    There was...

  • RE: Selecting and merging records for a singular complete record

    Try the following:

    with data

    as (

    select PhoneNo = '727-555-1234'

    ...

  • RE: Just an idea ...

    mister.magoo (1/24/2015)


    ...or you can use the Object Explorer Details view to sort the columns.

    Just click on the "Columns" node in Object Explorer, then press F7 to open the details view...

  • RE: ID or Id

    ScottPletcher (1/23/2015)


    Phil Parkin (1/23/2015)


    Steve Jones - SSC Editor (1/23/2015)


    I tend to use ID, but that's I think my OCD coming in. ID is an acronym. Product is a word.

    ProductId would...

Viewing 15 posts - 8,731 through 8,745 (of 13,882 total)