How to make or check the attribute (location) in PL/SQL block?

610 pts.
Tags:
Oracle development
Oracle SQL
PL/SQL
PL/SQL block
Procedural Language/Structured Query Language
Hi Experts, How to make check the attribute (location) not taking the value same as city(attribute) or country(attribute) in Pl/SQL block Thanks for the help

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Hello Inprise. Could you please provide more information about your question ? Maybe if those attributes (location, city, country) are fields of a pl/sql table, and what the structure of that table is, and what exactly you want to accomplish. Some example data would help also.
    69,475 pointsBadges:
    report
  • Inprise
    Hello, I need a logic that checks for example p_location is not allowed to start with values (neither p_city nor p_country) as all this are parameters of my procedure and are from same table additional i shud one more parameter cname which from different table So logic is to check p_location not allowed to start with values p_city,p_country nor cname . I don't know wat logics can be applied n my PL/SQL block for this .. thanks n advance for ur help
    610 pointsBadges:
    report
  • carlosdl
    I'm still not sure if I understood correctly your question. How about something like this:
      if p_location like p_city||'%' or p_location like p_country||'%' then
      		dbms_output.put_line ('something');
      End if;
    Please confirm if that's what you meant, so we can put this as an answer.
    69,475 pointsBadges:
    report
  • Inprise
    Hi, No not this way i think i shud use REGEXP_LIKE or REGEXP_INSTR or REGEXP_SUBSTR not sure which is to be used as it needs to check 3 different paramater i am trying out .. But what i am still not understanding is how this check can be performed on 3 parameters and it shud actually not take values of this 3 parameter means how will be the output
    610 pointsBadges:
    report
  • Inprise
    Hi i used this way in SELECT QUERY its compiling not sure whther its correct logic NOT REGEXP_LIKE (v_location_name, '^', 'i' ); Anyhow thanks for ur suggestion and pls let me know my logic s correct or not?
    610 pointsBadges:
    report
  • carlosdl
    Is there any specific reason why you must use REGEXP ?
    69,475 pointsBadges:
    report
  • Inprise
    No specific reason ,is there any other way i can do this comparison then tat wud be well good as this uses SELECT stm whihic is a overload again (time of execution) thanks n advance
    610 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following