September 18, 1998

using COUNT and GROUP BY with zero-values

Question: I’m trying to query our Human Resources database to find the number of temporary employees in each department. I’m using the following SQL statement: select count (*)from employeewhere status


Question: I have a table like this: name cat1 cat2—- —— —–A 1 orangeA 1 orangeB 1 appleB 1 appleB 1 appleC 2 bananaC 2 bananaC 2 bananaC 2 banana

adding records but not using primary key

Question: Is there any other way apart from using the INSERT INTO command that allows you to append a line to a database? I have a primary key “ID,” but

Can PB act as a COM Server

Question: I am working with a client that has a Powerbuilder application. We need to call that app through a variety of APIs. The client says that they cannot act


Question: I have a select query “Select * from Table where ID in (8, 2,3,78,32,1,7)” that I want returned in the same order that the IDs are in in the

SQL order by count

Question: I need to know how to order by the count of the selected field. For example: Select xxx count(xxx)from prod-tableorder by xxxI’d like to order/rank field xxx highest to

Connection Limits to SQL Server?

Question: Is there a limit to the number of connections to an SQL server? If so, how many connections are permitted at one time? Answer: The number of connections is

Titles of SQL reports

Question: Is there a way to title report outputs in SQL? Answer: If you are creating a quick and dirty report, you can always add a title simply by putting