question please
please i hav a question..can uoy answer me??
i have a workers table which contains 4 records such as (id,name,category, status) ...
category like : a,b,c
i want to write query to obtain 3 workers that their status = free and belong to each category (a,b and c )
can you help me ??
Ryan AlfordPosted Jul 30, 2008, 11:19 AM
ID
, Name
, Category
, Status
FROM WORKERS
WHERE Status = 'Free'
AND Category IN ('a','b','c')
If 'a', 'b', and 'c' are the only possible categories, then you can remove "AND Category IN ('a','b','c')"
Posted Jul 30, 2008, 6:44 AM
select ColumnName1,ColumnName2 from TableName where ColumnName2 in(select top 3 ColumnName2 from test) and Condition=ConditionExperation
Muhammad ShakirPosted Jan 9, 2007, 4:06 AM
it will show all workers whose status is free and all department of workers will also include.
Muhammad ShakirPosted Jan 9, 2007, 4:06 AM
it will show all workers whose status is free and all department of workers will also include.