I am doing a report, and one of the tables called tblProduct has a calculation triggered in SQL Server that calculates cost on a column. I am having trouble locating the formula. Is there a way to determine what or where the formula is being pulled from ?
By the sounds of it you are looking for a calculated column. So if you are looking for the logic within a calculated column you can get this by simply doing the folowing:
Right click on the table
Go to script table as
Click on CREATE to.
Within the definition then you should see the calculated column definition
SO in the below example:
/****** Object: Table [dbo].[temp] Script Date: 2/8/2016 2:24:40 PM ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[temp](
[Col1] [int] NULL,
[Col2] [int] NULL,
[col3] AS ([Col1]*[Col2]) --<-- the calculated column
) ON [PRIMARY]