Home > database >  PLSQL field copy (from another field to extract parts to the assignment)
PLSQL field copy (from another field to extract parts to the assignment)

Time:10-18

PLSQL A field is in the double digits, can use the B field (10 digits) 6, 7, don't tube is A numeric type or A string type
How to use B for A assignment... How do you write statement...
For example,
B field is 1111188111 to 88 assigned to A
B field is 1234599243 to 99 assigned to A
Extract B left number 6, 7 assignment

CodePudding user response:

refer to the original poster mask ℡ response:
the field is A double-digit PLSQL, can use the B field (10 digits) 6, 7, don't tube is A numeric type or A string type
How to use B for A assignment... How do you write statement...
For example,
B field is 1111188111 to 88 assigned to A
B field is 1234599243 to 99 assigned to A
Extract left number 6, 7 a to B assignment

Has self-study successful, that's ok

CodePudding user response:

WITH
T AS (SELECT 1111188111 B FROM DUAL UNION ALL
SELECT 1234599243 B FROM DUAL)
SELECT SUBSTR (TO_CHAR (B), 6, 2) A, B FROM T.
  • Related