Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
insert into ageData (PatientID, Age) select PatientID from AEDepartment, select DATEDIFF(hour,DOB,GETDATE())/8766 from AEDepartment;
エラーメッセージ:
Incorrect syntax near the keyword select
SELECTステートメントは1つだけにする必要があります。
SELECT
INSERT INTO ageData (PatientID, Age) SELECT PatientID, DATEDIFF(hour,DOB,GETDATE())/8766 FROM AEDepartment