Viewing 15 posts - 91 through 105 (of 254 total)
Also consider that an index may have been altered, added, or deleted deliberately or accidentally. Also, statistics could have been updated and actually backfired causing SQL Server to guess poorly...
October 13, 2004 at 6:34 am
The only other thing I can come up with right now is to turn what might be a sequential process into a set based process. If you are generating a...
October 11, 2004 at 4:14 pm
SELECT PMT1.* FROM PaymentTable PMT1 WHERE PMT1.Date = ( SELECT MAX(PMT2.Date) FROM PaymentTable PMT2 WHERE PMT2.AccountNum = PMT1.AccountNum )
October 11, 2004 at 3:59 pm
The SUM and COUNT are counting all cars for that month for ALL departments. The following two parts need to have another condition added to them.
SELECT SUM( AntDays ) FROM...
October 11, 2004 at 9:35 am
Sorry about that. I made a copy/paste error. In the newest INSERT the "GjelderFra" needed to be "MonthsTable.TheMonth" in the big case statement. The following version should work. Alternatively you...
October 11, 2004 at 8:34 am
The new insert goes after the original insert. It is intended to fill the gaps that are left by the primary insert. The latest error you got was because you left...
October 11, 2004 at 8:02 am
Good. I think we are almost done now. I briefly mentioned a solution to this earlier on. I will provide better detail this...
October 11, 2004 at 7:19 am
Sorry about that. The "ALTER TABLE #Months" line was something I started and then decided against. I was supposed to delete it but I forgot to. You should be fine.
October 8, 2004 at 1:37 pm
The counts say that the tables are fine. I notice nothing wrong with your SQL related to 2004 being omitted. I have two unrelated comments, though. First, you should avoid SELECT...
October 8, 2004 at 8:30 am
This forum editor converted part of my post into a face graphic as below.
CREATE NONCLUSTERED INDEX IX_#DataRows ON #DataRows
(
MonthGroup, SiOppForsikringFra
ON [PRIMARY]
When you look...
October 8, 2004 at 8:07 am
I'm not sure I understand the relationship requirement. You could simply make a primary key of all three columns. Therefore, so long as any one differs you are allowed a...
October 7, 2004 at 4:23 pm
David's approach is by my understanding the more conventional way to maintain a many-to-many relationship. It's main advantage over your two solutions is that if you re-use model names a lot or...
October 7, 2004 at 4:13 pm
The easy one first. For char and varchar fields, the length = number of bytes (almost). For nchar and nvarchar the length = 1/2 number of bytes because each character...
October 7, 2004 at 3:46 pm
I've never been in the market for a web hoster, but there was an article posted here recently about a review of MyLittleAdmin. It is marketed towards hosters and has...
October 7, 2004 at 3:17 pm
I didn't notice you reported the counts at the end of your post a couple posts back. 13 seems really small considering you mentioned there are over 15000 cars. Were those...
October 7, 2004 at 12:39 pm
Viewing 15 posts - 91 through 105 (of 254 total)