CREATE TABLE tbl_Patient
(
PatientID INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
LabControlID AS Cast(Right(Year(getDate()),4) as varchar(4)) +'-' + RIGHT('00000' + CAST(PatientID AS VARCHAR(5)), 5),
SequenceID AS "--Codes to display date--"
,First_Name varchar(50)
,Last_Name varchar(50)
,Age int
,Male bit
,Female bit
,
)
我想在下面的示例中顯示月份和日期 - 00000並顯示如下所示。我想在表列序列中顯示日期
SequenceID
----------
Jan01-00001
Jan01-00002
請指教。謝謝:d
爲什麼你想這樣做?任何用例?不知道,計算列是我可以建議的唯一選項,它基於日期和標識列 – FLICKER
每年有多少患者?當「PatientID」達到100,000時,你會退休嗎? – HABO