How to update column values in table based on values from two tables: Some time we need to update values in a table based on the join from other table e.g. for a customer calculate and update data values for Order values in from Item Price and Order table. below is an idea for doing this... Create Main table to be updated: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo] . [DimCustOrderValue] ( [CustID] [int] NULL, [CustomerName] [nchar] ( 20 ) NULL, [OrderValue] [numeric] ( 18 , 2 ) NULL ) ON [PRIMARY] GO --Create other required tables: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo] . [DimItemOrder] ( [OrderId] [int] NULL, [ItemId] [int] NULL, [CustID] [int] NULL [OrderQuantity] [int] NULL, ) ON [PRIMARY] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo] . [DimItemPrice] ( [ItemID] [int] NULL, [ItemName] [nc...
This Blog to share my views, learning and experience on the SQL Server Reporting Services.