SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 5th, 2001, 09:39 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
how can select distinct records within loop..??

<i><b>Originally posted by : dev (devb0505@yahoo.com)</b></i><br />i wanna select distinct records within loop..<br />i have got normalize database which carry one user table(which carryes unique records) and another user's skills(repeatetion of records) <br />i made a search on user's skill table and stored in a record set(repeatation is there in the record set) <br /><br />query is<br />1.got search result in record set called rs:<br />userid = rs("userid")<br />while not rs.eof <br />userid = rs("userid")<br />set rss = con.execute(select distinct(user) from user where userid = '"& userid &"')")<br />rs.movenext<br />wend<br /><br />when i execute this query it's does'nt give me distinct record i believe we cann't use distinct function in while loop bec'z every record is unique it self within loop. is there any way to select distinct records in loop ??????<br />

Reply With Quote
  #2  
Old July 5th, 2001, 09:42 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Dev (dev_0505@yahoo.com)</b></i><br /><br />i wanna select distinct records within loop..<br />i have got normalize database which carry one user table(which carryes unique records) and another user's skills(repeatetion of records) <br />i made a search on user's skill table and stored in a record set(repeatation is there in the record set) <br /><br />query is<br />1.got search result in record set called rs:<br />userid = rs("userid")<br />while not rs.eof <br />userid = rs("userid")<br />set rss = con.execute(select distinct(user) from user where userid = '"& userid &"')")<br />rs.movenext<br />wend<br /><br />when i execute this query it's does'nt give me distinct record i believe we cann't use distinct function in while loop bec'z every record is unique it self within loop. is there any way to select distinct records in loop ??????<br /><br /><br />------------<br />dev at 7/5/2001 6:39:45 AM<br /><br />i wanna select distinct records within loop..<br />i have got normalize database which carry one user table(which carryes unique records) and another user's skills(repeatetion of records) <br />i made a search on user's skill table and stored in a record set(repeatation is there in the record set) <br /><br />query is<br />1.got search result in record set called rs:<br />userid = rs("userid")<br />while not rs.eof <br />userid = rs("userid")<br />set rss = con.execute(select distinct(user) from user where userid = '"& userid &"')")<br />rs.movenext<br />wend<br /><br />when i execute this query it's does'nt give me distinct record i believe we cann't use distinct function in while loop bec'z every record is unique it self within loop. is there any way to select distinct records in loop ??????<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > how can select distinct records within loop..??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT