Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compile error in query expression date() 1

Status
Not open for further replies.

hsingh1981

Programmer
Joined
Apr 8, 2008
Messages
56
Location
GB
Hi all i get error msg where i try to date stamp my process date field for the append query. Have i got the syntax right?

the error msg says
compile error in query expression date()


INSERT INTO [DS Main] ( PID, CHARTTIME, CHARTDATE, ProcessDate )
SELECT DISTINCTROW dbo_D_Encounter.patientId, dbo_PtDemographic.chartTime, dbo_PtDemographic.chartDayId, Date() AS ProcessDate
FROM (dbo_D_Encounter INNER JOIN dbo_PtDemographic ON dbo_D_Encounter.encounterId = dbo_PtDemographic.encounterId) INNER JOIN dbo_D_ClinicalUnit ON dbo_PtDemographic.clinicalUnitId = dbo_D_ClinicalUnit.clinicalUnitId
WHERE (((dbo_PtDemographic.interventionId)=1486) AND ((dbo_D_ClinicalUnit.displayLabel)="ICU"))
ORDER BY dbo_D_Encounter.patientId;


cheers
 
Does the project compiles properly ?
No missing reference ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yep everything compiles properly. Got all the references required. Soon as i include the date() then it throws a strop. Am trying to append values to table and inlude a date stamp today. I would prefer doing it through a query instead of progmattical adding the date stamp.

thankyou for replying
 
i looked at the references and change the order and its working now. I think looking at the reference did in someway sort my problem....

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top