Viewing 7 posts - 1 through 8 (of 8 total)
The dates are not dummy dates. Dummy column indicates that the purchase and sales for a particular purchase has happened.
The particular format is for calculating taxes. Based on the difference...
May 20, 2016 at 6:52 pm
Sorry sir I am not clear about table script? Can you tell me further please. Thanks for bearing me so long.
The output from your data should be as below
CREATE TABLE...
May 18, 2016 at 10:16 pm
Thanks for your reply.
Buy Transactions
'M33945','A01022','2011-06-15',3
'M33945','A01022','2011-06-16',5
'M33945','A01022','2011-06-20 ,5
'M33945','A01022','2011-06-22 ,5
Sale Transactions
'M33945','A01022','2011-06-17’,2,'Y'
'M33945','A01022','2011-06-17',4,'Y'
'M33945','A01022','2011-06-17',1,'Y'
'M33945','A01022','2011-06-18',3,'Y'
'M33945','A01022','2013-01-30',5,'Y'
Output desired
M33945, A01022, 2011-06-15, 3, 2011-06-17, 3 N
M33945, A01022, 2011-06-16, 4, 2011-06-17, 4 N
M33945, A01022, 2011-06-16, 1, 2011-06-18, 1 N
...
May 18, 2016 at 3:53 pm
Hi Folks I did try the routines but am stuck here
I have split data is 2 tables for ease one for Buy and another for Sale
CREATE TABLE [dbo].[BuyData](
[Party_Code] [varchar](10)...
May 13, 2016 at 5:04 am
Yes sir I created a subset of the data as follows.
INSERT [dbo].[Stock] ([clientcode], [productid], [pdate], [ptime], [pno], [ptype], [qty], [rate], [uniqno]) VALUES (N'A001', N'P001', 'JAN 1 2010', N'09:25:19', CAST(1231...
April 15, 2016 at 10:38 pm
This is a great solution but my problem is something different.
I want to skip records where the date of sale is lesser than the date of purchase.
That is any...
April 12, 2016 at 10:32 pm
I think the window functions should be of help here.
Please repost the data I am not able to get the data you have posted.
March 6, 2013 at 12:33 am
Viewing 7 posts - 1 through 8 (of 8 total)