The Latest

DevX - Software Development Resource

Automatically Assigning Values

Question: [Joe Celko’s Hotel Rooms Puzzle]Ron Hiner put this question on the Watcom forum on CompuServe. He had a data conversion project where he needed to automatically assign some values

DevX - Software Development Resource

Comparing Aggregate Results

Question: [Joe Celko’s Promo Puzzle]Let’s assume that you have just gotten a job as the sales manager for a department store. Your database has the following two tables. One is

DevX - Software Development Resource

Calculating Averages Using Clock Times

Question: Joe Celko’s Store Survey Puzzle]You are collecting statistical information stored by the quarter hour. What your customer wants is to get information by hour ? not on the hour.

DevX - Software Development Resource

Finding the Most Recent and Consecutive Data

Question: [Joe Celko’s Pension Plan Puzzle]Luke Tymowski, a Canadian programmer, posted an interesting problem on the MSAccess forum on CompuServe in 1994 November. He was working on a pension fund

DevX - Software Development Resource

Finding Data Based on Contents of Multiple Columns

Question: Joe Celko’s Playing the Ponies Puzzle]You have just become the database manager for Eddie Franco “the Doctor” Coddetti. He keeps records on horse races for statistical purposes and his

DevX - Software Development Resource

VRML displaying information on a Web site

Question: Is there a site where VRML is being used to display information in a unique way? Answer: Yes, the most innovative site I have come across is that of

DevX - Software Development Resource

Tax Problem Puzzle

Question: [Joe Celko’s Tax Problem Puzzle]I got this one from Richard S. Romley, via CompuServe. We were engaged in a debate about Sybase’s old T-SQL versus ANSI/ISO SQL-92. I assume

DevX - Software Development Resource

Wildcard Searches in SQL

Question: Are wildcards allowed when trying to matchthe contents of a textfield as in the following example? SELECT * FROM Database WHERE textfield = ‘B*’ Answer: Yes, but you’ll need

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

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

INSERT INTO Syntax

Question: What is the standard SQL-92 syntax for INSERT INTO? Answer: Be sure to check your product documentation for any variations! This is standard syntax, but not all products will

DevX - Software Development Resource

What is GMD’s Dynamic Worlds proposal about?

Question: Please explain Dynamic Worlds. Answer: “The Power of Dynamic Worlds” proposal from the German National Research Center (GMD) is based on an interaction model developed for collaborative distributed virtual

DevX - Software Development Resource

Why won’t my VRML browser work with 2.0?

Question: I went to see one of the new VRML 2.0 sites, but only sawblackness. What is going on? Why won’t my VRML browserwork with the new version? Answer: Just

DevX - Software Development Resource

What is Microsoft’s Active VRML proposal about?

Question: What are the key features of Active VRML? Answer: Microsoft’s Active VRML, is a proposal built on top Microsoft’s Direct X suite of graphics/multimedia APIs, and also incorporates Microsoft’s

DevX - Software Development Resource

How compatible are VRML browsers?

Question: If I make a VRML page, can it be read by any browser? Answer: The original idea behind VRML 1.0 was that any VRML scene should be viewable using

DevX - Software Development Resource

Finding the Top n Within a Group

Question: [Joe Celko’s Best Salesmen by Territory Puzzle]Martin Tillinger posted this problem on the MSAccess forum of CompuServe. How do you get the top three salesmen in each territory, given

DevX - Software Development Resource

How can I create VRML pages?

Question: What can I use to produce VRML, or can I write it like HTML? Answer: It is possible to write VRML as a purely text-based language, using a regular

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

Calculating Running Totals

Question: [Joe Celko’s Quantity on Hand Puzzle]You are now the guy in charge of the company inventory. You get requisitions that tell how many widgets people are putting into a

DevX - Software Development Resource

CHECK Constraint To Avoid Overlapping Data

Question: [Joe Celko’s Reservations Puzzle]Since I spend a lot of time this column talking about problems with the order of execution of SQL statements, it is only fair that I

DevX - Software Development Resource

What is VRML?

Question: I’ve heard a lot about VRML, but don’t know what it is. Please explain. Answer: VRML (Virtual Reality Markup Language) is a method for sending 3D data across the

DevX - Software Development Resource

Finding Two Equal Sets of Data

Question: [Joe Celko’s Equal Sets Puzzle]Set theory has two symbols for subsets. One is a “horseshoe” on its side, which means that set A is contained within set B and

DevX - Software Development Resource

Dataflow Diagrams

Question: [Joe Celko’s Dataflow Diagrams Puzzle]Tom Bragg posted a version of this problem on the CASE Forum on CompuServe. You have a table of dataflow diagrams (DFDs), which has the

DevX - Software Development Resource

Pivoting Table Data — Horizontal Display

Question: [Joe Celko’s Milestones Puzzle]This puzzle, in a little different form, came from Brian Young. His system tracks a series of dates (milestones) for each particular type of service (tos)

DevX - Software Development Resource

Finding Exactly Two of Three — Conditions

Question: We are putting together a book with contributions from many Anthologies (identified by their contrnum). We want to find all Anthologies thathave articles in exactly two out of three

DevX - Software Development Resource

Finding Unique Data

Question: How would I change the following statement to yieldonly unique values? select * FROM WEBDBASE where ST = ‘#State#’ AND #SPECIALTY# = ‘x’; Answer: You can’t get unique values