How to create stored procedure involving wildcards?Create stored procedure to select the data?How to create a...

Geography in 3D perspective

Do I need to be arrogant to get ahead?

Knife as defense against stray dogs

Maths symbols and unicode-math input inside siunitx commands

Practical application of matrices and determinants

Print a physical multiplication table

Is it insecure to send a password in a `curl` command?

Why are there no stars visible in cislunar space?

Can a medieval gyroplane be built?

Do US professors/group leaders only get a salary, but no group budget?

Fewest number of steps to reach 200 using special calculator

What does "mu" mean as an interjection?

How does 取材で訪れた integrate into this sentence?

Brake pads destroying wheels

How are passwords stolen from companies if they only store hashes?

Optimising a list searching algorithm

Calculate the frequency of characters in a string

What (if any) is the reason to buy in small local stores?

Can other pieces capture a threatening piece and prevent a checkmate?

What favor did Moody owe Dumbledore?

Existence of a celestial body big enough for early civilization to be thought of as a second moon

PTIJ: Why do we blow Shofar on Rosh Hashana and use a Lulav on Sukkos?

Describing a chess game in a novel

PTIJ: Do Irish Jews have "the luck of the Irish"?



How to create stored procedure involving wildcards?


Create stored procedure to select the data?How to create a mysql stored procedure through linux terminalMySQL stored procedure create database by monthCannot create stored procedureSQL Server : create table within stored procedureHow can we create a table from stored procedure?How can I partition records vertically across machines?Innovative solution required - Remotely create stored procedureStored Procedure Processing and Error LogHow to create stored procedure that returns query result?













0















I have a question,



I want to write a stored procedure given a name in the where clause of the query, return all matching identities of the staff members who have staff name that contains the queried name.



A staff may be assigned to multiple departments and therefore possess multiple staff_ID, staff_name, and staff_email.



For example,



a staff member who has 5 staff records with (staff_ID 123 (main), staff_ID 134009, staff_ID 283904, staff_ID 321380, staff_ID 284057), having staff_name Alex Lim, Alex Lim Hong Jun.



I would like my output to return all records (with 2 column types described below)



1 - main where there will be the main_staff_id, main_staff_name, main_staff_email



2 - matched where there will be matched staff_id, matched_staff_name, matched_email



Would like to seek advice from the floor about how to create a stored procedure like this. Many thanks.









share







New contributor




Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I have a question,



    I want to write a stored procedure given a name in the where clause of the query, return all matching identities of the staff members who have staff name that contains the queried name.



    A staff may be assigned to multiple departments and therefore possess multiple staff_ID, staff_name, and staff_email.



    For example,



    a staff member who has 5 staff records with (staff_ID 123 (main), staff_ID 134009, staff_ID 283904, staff_ID 321380, staff_ID 284057), having staff_name Alex Lim, Alex Lim Hong Jun.



    I would like my output to return all records (with 2 column types described below)



    1 - main where there will be the main_staff_id, main_staff_name, main_staff_email



    2 - matched where there will be matched staff_id, matched_staff_name, matched_email



    Would like to seek advice from the floor about how to create a stored procedure like this. Many thanks.









    share







    New contributor




    Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have a question,



      I want to write a stored procedure given a name in the where clause of the query, return all matching identities of the staff members who have staff name that contains the queried name.



      A staff may be assigned to multiple departments and therefore possess multiple staff_ID, staff_name, and staff_email.



      For example,



      a staff member who has 5 staff records with (staff_ID 123 (main), staff_ID 134009, staff_ID 283904, staff_ID 321380, staff_ID 284057), having staff_name Alex Lim, Alex Lim Hong Jun.



      I would like my output to return all records (with 2 column types described below)



      1 - main where there will be the main_staff_id, main_staff_name, main_staff_email



      2 - matched where there will be matched staff_id, matched_staff_name, matched_email



      Would like to seek advice from the floor about how to create a stored procedure like this. Many thanks.









      share







      New contributor




      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have a question,



      I want to write a stored procedure given a name in the where clause of the query, return all matching identities of the staff members who have staff name that contains the queried name.



      A staff may be assigned to multiple departments and therefore possess multiple staff_ID, staff_name, and staff_email.



      For example,



      a staff member who has 5 staff records with (staff_ID 123 (main), staff_ID 134009, staff_ID 283904, staff_ID 321380, staff_ID 284057), having staff_name Alex Lim, Alex Lim Hong Jun.



      I would like my output to return all records (with 2 column types described below)



      1 - main where there will be the main_staff_id, main_staff_name, main_staff_email



      2 - matched where there will be matched staff_id, matched_staff_name, matched_email



      Would like to seek advice from the floor about how to create a stored procedure like this. Many thanks.







      mysql stored-procedures





      share







      New contributor




      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 8 mins ago









      JlpooJlpoo

      61




      61




      New contributor




      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Jlpoo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Jlpoo is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232397%2fhow-to-create-stored-procedure-involving-wildcards%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Jlpoo is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Jlpoo is a new contributor. Be nice, and check out our Code of Conduct.













          Jlpoo is a new contributor. Be nice, and check out our Code of Conduct.












          Jlpoo is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232397%2fhow-to-create-stored-procedure-involving-wildcards%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          ORA-01691 (unable to extend lob segment) even though my tablespace has AUTOEXTEND onORA-01692: unable to...

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          Circunscripción electoral de Guipúzcoa Referencias Menú de navegaciónLas claves del sistema electoral en...