Viewing 15 posts - 1,111 through 1,125 (of 2,647 total)
USE test
CREATE TABLE testConstraint (
A int Null,
B int Null,
C int Not Null)
alter table testConstraint
add constraint threeColumn CHECK ((C = 150 AND A IS NOT NULL) OR (C = 151 ...
Jared
CE - Microsoft
April 17, 2012 at 3:16 pm
GilaMonster (4/17/2012)
SQLKnowItAll (4/17/2012)
Jared
CE - Microsoft
April 17, 2012 at 1:44 pm
I looked back at your original post and realized that you are not deleting all of the records needed to perform the second delete. ALL records with the foreign...
Jared
CE - Microsoft
April 17, 2012 at 1:42 pm
Without the field order, it is useless. Index on columnA, columnB, columnC is completely different from columnC, columnB, columnA.
Jared
CE - Microsoft
April 17, 2012 at 1:36 pm
sqlfriends (4/17/2012)
Jared
CE - Microsoft
April 17, 2012 at 1:31 pm
Lynn Pettis (4/17/2012)
SQLKnowItAll (4/17/2012)
sqlfriends (4/17/2012)
SQLKnowItAll (4/17/2012)
ALTER TABLE [dbo].[batSchoolRangeProgramResult] WITH CHECK ADD CONSTRAINT [FK_batSchoolRangeProgramResult_appSchoolRangeProgramSnapshot] FOREIGN KEY([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
REFERENCES [dbo].[appSchoolRangeProgramSnapshot] ([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
So the constraint...
Jared
CE - Microsoft
April 17, 2012 at 1:18 pm
sqlfriends (4/17/2012)
SQLKnowItAll (4/17/2012)
ALTER TABLE [dbo].[batSchoolRangeProgramResult] WITH CHECK ADD CONSTRAINT [FK_batSchoolRangeProgramResult_appSchoolRangeProgramSnapshot] FOREIGN KEY([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
REFERENCES [dbo].[appSchoolRangeProgramSnapshot] ([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
So the constraint is on batSchoolRangeProgramResult...
Jared
CE - Microsoft
April 17, 2012 at 1:14 pm
OP, look at your first error:
"FK_ProgramResult_ProgramSnapshot". The conflict occurred in database "MyDB", table "dbo.ProgramResult".
EDIT: OP changed names in first post from the actual in the attached code.
Jared
CE - Microsoft
April 17, 2012 at 1:08 pm
No, look:
ALTER TABLE [dbo].[batSchoolRangeProgramResult] WITH CHECK ADD CONSTRAINT [FK_batSchoolRangeProgramResult_appSchoolRangeProgramSnapshot] FOREIGN KEY([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
REFERENCES [dbo].[appSchoolRangeProgramSnapshot] ([ProcessID], [SchoolYear], [SchoolID], [RangeCd], [ProgramID])
So the constraint is on batSchoolRangeProgramResult and that...
Jared
CE - Microsoft
April 17, 2012 at 1:03 pm
Not to beat a dead horse... Maybe I'm not.
1. A Primary Key cannot contain a NULL value.
2. You can place a unique constraint on a column, which will...
Jared
CE - Microsoft
April 17, 2012 at 11:24 am
Ok, let's start with this... Which table has more records than the other? My "guess" (since you have not included DDL for the tables and sample data as...
Jared
CE - Microsoft
April 17, 2012 at 11:14 am
vinu512 (4/14/2012)
Insert Into tbl_year
Select * From tbl_Jan
Union All
Select * From tbl_Feb
Union All
Select * From tbl_March
Union All
Select * From tbl_April
Union...
Jared
CE - Microsoft
April 17, 2012 at 11:06 am
Lynn Pettis (4/17/2012)
SkyBox (4/17/2012)
S_Kumar_S (4/17/2012)
25 indexes on an OLTP table is quite high. You may also want to look for partial duplicate indexes which can be merged with other indexes.
There...
Jared
CE - Microsoft
April 17, 2012 at 10:48 am
SkyBox (4/17/2012)
S_Kumar_S (4/17/2012)
25 indexes on an OLTP table is quite high. You may also want to look for partial duplicate indexes which can be merged with other indexes.
There are a...
Jared
CE - Microsoft
April 17, 2012 at 10:35 am
PiMané (4/17/2012)
Lynn Pettis (4/17/2012)
PiMané (4/17/2012)
Thanks.. that's probably it... it has very low amount of data.In addiction, what's the "optimal", if possible, fillfactor value? 90?
Thanks,
Pedro
Simple answer, it depends. It depends...
Jared
CE - Microsoft
April 17, 2012 at 9:56 am
Viewing 15 posts - 1,111 through 1,125 (of 2,647 total)