Tip Bank

DevX - Software Development Resource

ODBC Versus SQL

Question: What are the disadvantages of ODBC versus SQL? Answer: ODBC is a generic implementation, whereas native SQL is always optimized for the database server being used. Thus, if you

DevX - Software Development Resource

Solving Multiple Conditions Within a Group

Question: [Joe Celko’s Work Order Puzzle]Cenk Ersoy asked this question on the Gupta Forum on CompuServe. He has a table that looks like this: CREATE TABLE Projects (workorder CHAR(5) NOT

DevX - Software Development Resource

Finding the Greatest Lower Bound

Question: [Joe Celko’s Sales Gaps Puzzle]Given a table “sales” and a column “saledate” and “customer,” is there a way to get the average number of days between sales dates for

DevX - Software Development Resource

Indexes in SQL

Question: Is it possible to set indexes between tables in SQL expression? Answer: You can establish indexes on SQL tables, but SQL indexes do not create an implied relationship between

DevX - Software Development Resource

Sorting “Codes” within a Column

Question: I have a table that consists of numbers stored as characters.How can I sort them in numerical order? I can’t convert thisfield to numeric because some content is alpha