Jump to content

MYSqL


SrilekhaRamesh

Recommended Posts

Table1:Revenue data in that table (dealerid,Description,excavator,grader,wheelloader,slm)all the fields in table1

Table2:Revenue Target in the table(Dealer_ID,Category_Name,Description)all the fields in table2.

I'm using (dealerid,Dealer_ID,Description) both the fields are same using this innerjoin for both the table but category_Name and description both the fields exceuting duplicate rows exctract..

 

image.png.d95b2309ad2609480238ad5740f2aff4.png

Link to comment
Share on other sites

12 hours ago, requinix said:

I don't see any duplicate rows in that output.

1. What data do you have in the tables?
2. What is the query you are executing?
3. What results do you want to get, and why?

image.png.1756551268108a102afb3743f1586896.png

 

SELECT dbms.revenue_data.dealerid,dbms.revenuetarget.Category_Name,dbms.revenuetarget.Description, dbms.revenuetarget.Dealer_ID,dbms.revenue_data.Excavator,dbms.revenue_data.Grader,dbms.revenue_data.WheelLoader,dbms.revenue_data.SLM from dbms.revenue_data Inner join dbms.revenuetarget ON dbms.revenue_data.dealerid=dbms.revenuetarget.Dealer_ID WHERE dbms.revenuetarget.Dealer_ID='81019218';

In above the query for both revenuedata and revenue target but duplicates will exceuting can u help me plz.

I getting output from these query but how I got output means
for eg:
A=1,
B=2,C=3

O/P:
A=1
A-2
A=3
B=1
B-2
B=3
C=1
C-2
C=3

I am getting like this 

 

Link to comment
Share on other sites

There are no duplicates in that output either. Look at the Grader column: every value is different. That means every row is different.

You need to describe what data you want to get with a query. What rows do you want? What values do you want? What rows and values do you not want?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.