1
我有Oracle數據庫列中,說COL1,具有下列值:如何在由冒號分隔的列檢查數據(:)
Col1中(A:B:C)
我現在需要出現並添加到此Col1中,只有在不存在附加值時,才能確定如何檢查Col1是否已包含這些值。
情況可能如下:
1) Need to add B => Outcome=> check Col1 – B exists, do not add.
2) Need to add A:C => Outcome=> check Col1 – A and C exists, do not add.
3) Need to add C:D => Outcome=> check Col1 – C exists but D doesn’t, do not add C but need to add D
4) Need to add G => Outcome=> check Col1 – G doesn’t, need to add G
使用Oracle SQL或PL/SQL我不確定如何去處理上面,以確保項目是否存在或不存在,以及是否添加或不添加到Col1
希望有人能夠根據上述內容協助檢查數據。
感謝
回答只是鼓勵的行爲 – 2010-12-23 03:59:22
@OMG小馬:行爲?這並不是聞所未聞的列包含值的分隔列表 - 它沒有很好的denormalised,但它肯定使穿梭項目容易在Apex,例如... – 2010-12-23 05:59:48