Viewing 15 posts - 13,321 through 13,335 (of 15,381 total)
Thanks Roy. I just hope the OP realizes how important it is to not run this in production. The first time I ran this on a production box it took...
December 27, 2011 at 8:49 am
Here is some code I put together a few years ago. This code is horribly slow!!!! There is now way around this being slow. DO NOT RUN THIS ON YOUR...
December 27, 2011 at 8:38 am
Since you are wanting to get each value only once something like this should work.
;with data (col1, col2)
as (
select 'aaa', 'sss' union all
select 'aaa', 'ttt' union all
select 'bbb', 'ttt' union...
December 22, 2011 at 1:57 pm
angela.nira (12/22/2011)
What is obvious is that the users on this message board are much more knowledgable with Excel and SQL than I am and perhaps I should have mentioned...
December 22, 2011 at 9:46 am
Shamshad Ali (12/21/2011)
Where domain is not null or empty and domain like...
December 21, 2011 at 4:41 pm
yuvipoy (12/21/2011)
What information you need?
where did you need me to explain?.
i have given conditions i think you where not able to read my post correctly.Other peoples who have...
December 21, 2011 at 8:01 am
or something like...
select [columns]
from tracking t
where not exists
(
select * from Exclusions where t.domain like '%' + e.domain + '%'
)
December 21, 2011 at 7:48 am
Pretty sparse on details to come up with some code but something like this should work.
select [columns]
from tracking t
left join Exclusions e on t.domain like '%' + e.domain + '%'
where...
December 21, 2011 at 7:34 am
This is why you should store date data in a datetime column. Since your are on 2008 and your data does not appear to have time values associated the date...
December 20, 2011 at 12:18 pm
Hadrian (12/20/2011)
questionID Question Pool Level 1 ...
December 20, 2011 at 8:37 am
Better yet, parameterize your queries or turn it into a stored proc. If you are doing inserts with a pass through query you are vulnerable for sql injection. It strongly...
December 20, 2011 at 7:11 am
OK so now we have ddl and sample data. What do you want for output? Your original description is very unclear.
December 20, 2011 at 7:05 am
igngua (12/19/2011)
Lowell (12/19/2011)
December 19, 2011 at 3:57 pm
select count(*) from
(
SELECT COUNT(*) as myCount
FROM Departments INNER JOIN
Employees ON Departments.Id = Employees.DepartmentId INNER JOIN
Results ON Employees.Id = Evaluation.EmployeeId
WHERE (Results.Year = 2011)
and Employees.OrgId = 73
GROUP BY Employees.DepartmentId
) x
Notice that for...
December 19, 2011 at 9:58 am
Krasavita (12/16/2011)
I found that previous programer created Scalar valued fauncion on a seperate database that stored procedure is running and we are not using this db anymore,is there reason that...
December 16, 2011 at 12:35 pm
Viewing 15 posts - 13,321 through 13,335 (of 15,381 total)