saintor1
Mr or Mrs. 500
Points: 562
More actions
January 8, 2019 at 7:12 am
#409420
SELECT MAX(v)FROM (VALUES ('2018-01-01') (GETDATE())) AS value(v);
I get an 'Incorrect Syntax' message. What needs to be changed?
EDIT: Found the error as a comma was missing between the two values.
KS
Hall of Fame
Points: 3323
January 8, 2019 at 7:27 am
#2018279
saintor1 - Tuesday, January 8, 2019 7:12 AMSELECT MAX(v)FROM (VALUES ('2018-01-01') (GETDATE())) AS value(v);I get an 'Incorrect Syntax' message. What needs to be changed?EDIT: Found the error as a comma was missing between the two values.
Try the below, you were missing a commaSELECT MAX(v)FROM (VALUES ('2018-01-01'),(GETDATE())) AS value(v);
SELECT MAX(v)FROM (VALUES ('2018-01-01'),(GETDATE())) AS value(v);
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply