Home Forums SQL Server 2005 SQL Server Newbies How to Refer to A Computed Column in Access-SQL Database Query RE: How to Refer to A Computed Column in Access-SQL Database Query

  • Sorry, nine year of Access, 3 mos. of SQL.

    Here's my most recent attempt to create a computer column from several computed columns.

    EMonth = DATEPART(m,dbo.employee.LGD)

    EDay=DATEPART(d,dbo.employee.LGD)

    These work fine, then I attempt to create a column with the following:

    PPR Due Date = EMonth& ' / '&EDay

    The structure is changed to 'EMonth& ' / '&EDay' , and thats what ends up in my column, not calculations.

    If I create a column of data :

    Lunch Time = DateDiff(s,[End Lunch],[Start Lunch]) it's okay, but then every time I attempt to use the new column [Lunch Time] i get an error - [Lunch Time] in expression is not part of the query.

    Thanks for any direction.