Nov 17 2023 02:30 AM
Hi all
i am hoping someone can help me.
the script below does not work. Can someone help me please?
select *
from
(
select *, convert(varchar,[updatedat],3) as [updatedatdate)
from tlbReopen
) at table1
where datediff(mom,[updateatdate], getdate ()) <=1
Nov 18 2023 02:37 AM
Hi, Gary.
There's a lot of syntax errors there and for some we can only guess what you might have intended.
Here's my best guess based on what you've provided:
SELECT
*
FROM
(
SELECT
*
, CONVERT(varchar, [updatedat], 3) as [updatedatdate]
FROM
[tlbReopen]
) AS [Table1]
WHERE
DATEDIFF(mm, [updateatdate], GETDATE ()) <=1
If this isn't what you were after, then can you please provide the following so we have a better idea of what you're trying to do and what you're working with:
Cheers,
Lain