Fetch records of postgres and store it in different table , if one column is null The 2019...

What is the best strategy for white in this position?

How is radar separation assured between primary and secondary targets?

Patience, young "Padovan"

Dual Citizen. Exited the US on Italian passport recently

How to reverse every other sublist of a list?

CiviEvent: Public link for events of a specific type

Understanding the implication of what "well-defined" means for the operation in quotient group

Potential by Assembling Charges

Why do UK politicians seemingly ignore opinion polls on Brexit?

Is flight data recorder erased after every flight?

Does a dangling wire really electrocute me if I'm standing in water?

How long do I have to send my income tax payment to the IRS?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

What is this 4-propeller plane?

How are circuits which use complex ICs normally simulated?

Protecting Dualbooting Windows from dangerous code (like rm -rf)

How to make payment on the internet without leaving a money trail?

Can the Protection from Evil and Good spell be used on the caster?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

When to use the root test. Is this not a good situation to use it?

Does light intensity oscillate really fast since it is a wave?

A poker game description that does not feel gimmicky

Why do I get badly formatted numerical results when I use StringForm?

Is an up-to-date browser secure on an out-of-date OS?



Fetch records of postgres and store it in different table , if one column is null



The 2019 Stack Overflow Developer Survey Results Are InPostgres: “Pivot” unioned table based on one columnPostgres 9.2 - Create View Different Column NamesHow to store day and time in postgres?Postgres Partition Table Trigger inserting duplicate recordsFilter column by records matching a timezone in PostgresData structure design for supporting arbitrary number of columns in table or databaseStore both geometry and geography or store one and calculate the other?Remove first all null records from first part of time series until one value is not null and return the rest, in PostgreSQLFilter one column by value in second column postgresHow to fetch the records which is belongs to only one group in postgresql





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a table employee(id,empname,salary,dob)
If the record of id and empname is null..whole record should be removed in different table...



For example.....



 id  | empname |salary | year
_____________________________
101 | ishi |100000 | null
null | aarush |200000 | 4
102 | rkr |2000000| 6
104 |null |300000 | 3
105 |null |400000 | 3


If Id column has null value..the record should be fetch and placed in different table say null_table ...same case for empname column
the rest record should be placed in different table say success_table



The output should be



success_table:



 id  | empname |salary | year
_____________________________
101 | ishi |100000 | null
102 | rkr |2000000| 6


null_table:



 id  | empname |salary | year
_____________________________
null | aarush |200000 | 4
104 |null |300000 | 3
105 |null |400000 | 3


I am new to postgres...Any suggestions are appreciated...









share







New contributor




ishika 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 table employee(id,empname,salary,dob)
    If the record of id and empname is null..whole record should be removed in different table...



    For example.....



     id  | empname |salary | year
    _____________________________
    101 | ishi |100000 | null
    null | aarush |200000 | 4
    102 | rkr |2000000| 6
    104 |null |300000 | 3
    105 |null |400000 | 3


    If Id column has null value..the record should be fetch and placed in different table say null_table ...same case for empname column
    the rest record should be placed in different table say success_table



    The output should be



    success_table:



     id  | empname |salary | year
    _____________________________
    101 | ishi |100000 | null
    102 | rkr |2000000| 6


    null_table:



     id  | empname |salary | year
    _____________________________
    null | aarush |200000 | 4
    104 |null |300000 | 3
    105 |null |400000 | 3


    I am new to postgres...Any suggestions are appreciated...









    share







    New contributor




    ishika 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 table employee(id,empname,salary,dob)
      If the record of id and empname is null..whole record should be removed in different table...



      For example.....



       id  | empname |salary | year
      _____________________________
      101 | ishi |100000 | null
      null | aarush |200000 | 4
      102 | rkr |2000000| 6
      104 |null |300000 | 3
      105 |null |400000 | 3


      If Id column has null value..the record should be fetch and placed in different table say null_table ...same case for empname column
      the rest record should be placed in different table say success_table



      The output should be



      success_table:



       id  | empname |salary | year
      _____________________________
      101 | ishi |100000 | null
      102 | rkr |2000000| 6


      null_table:



       id  | empname |salary | year
      _____________________________
      null | aarush |200000 | 4
      104 |null |300000 | 3
      105 |null |400000 | 3


      I am new to postgres...Any suggestions are appreciated...









      share







      New contributor




      ishika 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 table employee(id,empname,salary,dob)
      If the record of id and empname is null..whole record should be removed in different table...



      For example.....



       id  | empname |salary | year
      _____________________________
      101 | ishi |100000 | null
      null | aarush |200000 | 4
      102 | rkr |2000000| 6
      104 |null |300000 | 3
      105 |null |400000 | 3


      If Id column has null value..the record should be fetch and placed in different table say null_table ...same case for empname column
      the rest record should be placed in different table say success_table



      The output should be



      success_table:



       id  | empname |salary | year
      _____________________________
      101 | ishi |100000 | null
      102 | rkr |2000000| 6


      null_table:



       id  | empname |salary | year
      _____________________________
      null | aarush |200000 | 4
      104 |null |300000 | 3
      105 |null |400000 | 3


      I am new to postgres...Any suggestions are appreciated...







      postgresql





      share







      New contributor




      ishika 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




      ishika 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




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









      asked 4 mins ago









      ishikaishika

      1




      1




      New contributor




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





      New contributor





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






      ishika 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
          });


          }
          });






          ishika 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%2f234391%2ffetch-records-of-postgres-and-store-it-in-different-table-if-one-column-is-nul%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








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










          draft saved

          draft discarded


















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













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












          ishika 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%2f234391%2ffetch-records-of-postgres-and-store-it-in-different-table-if-one-column-is-nul%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...