랜덤 아이디 생성
create or replace FUNCTION GET_ID
( V_FROM IN VARCHAR2,
V_TO IN VARCHAR2 )
RETURN VARCHAR2
IS
OUT_REAL_NM VARCHAR2(100);
TYPE V_ARR IS TABLE OF VARCHAR2(10);
V_FIRST V_ARR;
V_LAST V_ARR;
V_MID V_ARR;
BEGIN
V_LAST := V_ARR('Oliver' , 'George' , 'Harry' , 'Jack' , 'Jacob'
, 'Noah' , 'Charlie' , 'Muhammad' , 'Thomas' , 'Oscar'
, 'William' , 'James' , 'Henry' , 'Leo' , 'Alfie'
, 'Joshua' , 'Freddie' , 'Archie' , 'Ethan' , 'Isaac'
, 'Alexander' , 'W' , 'Joseph' , 'Edward' , 'Samuel'
, 'Max' , 'Daniel' , 'Arthur' , 'Lucas' , 'Mohammed');
V_MID := V_ARR('Logan' , 'Theo' , 'Harrison' , 'Benjamin' , 'Mason'
, 'Sebastian' , 'Finley' , 'Adam' , 'Dylan' , 'Zachary'
, 'Riley' , 'Teddy' , 'Theodore' , 'David' , 'Toby'
, 'Jake' , 'Louie' , 'Elijah' , 'Reuben' , 'Arlo'
, 'Hugo' , 'Luca' , 'Jaxon' , 'Matthew' , 'Harvey'
, 'Reggie' , 'Michael' , 'Harley' , 'Jude' , 'Albert');
V_FIRST := V_ARR('Tommy' , 'Luke' , 'Stanley' , 'Jenson' , 'Frankie'
, 'Jayden' , 'Gabriel' , 'Elliot' , 'Mohammad' , 'Ronnie'
, 'Charles' , 'Louis' , 'Elliott' , 'Frederick' , 'Nathan'
, 'Lewis' , 'Blake' , 'Rory' , 'Ollie' , 'Ryan'
, 'Tyler' , 'Jackson' , 'Dexter' , 'Alex' , 'Austin'
, 'Kai' , 'Albie' , 'Caleb' , 'Carter' , 'Bobby');
--SELECT V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
SELECT SUBSTR(V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_FIRST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_FIRST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
, V_FROM, V_TO)
INTO OUT_REAL_NM
FROM DUAL;
RETURN OUT_REAL_NM;
END;
랜덤 이름 생성
create or replace FUNCTION GET_NAME
( V_FROM IN VARCHAR2,
V_TO IN VARCHAR2 )
RETURN VARCHAR2
IS
OUT_REAL_NM VARCHAR2(100);
TYPE V_ARR IS TABLE OF VARCHAR2(10);
V_FIRST V_ARR;
V_LAST V_ARR;
V_MID V_ARR;
BEGIN
V_LAST := V_ARR('Oliver' , 'George' , 'Harry' , 'Jack' , 'Jacob'
, 'Noah' , 'Charlie' , 'Muhammad' , 'Thomas' , 'Oscar'
, 'William' , 'James' , 'Henry' , 'Leo' , 'Alfie'
, 'Joshua' , 'Freddie' , 'Archie' , 'Ethan' , 'Isaac'
, 'Alexander' , 'W' , 'Joseph' , 'Edward' , 'Samuel'
, 'Max' , 'Daniel' , 'Arthur' , 'Lucas' , 'Mohammed');
V_MID := V_ARR('Logan' , 'Theo' , 'Harrison' , 'Benjamin' , 'Mason'
, 'Sebastian' , 'Finley' , 'Adam' , 'Dylan' , 'Zachary'
, 'Riley' , 'Teddy' , 'Theodore' , 'David' , 'Toby'
, 'Jake' , 'Louie' , 'Elijah' , 'Reuben' , 'Arlo'
, 'Hugo' , 'Luca' , 'Jaxon' , 'Matthew' , 'Harvey'
, 'Reggie' , 'Michael' , 'Harley' , 'Jude' , 'Albert');
V_FIRST := V_ARR('Tommy' , 'Luke' , 'Stanley' , 'Jenson' , 'Frankie'
, 'Jayden' , 'Gabriel' , 'Elliot' , 'Mohammad' , 'Ronnie'
, 'Charles' , 'Louis' , 'Elliott' , 'Frederick' , 'Nathan'
, 'Lewis' , 'Blake' , 'Rory' , 'Ollie' , 'Ryan'
, 'Tyler' , 'Jackson' , 'Dexter' , 'Alex' , 'Austin'
, 'Kai' , 'Albie' , 'Caleb' , 'Carter' , 'Bobby');
--SELECT V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
SELECT (V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) || ' '
|| V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) || ' '
)
INTO OUT_REAL_NM
FROM DUAL;
RETURN OUT_REAL_NM;
END;
create or replace FUNCTION GET_ID
( V_FROM IN VARCHAR2,
V_TO IN VARCHAR2 )
RETURN VARCHAR2
IS
OUT_REAL_NM VARCHAR2(100);
TYPE V_ARR IS TABLE OF VARCHAR2(10);
V_FIRST V_ARR;
V_LAST V_ARR;
V_MID V_ARR;
BEGIN
V_LAST := V_ARR('Oliver' , 'George' , 'Harry' , 'Jack' , 'Jacob'
, 'Noah' , 'Charlie' , 'Muhammad' , 'Thomas' , 'Oscar'
, 'William' , 'James' , 'Henry' , 'Leo' , 'Alfie'
, 'Joshua' , 'Freddie' , 'Archie' , 'Ethan' , 'Isaac'
, 'Alexander' , 'W' , 'Joseph' , 'Edward' , 'Samuel'
, 'Max' , 'Daniel' , 'Arthur' , 'Lucas' , 'Mohammed');
V_MID := V_ARR('Logan' , 'Theo' , 'Harrison' , 'Benjamin' , 'Mason'
, 'Sebastian' , 'Finley' , 'Adam' , 'Dylan' , 'Zachary'
, 'Riley' , 'Teddy' , 'Theodore' , 'David' , 'Toby'
, 'Jake' , 'Louie' , 'Elijah' , 'Reuben' , 'Arlo'
, 'Hugo' , 'Luca' , 'Jaxon' , 'Matthew' , 'Harvey'
, 'Reggie' , 'Michael' , 'Harley' , 'Jude' , 'Albert');
V_FIRST := V_ARR('Tommy' , 'Luke' , 'Stanley' , 'Jenson' , 'Frankie'
, 'Jayden' , 'Gabriel' , 'Elliot' , 'Mohammad' , 'Ronnie'
, 'Charles' , 'Louis' , 'Elliott' , 'Frederick' , 'Nathan'
, 'Lewis' , 'Blake' , 'Rory' , 'Ollie' , 'Ryan'
, 'Tyler' , 'Jackson' , 'Dexter' , 'Alex' , 'Austin'
, 'Kai' , 'Albie' , 'Caleb' , 'Carter' , 'Bobby');
--SELECT V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
SELECT SUBSTR(V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_FIRST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) ||
V_FIRST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
, V_FROM, V_TO)
INTO OUT_REAL_NM
FROM DUAL;
RETURN OUT_REAL_NM;
END;
랜덤 이름 생성
create or replace FUNCTION GET_NAME
( V_FROM IN VARCHAR2,
V_TO IN VARCHAR2 )
RETURN VARCHAR2
IS
OUT_REAL_NM VARCHAR2(100);
TYPE V_ARR IS TABLE OF VARCHAR2(10);
V_FIRST V_ARR;
V_LAST V_ARR;
V_MID V_ARR;
BEGIN
V_LAST := V_ARR('Oliver' , 'George' , 'Harry' , 'Jack' , 'Jacob'
, 'Noah' , 'Charlie' , 'Muhammad' , 'Thomas' , 'Oscar'
, 'William' , 'James' , 'Henry' , 'Leo' , 'Alfie'
, 'Joshua' , 'Freddie' , 'Archie' , 'Ethan' , 'Isaac'
, 'Alexander' , 'W' , 'Joseph' , 'Edward' , 'Samuel'
, 'Max' , 'Daniel' , 'Arthur' , 'Lucas' , 'Mohammed');
V_MID := V_ARR('Logan' , 'Theo' , 'Harrison' , 'Benjamin' , 'Mason'
, 'Sebastian' , 'Finley' , 'Adam' , 'Dylan' , 'Zachary'
, 'Riley' , 'Teddy' , 'Theodore' , 'David' , 'Toby'
, 'Jake' , 'Louie' , 'Elijah' , 'Reuben' , 'Arlo'
, 'Hugo' , 'Luca' , 'Jaxon' , 'Matthew' , 'Harvey'
, 'Reggie' , 'Michael' , 'Harley' , 'Jude' , 'Albert');
V_FIRST := V_ARR('Tommy' , 'Luke' , 'Stanley' , 'Jenson' , 'Frankie'
, 'Jayden' , 'Gabriel' , 'Elliot' , 'Mohammad' , 'Ronnie'
, 'Charles' , 'Louis' , 'Elliott' , 'Frederick' , 'Nathan'
, 'Lewis' , 'Blake' , 'Rory' , 'Ollie' , 'Ryan'
, 'Tyler' , 'Jackson' , 'Dexter' , 'Alex' , 'Austin'
, 'Kai' , 'Albie' , 'Caleb' , 'Carter' , 'Bobby');
--SELECT V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0))
SELECT (V_LAST(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) || ' '
|| V_MID(ROUND(DBMS_RANDOM.VALUE(1 , 30), 0)) || ' '
)
INTO OUT_REAL_NM
FROM DUAL;
RETURN OUT_REAL_NM;
END;
댓글
댓글 쓰기