Viewing 15 posts - 421 through 435 (of 636 total)
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...
October 2, 2015 at 9:12 am
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
October 2, 2015 at 8:58 am
Tried to upload file several times and it fails ( Upload about 65% and after that the web page in the small window breaks )
October 2, 2015 at 8:44 am
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,...
October 2, 2015 at 8:22 am
Got lost here.. What button/menu item should I use to see the actual plan ? ( not the estimated )
October 2, 2015 at 8:01 am
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 ,,,,...
October 1, 2015 at 3:27 pm
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...
October 1, 2015 at 2:50 pm
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...
October 1, 2015 at 2:31 pm
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...
September 29, 2015 at 12:56 pm
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...
September 29, 2015 at 12:47 pm
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...
September 29, 2015 at 12:44 pm
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...
September 29, 2015 at 12:06 pm
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...
September 29, 2015 at 12:04 pm
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!
September 29, 2015 at 10:45 am
Viewing 15 posts - 421 through 435 (of 636 total)