2

Here is the query I would like

SELECT * FROM information_schema.tables WHERE table_name = 'shop_ean_2016_06_12';

but "2016_06_12" in the query should be yesterday. I know "NOW() - '1 day'::INTERVAL" but I want to use it in the table name comparison.

Thank you for any way of doing this.

1 Answer 1

1
select * from information_schema.tables where table_name ='shop_ean_' || to_char(now() - interval '1 day','YYYY_MM_DD');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.