2

i'm trying to store some data in Dbeaver binding variables like these:

--test
@set test = good
--testQ
@set testQ = select date from table where id = 1;

I need to store the query result, NOT the query statment, someone knows if this is posible?

1
  • I have tried many things and have had no success. Also very interested in an answer. Commented Jul 8, 2022 at 20:40

1 Answer 1

0

try this:

@set testQ = (select date from table where id = 1)

select * from anotherTable where date = :testQ;

It is important not use ; in variable declaration, because will duplicate the command finalization

Sign up to request clarification or add additional context in comments.

1 Comment

i don't think this works. unfortunately dbeaver variables only seem able to do basic find-replace of text

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.