Forum Replies Created

Viewing 15 posts - 421 through 435 (of 636 total)

  • RE: how do I fine tune this query

    Do you want me to redefine the index using the "INCLUDE" clause ? Is that what you mean ?

    Can you pass an example please of what you mean by a...

  • RE: how do I fine tune this query

    See whether this works...

    https://drive.google.com/file/d/0B2u1Uo4GKWj9V0pQMGZaMlN3Unc/view?usp=sharing

    paste link on browser as URL, your browser might think it is an audio file.. never mind.. I was able to download it

  • RE: how do I fine tune this query

    Tried to upload file several times and it fails ( Upload about 65% and after that the web page in the small window breaks )

  • RE: how do I fine tune this query

    Can you help me understand this ...

    I have the following index defined on hinstp table covering 2 columns ( ADMDT, FORMN )

    PK_HINSTPclustered, unique, primary key located on PRIMARYADMDT,...

  • RE: how do I fine tune this query

    Got lost here.. What button/menu item should I use to see the actual plan ? ( not the estimated )

  • RE: how do I fine tune this query

    This is a great query but I am not sore I understand what those numbers mean to me .

    Are you saying those indexes ( I mean the create index ,,,,...

  • RE: how do I fine tune this query

    Too complicated..

    What is a DMV ?

  • RE: how do I fine tune this query

    No need

    found one

    --select s.name, t.name as table_name , c.name as column_name, i.name

    select distinct c.name as column_name

    from sys.tables t

    inner join sys.schemas s on t.schema_id = s.schema_id

    inner join sys.indexes...

  • RE: how do I fine tune this query

    Ok thx

    Can you help me with this then ?

    I like to write a query where I pass a name of a table and column and then it will simply return...

  • RE: syntax help please ....

    The point is ...

    I don't have to worry about any inserts that fail due to violation of the primary key... ... No error messages .. that means the script will...

  • RE: syntax help please ....

    Run this and you will see what I mean ... No errors and the output will be 2 rows...

    IT WORKS

    CREATE TABLE #t

    (

    [MemberID][int]NOT NULL,

    [MemberNbr][char](11)NOT NULL,

    [M_MIN_EligibilityStartDate][int]NULL,

    [M_MAX_EligibilityEndDate][int]NULL,

    [MM_MIN_EligibilityStartDate][int]NULL,

    [MM_MAX_EligibilityEndDate][int]NULL,

    [MIN_EligibilityStartDate][int]NULL,

    [MAX_EligibilityEndDate][int]NULL

    CONSTRAINT members_pk PRIMARY KEY ([MemberID],[MemberNbr]) WITH...

  • RE: syntax help please ....

    Finally Found IT... Here you go ... That little extra IGNORE_DUP_KEY will do the trick.

    So if you attempt tp violate the primary key.. SQL Server will be quiet and...

  • RE: syntax help please ....

    CREATE TABLE [dbo].[Member_Info]

    (

    [MemberID][int]NOT NULL,

    [MemberNbr][char](11)NOT NULL,

    [M_MIN_EligibilityStartDate][int]NULL,

    [M_MAX_EligibilityEndDate][int]NULL,

    [MM_MIN_EligibilityStartDate][int]NULL,

    [MM_MAX_EligibilityEndDate][int]NULL

    CONSTRAINT members_pk PRIMARY KEY ([MemberID],[MemberNbr])

    );

    INSERT INTO [Member_Info] ( [MemberID], [MemberNbr],[M_MIN_EligibilityStartDate], [M_MAX_EligibilityEndDate] )

    select [MemberID], [MemberNbr],

    MIN(M.EligibilityStartDate) as [M_MIN_EligibilityStartDate],

    MAX(case when M.EligibilityEndDate = 0 then 99999999...

  • RE: syntax help please ....

    No ...

    When I do an insert I only want the rows that don't violate the primary key to get inserted.

    What happens is when I do an insert to table A...

  • RE: How do I navigate SQL SeverCentral to locate the exact thread

    Found, Thx,

    Ahh.. They should have made it more prominent and in the left menu.

    I would guess everyone would find that useful..

    OK, THX, Good Job!

Viewing 15 posts - 421 through 435 (of 636 total)