0

As the title suggests, I would like to know if it is possible to join the string in a select statement within a PL/SQL procedure.

For example, I have something like this

SELECT FCS.CATEGORY, 
       FCS.NUMBERS, 
       FCS.POINTS 
 WHERE FCS.OBJECT = 'T' 
   AND FCS.THIS_DB & strSelectedDB & 

So, is it possible to do something like this?

1

1 Answer 1

2

Your example is a little confusing. You can concatenate multiple strings using the || operator. But you'd then you'd have to compare the concatenated string to something. You can compare columns to local variables directly, though, i.e.

SELECT fcs.category,
       fcs.numbers,
       fcs.points
  FROM some_table fcs
 WHERE fcs.object  = 'T'
   AND fcs.this_db = strSelectedDB

assuming that strSelectedDB is a local variable in your PL/SQL block.

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.