all groups > sql server data mining > september 2005 >
You're in the

sql server data mining

group:

SELECT Command - For beginner.



SELECT Command - For beginner. Ben
9/7/2005 12:00:00 AM
sql server data mining: Hi, I am having a problem with a SELECT Command.

I am wanting to search unique queries from TableA where Field1 = "specific
Criteria" and Field2 = "Another Specific Criteria.

The string that I have is as follows:

SELECT DISTINCT * FROM Table WHERE fld1 = 'opt1' AND WHERE fld2 = 'opt2';

Any help is appreciated. As you see I am still very new to SQL queries

RE: SELECT Command - For beginner. Jose G. de Jesus Jr MCP, MCDBA
9/7/2005 8:05:06 AM
use northwind

select orderid,customerid,employeeid from orders
where customerid='vinet' and employeeid=5

group by customerid,employeeid,orderid
having count(*) = 1

--
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787


[quoted text, click to view]
Re: SELECT Command - For beginner. Ben
9/8/2005 12:00:00 AM
Thank you. It sorted out for me.

AddThis Social Bookmark Button