Forum Moderators: open
Sales ID Option
------- ------
001 01
001 02
001 03
002 02
003 01
003 03
Now I need to display orders in batches on the screen and the client wants columns for each option and ticks or Y/N against the options selected so it looks like this:
Sale ID Options: 01 02 03
001 Y Y Y
002 N Y N
003 Y N Y
I tried using SQL Crosstab function to get the data out in the right format but it wont work because the product-options table has over 8,000 rows - although no more than 20 for each product. I dont want 8000 columns displayed every time, just those that apply to the orders selected which will always be for the same product.
I need to do this by either finding a component designed for this task, or hand coding HTML tables and loops with the data in either an array or adodb recordset, right? I cant think of any easier/quicker ways.
Does anyone know of a component or code that can solve this one?
Thanks.
I found a kinda solution here using two recordsets, but its not ideal.
[weblogs.sqlteam.com...]