Forums
This topic is locked
Repeat Region Help!
Posted 02 Mar 2004 12:53:11
1
has voted
02 Mar 2004 12:53:11 Daniel Brown posted:
This kind of relates to my last post (www.dmxzone.com/forum/topic.asp?TOPIC_ID=27294&FORUM_ID=7&CAT_ID=5&Topic_Title=Advanced+Results+Page&Forum_Title=ASP) - Thanks to WDGlide for all the help on that one!!I now have a joined recordset that picks records from two tables - one is a table of directory listings, one special offers. The directory listings have the unique column Id "lId" - and the lId value is used to cross-reference the special offers table.
The page is set up so that when users are searching the directory, a link will show up on any listings which currently have special offers associated with them. My problem is this - if a listing has more than one offer associated with it, it appears in the recordset more than once! Any idea how i can ensure this does not happen? I need to make sure each record from the listings table is picked only once, no matter how many special offers it has with it!!!
Thanks for your help,
Dan
Replies
Replied 03 Mar 2004 02:18:39
03 Mar 2004 02:18:39 Phil Shevlin replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Thanks to WDGlide for all the help on that one!!<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Your welcome.
Your problem is not related to asp - its still with the SQL statement. Are you using MS SQL? If so I suggest you create a view that works - first. Then pull it into a RS.
Your welcome.
Your problem is not related to asp - its still with the SQL statement. Are you using MS SQL? If so I suggest you create a view that works - first. Then pull it into a RS.
Replied 03 Mar 2004 10:48:07
03 Mar 2004 10:48:07 Daniel Brown replied:
Wow - thanks for being so ready to help - again! I've sorted the problem using the "Select Distinct" method - all seems fine now!
Dan
Dan