sql - How do I resolve an "incorrect syntax near ','"? -


im writing query campaign , whenever try run error saying syntax isn't correct.

select     opp.* (     select          opp.*,         row_number() on (partition opp.contact_email_address order opp.status_date desc) row_number             opportunity_data opp             opp.email_bounced = 'false'         , opp.email_unsubscribe = 'false'         , opp.first_mkt_medium not in ('partner', 'inbound_outbound')         , opp.latest_mkt_medium not in ('partner', 'inbound_outbound')         , datediff (day, cast(latest_rfq_submitted_date date), cast(getdate() date)) > 30         , opp.on_cover = 'no'         , opp.primary_group in ('market_trader', 'food_stand', 'mobile_food_van', 'caterer')         , opp.site = 'simplybusiness'         , opp.opportunity_status = ('quote_recieved', 'rfq_submitted', 'policy_expired_not_renewed') ) opp row_number = 1 

check this:

select     opp.* (     select          opp.*,         row_number() on (partition opp.contact_email_address order opp.status_date desc) row_number             opportunity_data opp             opp.email_bounced = 'false'         , opp.email_unsubscribe = 'false'         , opp.first_mkt_medium not in ('partner', 'inbound_outbound')         , opp.latest_mkt_medium not in ('partner', 'inbound_outbound')         , datediff (day, cast(latest_rfq_submitted_date date), cast(getdate() date)) > 30         , opp.on_cover = 'no'         , opp.primary_group in ('market_trader', 'food_stand', 'mobile_food_van', 'caterer')         , opp.site = 'simplybusiness'         , opp.opportunity_status in ('quote_recieved', 'rfq_submitted', 'policy_expired_not_renewed') ) opp row_number = 1 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -