Viewing 15 posts - 1 through 15 (of 18 total)
Sue_H - Monday, January 22, 2018 6:30 PMWhat is the relationship between the two tables - UniqueConsumption2 and Productionorder?
Sue
SourceNo from UniqueConsumption2...
January 23, 2018 at 8:48 am
SourceNo from UniqueConsumption2 table is mapped to the materialnumber of Productionorder table . Its many to many relationship .
Thanks
Vijay
January 22, 2018 at 7:38 pm
Thanks Lynn .It works awesome..Can you please remove the rownum column and the corresponding logic from the query .
January 18, 2018 at 2:06 pm
Nope, I didnt change my expected result..Just changed the validfrom date in Table A only.
Record 3 has the validfromdate of 2015-07-24 00:00:00.00 which is not the latest date. Record...
January 18, 2018 at 11:04 am
Delete the records in table A and insert like below.
Insert into dbo.MaterialsWhereUsed values ('1002',1.0,'5118617','364882','2015-07-25 00:00:00.000','2015-12-11 00:00:00.000',1)
Insert into dbo.MaterialsWhereUsed values('1002',1.0,'5129641','5118617','2015-07-24 00:00:00.000','2015-12-11 00:00:00.000',2)
Insert into dbo.MaterialsWhereUsed values('1002',1.0,'YHE30B21S','5129641','2015-07-24 00:00:00.000','9999-12-31 00:00:00.000',3)
January 18, 2018 at 10:49 am
Ya 9999-12-31 00:00:00.000 got inserted into the table. In addition to I have given the sample data for the one MaterialNumber , like the above records there are records present...
January 18, 2018 at 10:22 am
Sorry, Please find the script below and the sample data
CREATE TABLE dbo.MaterialsWhereUsed (ID INT IDENTITY(1,1) NOT NULL, Plant nvarchar(4), Quantity decimal(18,1), Material nvarchar(150),
Component...
January 18, 2018 at 10:09 am
March 20, 2017 at 10:32 am
hi,
ya you are correct. Below query fetches the unique records.Thanks for your help
SELECT ModelNo
, ROW_NUMBER() OVER (ORDER BY ModelNo) AS SEQ
, SUM(Qty)...
March 20, 2017 at 8:31 am
Please find the updated script below,
USE [SFA]
GO
/****** Object: Table [dbo].[USTLineItems] Script Date: 03/16/2017 18:27:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
March 16, 2017 at 9:15 pm
Sorry i missed it in my first post.My Bad.
March 16, 2017 at 9:01 pm
I updated the query slightly to get the min price. I still facing the issue of getting the Unique model numbers as i have some more columns in the table...
March 16, 2017 at 7:39 pm
Hi
Actually I got stuck in the above script which I shared in my first post .
This is not a homework ??and it's my project and I got stuck here as...
March 16, 2017 at 6:21 pm
Thanks for your reply.Actually i need the sequence number to be displayed in the front end and so needs to build that too in the select query as well.
March 16, 2017 at 5:39 pm
hi,
Ya just got this solution few mins back. thanks for your help.
Regards
vijay
August 24, 2016 at 11:47 am
Viewing 15 posts - 1 through 15 (of 18 total)