Implementation of methods in an abstract class
Hi friends,
I want to know that Is it mandatory to implement all the methods which are there in abstract class if we inherit that abstract class? Please Explain in brief?
Answers (1)
0
Do not execute this query directly first understand all statements and thing about your requirement... here is basic queries, let me know next queries later after understanding this...
-
- Select ProductID, ProductName, ClosingStockQTy, ClosingStockRs from ProductMaster where Product = 1
-
-
- insert into Purchases (BillNo, BillDate, ProductID, Rate, Discount, Qty, TotalAmount)
- values
- (
- 'CP1',
- getdate(),
- @ProductID,
- @Rate,
- @Discount,
- @Qty,
- @TotalAmount
- )
-
- declare @StockQTy as int=0;
- set @StockQTy = (select top 1 ClosingStockQty from ProductMaster where ProductID = 1);
- set @StockQTy = @StockQTy + @Qty;
-
- Update ProductMaster
- set
- ClosingStockQTy = @StockQTy
- Where
- ProductID = 1
-
-
-
- insert into Sales (BillNo, BillDate, ProductID, Rate, Discount, Qty, TotalAmount)
- values
- (
- 'CS1',
- getdate(),
- @ProductID,
- @Rate,
- @Discount,
- @Qty,
- @TotalAmount
- )
-
- declare @StockQTy as int=0;
- set @StockQTy = (select top 1 ClosingStockQty from ProductMaster where ProductID = 1);
- set @StockQTy = @StockQTy - @Qty;
-
- Update ProductMaster
- set
- ClosingStockQTy = @StockQTy
- Where
- ProductID = 1

0
You can use inner join and left join to get the result.
- select PM.ProductID, PM.ProductName, PM.MRP,
- Purchase.BillDate as PurchaseBillDate,Purchase.Rate as PurchaseRate,
- Sales.BillDate as SalesBillDate,Sales.Rate as SalesRate
- from Productmaster PM
- inner join Purchase on PM.ProductID=Purchase.ProductID
- left join Sales on PM.ProductID = Sales.ProductID
- where PM.ProductID= 1000