Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to migrate a sql query into PostgreSQL. After running the query I get this error:

ERROR: syntax error at or near "("
LINE 20: ..._date is null or fcm.effect_end_date>=current_date()) limit ...

Below is my query:-

select farechart_master_id,farechart_name,version_number_service_stype,
fcm.route_id,st.service_type_name,fcm.passenger_type_id,
fcm.effect_start_date,fcm.effect_end_date,fcm.nignt_service,
fcm.peak_time,fcm.flexi_fare,r.route_number,r.route_direction,
r.effective_from,r.effective_till from farechart_master fcm 
left join rate_master rm on rm.rate_master_id=fcm.rate_master_id
left join route r on r.route_id=fcm.route_id 
left join service_type st on st.service_type_id=fcm.service_type_id 
where fcm.deleted_status=0 
and (fcm.effect_end_date is null or fcm.effect_end_date>=current_date())
limit 0 offset 10

Where am I going wrong?

share|improve this question

closed as off-topic by Colin 't Hart, Erwin Brandstetter, RolandoMySQLDBA, Max Vernon, Michael Green Jul 13 at 11:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Colin 't Hart, Erwin Brandstetter, RolandoMySQLDBA, Max Vernon, Michael Green
If this question can be reworded to fit the rules in the help center, please edit the question.

    
From which DBMS? –  Colin 't Hart Jun 23 at 13:52

1 Answer 1

current_date is a keyword. There are no parentheses after it.

fcm.effect_end_date >= current_date
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.