File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

problem

 
vamshi g
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi all am getting url and ticket_name each and evry time,but have to get only one time,every time it is repeating,3 titles are there



my query is :


select url, title, b.ticket_name, b.networkcommission, c.commision from group_partner a,price b,partner_ticket_commision c where a.partnerid=3809
and a.partnerid =c.partnerid and b.evt_id=13840


please reply me it is very urgent for me,
thanks.
 
Sudarshan Chakrabarty
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
where a.partnerid=3809
and a.partnerid =c.partnerid


Why check a.partnerid with 3809 and then again with c.partnerid ?
 
vamshi g
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
thanks for your reply,
<partneid> is same in both tables.
 
Amitkumar Fulambarkar
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Does the URL and Title are in all the tables?

try with appropriate alias for table like "select a.url, a.title........
 
vamshi g
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
no url,title in group_partner table,
ticket_name,network commision in price table,
commision in group_ticket_partner.
 
vamshi g
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
please reply me i want this,
thank you.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33713
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
As this question is about database queries and not JSP, I'm moving it to our JDBC forum for you.

Please be patient while waiting for an answer. People are in different timezones around the world and it could take up to 24 hours for everyone to see your question. Bumping it with a request for answer doesn't help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33713
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Two other administrative items:
1) Please see David's PM about your display name.
2) "Problem" is not a meaningful subject. It doesn't tell someone thinking about your post anything about the problem. Please use something with more detail new time like "sql query returning duplicates"

Thanks,
Jeanne
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33713
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Now on to your problem. I don't see a join between table b and tables a/c. This means you are returning rows that don't have necessarily have anything to do with each other.
 
vamshi g
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
yes am just returning the values,i am getting the duplicates,how to avoid the duplicates,
thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
"vamshi", the request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33713
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
This same question is being discussed in the JDBC forum. Please do not post the same question multiple times.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic