I set the job schedule on daily basis. When I check the records on the next day, the records were not moved completely on someday. I don't know why.
Here is my query
INSERT INTO [HQWebMatajer].[dbo].[F_ItemDailySalesParent]
(
[ItemID]
,[StoreID]
,[ItemLookupCode]
,[DepartmentID]
,[CategoryID]
,[SupplierID]
,[Time]
,[Qty]
,[ExtendedPrice]
,[ExtendedCost]
)
SELECT
[ItemID]
,[StoreID]
,[ItemLookupCode]
,[DepartmentID]
,[CategoryID]
,[SupplierID]
,[Time]
,[Qty]
,[ExtendedPrice]
,[ExtendedCost]
FROM
[HQMatajer].[dbo].[JC_ItemDailySalesParent]
where time=convert(Date,getdate()-1)
Total records found on [JC_ItemDailySalesParent] = 21027 and total records on [F_ItemDailySalesParent] = 18741 on 06-March-2017
If you think i might have missed some column or something else!.. Then I will execute the same query by changing where condition to
where time=convert(Date,getdate())
. Then it's executed the complete record without missing.Note: Both tables are job schedule.
[JC_ItemDailySalesParent]
table will run at 2 am.F_ItemDailySalesParent
will run at early morning 6 o ck.
Don't ask me why two tables with same record. That's for different purpose.
Thanks,