Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Displaying data - Grouping SQL

3 views
Skip to first unread message

Kermy7803 (aka: AB)

unread,
Jul 23, 2002, 1:22:55 PM7/23/02
to
You will need to use a nested repeat region for this.

Http://www.udzone.com has some tutorials I believe on the subject :-)

Anthony


"craptastic" <webfor...@macromedia.com> wrote in message
news:ahk3ac$bfc$1...@forums.macromedia.com...
> Hello,
>
> using: dreamweaver MX/Access 2k DB/ASP VBscript
> ----------------------------------------
> My 2 tables:
>
> Table 1: productcategory
> Table 2: productitem
>
> -------------------------------------------
>
> Display I NEED:
>
> Category1
> item1_1
> item2_1
> item3_1
>
> Category2
> item1_2
> item2_2
> item3_2
>
> ----------------------------
>
> The SQL I'm using:
>
> SELECT DISTINCT productID, productTITLE, itemID, itemTITLE, itemID_prodID
> FROM products, items
> ORDER BY itemTITLE
> GROUP BY productTITLE, productID, itemID, itemTITLE, itemID_prodID
>
> ----------------------------
>
> What my SQl returns:
>
> Category 1
> Item 1_1
> Category 1
> Item 2_1
> Category 1
> Item 3_1
> Category 2
> Item 1_2
> Category 2
> Item 2_2
> ------------------------------------------
>
> Any help is greatly appreciated!! Hope it makes sense!
>
>
>
>
>
>
>


craptastic

unread,
Jul 23, 2002, 1:21:16 PM7/23/02
to

craptastic

unread,
Jul 23, 2002, 1:37:37 PM7/23/02
to
You rock! thats it exactly!

here is the refernce url for anyonw else:

http://www.udzone.com/showDetail.asp?TypeId=2&NewsId=394


Kindler Chase

unread,
Jul 23, 2002, 2:31:41 PM7/23/02
to
Hi craptastic,

A more elegant way of doing this is with datashaping (and much more
powerful). Here's some links to get you started. (watch out for the line
wraps in the links)

http://www.4guysfromrolla.com/webtech/092599-1.shtml
http://www.4guysfromrolla.com/webtech/100699-2.shtml
http://www.asp101.com/articles/chris/datashaping2/default.asp
http://www.asp101.com/articles/wrox/asp30/26100906.asp
http://www.microsoft.com/mind/0199/shaping/shaping.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/o
ledbprovthe_data_shaping_service_for_ole_db.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/o
ledbprovusing_the_data_shaping_service_for_ole_db__a_closer_look.asp

And to get UD or MX (I'd imagine) to work with datashaping, read the
datashaping tut:
http://www.webuality.com/t-cubed/ (nested repeat region using data shaping)

--

__o
_-\<,
(_)/(_)__ http://makeashorterlink.com/?A2AF23A7
::kindler chase::

"When you find your passion, it's easy to be illogical" - me
_______________________________________________

Dreamweaver FAQ & Resource List
http://www.dreamweaverfaq.com

"craptastic" <webfor...@macromedia.com> wrote in message

news:ahk491$dck$1...@forums.macromedia.com...

0 new messages