Viewing 3 posts - 1 through 3 (of 3 total)
You are not allowed to use IF statements in your where clauses. I can see what you are trying to do though and maybe this will work for you:
Create Procedure...
November 23, 2004 at 6:46 pm
You'd need a union for each column. ie:
CREATE VIEW [dbo].[NiceChildren] As,
SELECT [ID], Child1 FROM [dbo].[Children]
UNION ALL
SELECT [ID], Child2 FROM [dbo].[Children]
UNION ALL
SELECT [ID], Child3 FROM [dbo].[Children]
UNION ALL
SELECT [ID], Child4 FROM [dbo].[Children]
November 15, 2004 at 5:12 pm
Hi, out of curiosity, does this return the correct data?
SELECT a.raccount,b.Classification
FROM master_tix_header a
JOIN tblProductType b ON a.revent = B.Event
WHERE a.ryear BETWEEN 1999 AND 2002
GROUP BY a.raccount, b.Classification HAVING COUNT(*) = 1
?
November 15, 2004 at 5:09 pm
Viewing 3 posts - 1 through 3 (of 3 total)