PostgreSQL “column ”foo“ does not exist” where foo is the value

大城市里の小女人 提交于 2021-02-02 09:35:26

问题


I'm trying to perform an Update query on a Postgres db from Node, and I'm running into this weird issue:

'UPDATE salesforce.Guest__c SET currently_at_property__c = "foo" WHERE rewards_id ='+rewardsId,

I'm trying to set the currently_at_property__c equal to the value "foo" but for some reason I'm getting this error:

error: "column "foo" does not exist"

I don't know why this is happening, since foo is the value, NOT the column.


回答1:


Correct with the right quote:

    'UPDATE salesforce.Guest__c SET currently_at_property__c = 'foo' WHERE rewards_id ='+rewardsId,


来源:https://stackoverflow.com/questions/34513935/postgresql-column-foo-does-not-exist-where-foo-is-the-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!