D
Doc Rock
I just started getting a query error when I run the following query. It
states the expression is typed incorrectly or is too complex to be
evaluated. The problem is in the year([DOSF]) as there is no error if I
eliminate it.
It used to work. The DOSF field is a string representing the date as
"MM-DD-YYYY". Should I use Right([DOSF],4) instead, with some quotes?
Thanks for any help
SELECT [Arhist].[DOSF], [Arhist].[DOP], [Arhist].[PAYTYPE],
[Arhist].[LINE], [PATIENT].[LNAME], [PATIENT].[FNAME], [Arhist].[INSUR],
[Arhist].[CPT], [Arhist].[PATID]
FROM Arhist INNER JOIN PATIENT ON [Arhist].[PATID]=[PATIENT].[IDNUM]
WHERE ((([Arhist].[PAYTYPE])="" Or ([Arhist].[PAYTYPE])="D") And
(([Arhist].[PATID])=[Pat ID]) And ((Year([DOSF]))=2007) And
(([Arhist].[OFFICE])="PT"))
ORDER BY [Arhist].[DOSF], [Arhist].[DOP], [Arhist].[PAYTYPE];
Doc Rock
Please reply to forum or remove "at"
states the expression is typed incorrectly or is too complex to be
evaluated. The problem is in the year([DOSF]) as there is no error if I
eliminate it.
It used to work. The DOSF field is a string representing the date as
"MM-DD-YYYY". Should I use Right([DOSF],4) instead, with some quotes?
Thanks for any help
SELECT [Arhist].[DOSF], [Arhist].[DOP], [Arhist].[PAYTYPE],
[Arhist].[LINE], [PATIENT].[LNAME], [PATIENT].[FNAME], [Arhist].[INSUR],
[Arhist].[CPT], [Arhist].[PATID]
FROM Arhist INNER JOIN PATIENT ON [Arhist].[PATID]=[PATIENT].[IDNUM]
WHERE ((([Arhist].[PAYTYPE])="" Or ([Arhist].[PAYTYPE])="D") And
(([Arhist].[PATID])=[Pat ID]) And ((Year([DOSF]))=2007) And
(([Arhist].[OFFICE])="PT"))
ORDER BY [Arhist].[DOSF], [Arhist].[DOP], [Arhist].[PAYTYPE];
Doc Rock
Please reply to forum or remove "at"