So I've been trying to convert the time in one of the columns in my table. The time column in the table has the format hh:mi:ss but I need it to be in the format hhmiss without the colons; so far I've tried this:
SELECT
time_utc
FROM
particle_counter_hisam
WHERE
time_utc = CONVERT (VARCHAR(8), GETDATE(), 108)
But I get this error:
ERROR: syntax error at or near "," LINE 3: where time_utc = CONVERT(VARCHAR(8), GETDATE(), 108)
I have no clue here why I get this error, please some help would be awesome I am relatively new in SQL.