-4
프로젝트에 약간의 문제가 있습니다. mysql이 작성하는 쿼리 문이 1 개 있습니다. mysql에서 oracle로 변경해야합니다. 쿼리는 다음과 같습니다데이터베이스에 대한 쿼리 (mysql, oracle)
select substring(ad_cde,1,18)
from advertise
where substring(ad_cde,1,18)='119821168010300222'
insert into advertise(ad_cde)
select concat('119821168010300000',lpad(convert(substring(max(ad_cde),19,3),unsigned)+1,3,'0')) as a
from advertise
where substring(ad_cde,1,18)='119821168010300000'
and EXISTS(select * from advertise where substring(ad_cde,1,18)='119821168010300000')
insert into advertise(ad_cde)
select concat('119821168010300101',lpad(convert(substring(max(ad_cde),19,3),unsigned)+1,3,'0')) as a
from advertise
where NOT EXISTS(select * from advertise where substring(ad_cde,1,18)='119821168010300101')
누군가가 나를 괴롭 히고 있기 때문에 정말 서둘러입니다.