开发者

Invalid oracle view column

I am creating a view and one of my field in the view is PO field ( it is a primary key of output table)

In output table primary key is composite key ( Id+ cntrid)

i was writing the following statement to get unique key

select  (po_cntr || proj_id) PO

but it is still开发者_如何学编程 showing dup, what is missing here?


Sounds like the concatenated values are not unique.

For instance if you have two rows like this:

PO_CNTR    PO_ID
ABC12      1
ABC1       21

Then the concatenated value for both would be 'ABC121'.

The most likely easiest solution is to include a delimiter in the concatenated field:

select  (po_cntr || '-' || proj_id) PO
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜