Viewing 15 posts - 13,486 through 13,500 (of 14,953 total)
You can do something like this:
select *
from Table1
where
(MyModifier = 'or' -- OR statement
and
MyColor1 = 'Blue'
or
MyColor2 = 'Blue')
or
(MyModifier = 'and' -- AND statement
and
MyColor1 = 'Blue'
and
MyColor2 = 'Blue')
But it's not going...
June 5, 2008 at 1:17 pm
Yes, the coalesce function, used that way, will give you the list you want, but you can't use the list the way you mentioned in the original post.
create table #t...
June 5, 2008 at 1:08 pm
Here's a test I did. It should do what you need, once you modify it with your actual table and column names.
create table #T (
ID int identity primary key,
FName...
June 5, 2008 at 1:00 pm
I do think programming is an engineering discipline. So is database administration. (Backups = changing the oil, that kind of thing.)
I also don't think software development is mature...
June 5, 2008 at 9:24 am
I thought the question was clear enough. Good test of how Between works, which is all it seemed to me to be about.
I think some may have overthought it....
June 5, 2008 at 9:09 am
Saving the view probably caused the proc to recompile its execution plan.
I generally try to avoid using views in most procs.
June 4, 2008 at 2:16 pm
Try this:
;WITH
ProdCat (ProdID, CategoryID) as
(SELECT productID, min(categoryID)
FROM dbo.CSK_Store_Category
GROUP BY productID),
ChildCats (CatID, ParentID) as
(SELECT categoryID, null
FROM CSK_Store_Category WITH (NOLOCK)
WHERE categoryID = 42
UNION ALL
SELECT t2.categoryID, t2.parentID
FROM CSK_Store_Category t2
INNER JOIN...
June 4, 2008 at 2:12 pm
I've tried to duplicate this behavior from the description given, but can't. So I guess I'm not sure what would cause it.
June 4, 2008 at 1:49 pm
There are several ways to run a proc from Access to a different database. One is to create a VBA script that will run the proc. Another is...
June 4, 2008 at 1:44 pm
That sounds a lot like something that could be done quite easily with Reporting Services. That comes with SQL Server.
June 4, 2008 at 1:11 pm
That helps.
Are you looking for the number of visits per year per person, or total visits per year divided by total people, or total visits per year divided by people...
June 4, 2008 at 12:41 pm
Ah, that's different!
In the "Execute SQL" object, it has a parameters tab. Set up a variable to store the output, assign it to the output parameter, and make sure...
June 4, 2008 at 12:39 pm
Probably not a problem with the download. Usually, if those are corrupted, you get an error message when it's downloading. (I have install disks, with fancy packaging and...
June 4, 2008 at 12:35 pm
Viewing 15 posts - 13,486 through 13,500 (of 14,953 total)