aspose file tools*
The moose likes JSP and the fly likes problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

problem

vamshi g
Greenhorn

Joined: Sep 12, 2008
Posts: 26
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

Joined: Apr 10, 2008
Posts: 38
where a.partnerid=3809
and a.partnerid =c.partnerid


Why check a.partnerid with 3809 and then again with c.partnerid ?
vamshi g
Greenhorn

Joined: Sep 12, 2008
Posts: 26
thanks for your reply,
<partneid> is same in both tables.
Amitkumar Fulambarkar
Greenhorn

Joined: Sep 17, 2008
Posts: 29
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

Joined: Sep 12, 2008
Posts: 26
no url,title in group_partner table,
ticket_name,network commision in price table,
commision in group_ticket_partner.
vamshi g
Greenhorn

Joined: Sep 12, 2008
Posts: 26
please reply me i want this,
thank you.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30938
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30938
    
158

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

Joined: May 26, 2003
Posts: 30938
    
158

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

Joined: Sep 12, 2008
Posts: 26
yes am just returning the values,i am getting the duplicates,how to avoid the duplicates,
thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30938
    
158

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
 
subject: problem