Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
512 B
1
Indexable
Never
SELECT
    DATE_ADD(CURRENT_DATE(), INTERVAL 1 DAY) AS Date,
    TIME_FORMAT(flight_time, '%H:%i') AS Time,
    flight_number AS Flight
FROM
    flights_table
WHERE
    departure_city = @DepartureCity
    AND arrival_city = @ArrivalCity
    AND flight_date BETWEEN CURRENT_DATE() + INTERVAL 1 DAY AND CURRENT_DATE() + INTERVAL 20 DAY
ORDER BY
    flight_date ASC;

for the above query iam getting below errror

Msg 156, Level 15, State 1, Line 12
Incorrect syntax near the keyword 'CURRENT_DATE'.