Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: combining columns


Message #1 by =?iso-8859-1?Q?Alp_G=FCneysel?= <alp@t...> on Thu, 26 Apr 2001 11:22:49 +0300
i have a query as follows:

----------------------------------------
SELECT DISTINCT
date_table.progid, min(date_table.showdate) AS showdate,
MIN(program_table.title) AS title, MIN program_table.image)  AS image

FROM date_table INNER JOIN program_table ON date_table.progid =3D
program_table.id
WHERE (date_table.showdate > '4 / 1 /2001') AND (date_table.showdate <
'5 / 1 /2001')
GROUP BY date_table.progid
ORDER BY date_table.progid
----------------------------------------


What i want to do is, having two columns related to showdate, one for
min(date_table.showdate), so i can sort the recordset by dates, and for
if there are two showdates for a specific show, combine the two column
into one column with a delimiter "<br>" so i can easily output the
showdates for web...

thanks, alp

  Return to Index