我正在尝试编写存储过程来获取当前日期的记录,但我无法这样做。我已经创建了一个用于记录显示的最新版本,并尝试对其进行修改。
这是代码:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_SELECTTODAYRECORDS_Test]
AS
BEGIN
SELECT col_Source as 'country',
col_FirstName +' '+col_LastName as 'name',
description as 'state' ,
col_county
from tbl_Info_Test, tbl_CountySite
where col_Pic is not null
and col_Source = sourcecountry
and ISDATE(col_BookDate) = 1
order by CONVERT(datetime, col_BookDate) DESC
END