Viewing 15 posts - 2,851 through 2,865 (of 6,486 total)
Tech_Newbie (6/17/2008)
To Matt Miller -I am aware of that, however, I am under the assumption that i can simply encase it in a...
June 17, 2008 at 10:00 am
Tech_Newbie (6/17/2008)
If you are selecting 30 people
out of 100 possible people (they meet the criteria)
and the 100 is within...
June 17, 2008 at 9:25 am
Jeff Moden (6/17/2008)
rudy komacsar (6/17/2008)
June 17, 2008 at 8:44 am
--Clean up testing scenario
drop table #petnames
drop table #petnames2
drop table persons
drop table person_pets
drop table #temp
go
drop function concatf
go
CREATE FUNCTION Concatf(@ID AS INT)
RETURNS VARCHAR(8000)
AS
BEGIN
...
June 17, 2008 at 8:37 am
Yup - I can fix the one issue on tempDB, but it still performs rather poorly on few, big groups. So - while it can beat the concat function...
June 17, 2008 at 7:46 am
majorbloodnock (6/17/2008)
An SSC member starts putting together a Question of the Day, and,...
June 17, 2008 at 7:39 am
Update.....
I kind of came across an ugly realization. The running total scenario has potential to "blow up" your tempDB rather spectacularly, if you play on the "extreme low end"...
June 17, 2008 at 5:48 am
Jeff Moden (6/16/2008)
Outstanding... thanks for the feedback, Matt. And, I'm sorry... I didn't realize that you were already beating the distinct drum on the usage of the function...
Oh -...
June 16, 2008 at 9:19 pm
Jeff Moden (6/16/2008)
Pierre Boucher (6/16/2008)
So, if you see my resume at your company, I will deny ever writing that code :ermm:Pierre... I think I like your attitude... alot!:)
Agreed!
June 16, 2008 at 9:02 pm
You're right on at least one side. The function can be built better. I was aware that the concat wouldn't lead to that large of a string, so...
June 16, 2008 at 8:57 pm
The issue apparently is that you have alphanumeric values in the second table's join field, which can't be cast to a numeric value, so the link is "invalid".
You could do...
June 16, 2008 at 6:32 pm
Sergiy (6/16/2008)
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,...
June 16, 2008 at 5:16 pm
You're just about there:
CREATE TABLE #tempdays (
PK INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
days VARCHAR(255)
)
INSERT INTO #tempdays
select SelectedDays from FAS_LaborCalendar
select fl.*, daysleft
from
FAS_LaborCalendar fl
LEFT OUTER join
(select pk,count(*) daysLeft from
(
SELECT...
June 16, 2008 at 5:15 pm
Viewing 15 posts - 2,851 through 2,865 (of 6,486 total)