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?
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.
精彩评论