Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - distinct problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

distinct problem

 Post Reply Post Reply
Author
urko View Drop Down
Groupie
Groupie
Avatar

Joined: 23 September 2004
Location: Slovenia
Status: Offline
Points: 160
Post Options Post Options   Thanks (0) Thanks(0)   Quote urko Quote  Post ReplyReply Direct Link To This Post Topic: distinct problem
    Posted: 27 January 2010 at 1:25pm
Hi,

Not sure why Distinct is not working in my RS.  Im using ms access with query table to display more items


BrandCat = Request.QueryString("IdCategory")
mySQL = "SELECT Distinct Name, " _
        & "IdCategory, IdParentCategory, idBrand " _
        & "FROM Sorting " _
        & "WHERE    IdParentCategory = " & BrandCat & " " _
        & "ORDER BY Name ASC"



Urko
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3938
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2010 at 3:53pm
Name is a reserved word

Lead me not into temptation... I know the short cut, follow me.
Back to Top
urko View Drop Down
Groupie
Groupie
Avatar

Joined: 23 September 2004
Location: Slovenia
Status: Offline
Points: 160
Post Options Post Options   Thanks (0) Thanks(0)   Quote urko Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2010 at 4:02pm
Yea i know. :) but this is candypress estore so i'm just playing along :)...It actually worked on other RS that i have in different page, but here it shows me same record names several time.
Urko
Back to Top
godeep View Drop Down
Newbie
Newbie


Joined: 29 January 2010
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote godeep Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2010 at 4:45am
Im not a pro, but just a thought. Im not sure of the table setup in the DB, but it may be a string to int issue. worth a shot.
 
You may try this.
 
mySQL = "SELECT Distinct Name, " _
        & "IdCategory, IdParentCategory, idBrand " _
        & "FROM Sorting " _
        & "WHERE    IdParentCategory LIKE '"&BrandCat&"' " _
        & "ORDER BY Name ASC"
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.