> > > > [/search]> >> > select ItemType, ItemCat> from somedatabase> group by ItemType, ItemCat> Actually, I take that back. If you want to get the distinct values ineach field, you will need to do what John Hill said and SELECT DISTINCT fieldname from dbfor each field in questions. My way will give you all unique _combinations_ of the fields in question, not a single list of each columns unique values.If you normalize your database, you would have ItemType and ItemCattables with a single record for each value. Then your main databasewould key into those tables for the values of each record. See anydecent book on relational databases for details.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list > > > > [/search]> >> > select ItemType, ItemCat> from somedatabase> group by ItemType, ItemCat> Actually, I take that back. If you want to get the distinct values ineach field, you will need to do what John Hill said and SELECT DISTINCT fieldname from dbfor each field in questions. My way will give you all unique _combinations_ of the fields in question, not a single list of each columns unique values.If you normalize your database, you would have ItemType and ItemCattables with a single record for each value. Then your main databasewould key into those tables for the values of each record. See anydecent book on relational databases for details.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list DOWNLOAD WEBDNA NOW! The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
John Peacock wrote:> > Charles Kline wrote:> >> > I need to perform a query on an SQL datasource and summarize the results of> > a couple of the columns in the table. To do this in WebCat is no problem,> > but I can't figure out the equivalent syntax in SQL. Any help would be> > appreciated.> >> > [search db=some.db&neItemIDdata=BLANK&ItemTypesumm=T&ItemCatsumm=T]> > > >
Top Articles:
Talk List
Related Readings:
Country & Ship-to address & other fields ? (1997)
TCPconnect to DNS (2000)
WebMerchant Problem (1999)
ledata&gedata in same search (1996)
Sorting Numbers (1997)
Major bug report on rootbeer (1997)
[OT] HTML, HTML docs (2001)
What file? (1997)
Database Structure? (1998)
WebCat2b13 Command Reference Doc error (1997)
WebCatalog Plug-in for Webstar. (1997)
OT: javascript for dynamic pulldowns? (1998)
[WebDNA] anyone have a good tcpconnect post snippet? (2009)
[WebDNA] Attack? (2015)
2.0 Info (1997)
Re[2]: Using [Include] Context (1999)
Mail Service Dead (1998)
F3 crashing server (1997)
RE: Languages (1997)
State Coalition Approves Internet Sales Tax Plan (2002)