This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

repeates each and everytime  RSS feed

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi
my query:
selecta.url,a.title, b.ticket_name, b.networkcommission, c.commision,d.user_id from group_partner a,price b,partner_ticket_commision c,user_profile d where a.partnerid=? and c.partnerid=a.partnerid and b.evt_id=c.eventid and b.evt_id=? and first_name=?


am getting the output,but some values are repeating,how to avoid this
thanks.
 
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Use joins.

Ananth Chellathurai
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
"select distinct" may be the easiest
 
Bartender
Posts: 4089
54
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Report post to moderator
You are not joining user_profile d in the where clause. Aren't there a connection between that table and the others used in the query. If so join that too.
 
Marshal
Posts: 61718
193
  • Mark post as helpful
  • send pies
  • Report post to moderator
"Vamshi g" you need to read your private messages pronto.
[ September 20, 2008: Message edited by: Campbell Ritchie ]
 
vamshi g
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Report post to moderator
There is no connection between user_profile and other tables.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator

Originally posted by vamshi g:
There is no connection between user_profile and other tables.



Then you are in the same situation you were in here
 
author & internet detective
Posts: 38906
684
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Then let's close this thread and continue conversation in the other. No point in having two parallel discussions about the same thing.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!