Showing posts with label syntax. Show all posts
Showing posts with label syntax. Show all posts

Thursday, March 29, 2012

Error: Expected End of Statement

I just don't see it (SSRS 2005 Expression Syntax Error):

=((Fields!PostedAmount_InHouse.Value + Fields!NewPDs_Check.Value + Fields!NewCCs_Check.Value) / Fields!CurrentPostingDay.Value) * (Fields!TotalPostingDays.Value - Fields!CurrentPostingDay.Value) + (Fields!PostedAmount_InHouse.Value + Fields!OldPDs_Check.Value + Fields!NewPDs_Check.Value + Fields!OldCCs_Check.Value + Fields!NewCCs_Check.Value) * Fields!FeeSchedule.Value)) / 100

Error: Expected End of Statement

4( + 6) = Error: Expected Endof Statement

Friday, March 9, 2012

Error with stored Procedure

does anyone see anything wrong with this stored procedure?? I keep getting a syntax error.

CREATE PROCEDURE [InsertGCTerms]
AS
INSERT INTO [CommissionEmployee_Exclusionsdb].[dbo].[GCEmployeeTerms]([TM #],[FirstName],[LastName],[SocialSecurityNumber],[DateHired],[DepartmentName],[Title])
SELECT a.TM#, a.LASTNAME, a.FIRSTNAME, a.SSN#, a.JOBTITLE, a.HIREDATE, a.DEPT#
FROM GOVEMPLYS AS a
WHERE a.STATUS = 'TERMINATED'
RETURN
GOCREATE PROCEDURE [InsertGCTerms]
AS
INSERT INTO [CommissionEmployee_Exclusionsdb].[dbo].[GCEmployeeTerms]([TM #],[FirstName],[LastName],[SocialSecurityNumber],[DateHired],[DepartmentName],[Title])
SELECT a.[TM#], a.LASTNAME, a.FIRSTNAME, a.[SSN#], a.HIREDATE,
a.[DEPT#], a.JOBTITLE FROM GOVEMPLYS AS a
WHERE a.STATUS = 'TERMINATED'
RETURN
GO|||Is GOVEMPLYS.DateHired a date field or a character string? If it is a character string, the run this to find records where someone has entered an illegal date string:

select HIREDATE from GOVEMPLYS where isdate(HIREDATE) = 0|||Is GOVEMPLYS.DateHired a date field or a character string? If it is a character string, the run this to find records where someone has entered an illegal date string:

select HIREDATE from GOVEMPLYS where isdate(HIREDATE) = 0