Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
sql query for duplicate records
Mani Kandan
Jun 10 2016 9:28 AM
349
Reply
Hello Sir,
I am stuck with a problem, Here is master(Tble_MainData) table contain company name, brand name, item name. But I want list of MasterID,companyid,brandid,itemid as same shown in the matertable's each record instead of names, using select query that below mentioned
'
(if there is mistake in select query please current it) and also i have attached herewith 4 tables with data script.
select distinct(Tble_MainData.ID),ProductCompany.Id as CompanyID,Brands.Id as BrandID, Items.Id as ItemID from Tble_MainData
inner join Brands on Tble_MainData.Brand = Brands.BrandName
inner join Items on Tble_MainData.Item = Items.ItemName
inner join ProductCompany on Tble_MainData.Company = ProductCompany.CompanyName
Kindly replay me.
Thanks.
Attachment:
DB_4_Tables.zip
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
My trigger is not insert value into correct row
Run time Error in C#