Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例 : ph_no = 0091826454646 および call_dest=IV というフィールドがあるため、call_dest+IV の場合は国番号を 91 として切り捨て、「country_code」のようなフィールドに格納する必要があります。ph_no は 91826454646 のようにすることもできます。したがって、00 から開始することも、国コードから直接開始することもできます。助けてください。
UPDATE table SET country_code = CASE WHEN ph_no LIKE '00%' THEN SUBSTR (ph_no, 3, 2) ELSE SUBSTR (ph_no, 1, 2) END WHERE call_dest = 'IV';