Viewing 15 posts - 2,986 through 3,000 (of 6,036 total)
Kevin Rathgeber (6/16/2008)
Move @loop_counter out of the while into an IF statement outside the loop. Though its minimal, there is no point...
June 17, 2008 at 6:52 am
I don't specifically understand exactly how you're using your syntax,
I don't. 🙂
It was not actual syntax, of course.
What I meant is you need to join table to itself
ON T1.TermWeekNo =...
June 16, 2008 at 6:58 pm
Did anybody of you guys hear about relational databases?
Something about placing business rules into data, not into code?
What if tomorrow some ranges will need to be changed?
Can you customers do...
June 16, 2008 at 6:45 pm
Matt Miller (6/16/2008)
Good eye - didn't gather that the first time reading through!
It's a follow-up for this:
http://www.sqlservercentral.com/Forums/Topic517329-8-1.aspx
I had a chance to miss the point there.
:hehe:
June 16, 2008 at 5:34 pm
Matt Miller (6/16/2008)
Supplement Sergiy's great suggestion with something like a Tally Table, and you could write years worth of these at a time.
His KCC table is actually Calendar table, kind...
June 16, 2008 at 5:10 pm
You don't need sequence.
You need number of weeks (7 day groups) from some initial date.
UPDATE KCC
SET sequence = DATEDIFF(dd, @InitDate, kcc_date)/7
WHERE {if you need some}
June 16, 2008 at 3:18 pm
So I _also_ need to build in checking that stops this report firing when the holidays are on. It sounds pretty hardcore.. maybe I will simply have a separate schedule...
June 15, 2008 at 8:42 pm
You should have another column in your Calendar table - No of Term Week.
It will hold all term weeks in sequence, 1st week of next term will continue the sequence...
June 15, 2008 at 8:05 pm
Yes, of course.
Let's say, it was an intentional bug to make OP to analize and understand the code, not to just copy-paste it.
😉
Does it work as an excuse? 😛
And just...
June 12, 2008 at 8:01 pm
SELECT COUNT(*) -- all rows
*100/
COUNT(CASE WHEN DateCol > @DateEdge THEN 1 ELSE NULL END) -- only rows meeting criteria to be counted
FROM ...
June 12, 2008 at 6:53 pm
It's not SQL2K.
It's ODBC driver you use for Linked Server connection.
ODBC drivers don't have bulk insert functionality, when you do insert on remote server driver declares cursor and inserts row...
June 12, 2008 at 4:58 pm
Just declare variable as CHAR, not VARCHAR.
SQL Server will do everything for you.
June 12, 2008 at 5:50 am
Don't do 2 years.
Do 1 week at a time. According to your estimation 1 week takes about 400 rows - nothing really.
Run it once per 2 hours - and you're...
June 12, 2008 at 5:35 am
Shark Energy (6/12/2008)
The issue with doing this in one big chunk I feel is that if it goes wrong, thats 40,000 records in one hit. Individually you can track each...
June 12, 2008 at 3:43 am
Being in QA or EM press {F1}, click on "Index" tab, type "CAST", hit Enter twice.
Scroll to the table with date conversion styles.
Pay special attention to the line with ISO...
June 11, 2008 at 8:43 pm
Viewing 15 posts - 2,986 through 3,000 (of 6,036 total)