0

Search for many related cases and I appreciate I learned just reading helpful comments in those problems, but this one is just a dead end for me.

Background: I'm working on a remote DB (oracle) that I don't have rights to, where all my data came from and putting in in my local db(mysql-phpmyadmin) for local usage. I have a phpmyadmin database with a table named: rli_tbl and these are the columns:

 - DATA CENTER
 - MASTER RLI 
 - RLI 

And I have an oracle query :

select ci.catalog_item_name,lnop.value as os_type from 
ln_options_at_readytosignoff lnop, reservationlineitems rli, order_item oi,        catalog_item ci
where lnop.quote_ln_id=rli.quote_ln_id
and rli.reservation_ln_id in(select a.reservation_ln_id from reservationlineitems a
left join reservationlineitems b on a.reservation_ln_id = b.depends_on
where (a.reservation_ln_id =279277 or b.reservation_ln_id=279277));

Now the problem here is i need to specify an RLI in the last line.

where (a.reservation_ln_id =123456 or b.reservation_ln_id=654321));

However RLI is composed of 12 digit hyphenated number example: 123456-654321

Now here's what Im trying to figure out:

1st : Query and slice RLI data into two parts 1st 6 digits and last 6 digits from local db.

2nd : Put the 1st 6 digits and last 6 digits respectively in the oracle query(is this even possible?)

where (a.reservation_ln_id =123456 or b.reservation_ln_id=654321));

Any insight, suggestion, comments could be helpful.

1 Answer 1

0
where 
(a.reservation_ln_id || '-' || b.reservation_ln_id = '123456-654321')
1
  • Care to fix your syntax?
    – Dan Bracuk
    Aug 18, 2014 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.