Inserting two rows that are almost identical to each other

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
4
down vote

favorite
1












I'm trying to make test data for an application I'm writing, and some of my test data is very repetitive, involving inserting a row and then inserting another row that is identical except for one column. As such, I have very repetitive INSERT statements that make the file longer than I think it needs to be.



INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
('TUITION',
(SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
(SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')),
(SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
(SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
('TUITION_SERVICE_FEE',
(SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
(SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')) * 0.03,
(SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
(SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
('TUITION',
(SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
(SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')),
(SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
(SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),
('TUITION_SERVICE_FEE',
(SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
(SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')) * 0.03,
(SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
(SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),


Is there a way to clean this up by any chance?







share|improve this question



























    up vote
    4
    down vote

    favorite
    1












    I'm trying to make test data for an application I'm writing, and some of my test data is very repetitive, involving inserting a row and then inserting another row that is identical except for one column. As such, I have very repetitive INSERT statements that make the file longer than I think it needs to be.



    INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
    ('TUITION',
    (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
    (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')),
    (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
    (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
    ('TUITION_SERVICE_FEE',
    (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
    (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')) * 0.03,
    (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
    (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
    ('TUITION',
    (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
    (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')),
    (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
    (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),
    ('TUITION_SERVICE_FEE',
    (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
    (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')) * 0.03,
    (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
    (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),


    Is there a way to clean this up by any chance?







    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      I'm trying to make test data for an application I'm writing, and some of my test data is very repetitive, involving inserting a row and then inserting another row that is identical except for one column. As such, I have very repetitive INSERT statements that make the file longer than I think it needs to be.



      INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
      ('TUITION',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')),
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
      ('TUITION_SERVICE_FEE',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')) * 0.03,
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
      ('TUITION',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')),
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),
      ('TUITION_SERVICE_FEE',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')) * 0.03,
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),


      Is there a way to clean this up by any chance?







      share|improve this question













      I'm trying to make test data for an application I'm writing, and some of my test data is very repetitive, involving inserting a row and then inserting another row that is identical except for one column. As such, I have very repetitive INSERT statements that make the file longer than I think it needs to be.



      INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
      ('TUITION',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')),
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
      ('TUITION_SERVICE_FEE',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Murdoch')) * 0.03,
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Murdoch' AND invoice_date = '2019-09-05'))),
      ('TUITION',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')),
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),
      ('TUITION_SERVICE_FEE',
      (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
      (SELECT grade_id FROM [dbo].[Student] WHERE first_name = 'Hartwell')) * 0.03,
      (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
      (SELECT student_id FROM [dbo].[Student] WHERE first_name = 'Hartwell' AND invoice_date = '2019-09-05'))),


      Is there a way to clean this up by any chance?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Apr 5 at 18:45









      Malachi♦

      25.3k769173




      25.3k769173









      asked Apr 5 at 18:17









      Troy Nguyen

      233




      233




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You should create a Stored Procedure that does this with a parameter called @firstname



          it would come out way cleaner.



          here is what the create would look like, I added in the @InvoiceDate parameters as well thinking that it was also something that was not static in the insert statement.



          CREATE PROCEDURE Sproc_Name 
          @FirstName nvarchar(50)
          ,@InvoiceDate DateTime
          AS
          INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
          ('TUITION',
          (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
          (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)),
          (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
          (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate))),
          ('TUITION_SERVICE_FEE',
          (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
          (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)) * 0.03,
          (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
          (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate)))
          GO


          and then you would call it like this



          EXECUTE Sproc_Name @FirstName = "Murdoch", @InvoiceDate = CONVERT(date, GETDATE())
          -- CONVERT(date, GETDATE()) gives you 2018-04-05


          I just used GetDate() for illustrative purposes, you can put in a string like "2018-04-05" and it should work as well.






          share|improve this answer






























            up vote
            0
            down vote













            Are you trying to insert all of the invoice items for all students with an invoice date of '2019-09-05'? If you use a single query to get all the students you are interested in creating invoice items for, then in the end you would have a total of two insert statements. The one below, then a similar one for the 'Tuition_Service_Fee'. Also, using table joins instead of sub queries is preferred in my opinion - more readable and can be better performing. But definitely, use variables instead of hardcoded values will allow the code to be reused whether you just call the script or create a stored procedure.



            declare @invoiceDtm datetime

            INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id)
            select "Tuition", Grade.tuition_amount, invoice.invoice_id
            from Student
            join invoice on student.student_id = invoice.student_id
            join grade on student.grade_id = grade.grade_id
            where student.invoice_date = @invoiceDtm
            --if you really want to specifiy the first names
            and student.first_name in ('Murdoch', 'Hartwell')





            share|improve this answer























              Your Answer




              StackExchange.ifUsing("editor", function ()
              return StackExchange.using("mathjaxEditing", function ()
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
              );
              );
              , "mathjax-editing");

              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "196"
              ;
              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',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f191342%2finserting-two-rows-that-are-almost-identical-to-each-other%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote



              accepted










              You should create a Stored Procedure that does this with a parameter called @firstname



              it would come out way cleaner.



              here is what the create would look like, I added in the @InvoiceDate parameters as well thinking that it was also something that was not static in the insert statement.



              CREATE PROCEDURE Sproc_Name 
              @FirstName nvarchar(50)
              ,@InvoiceDate DateTime
              AS
              INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
              ('TUITION',
              (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
              (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)),
              (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
              (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate))),
              ('TUITION_SERVICE_FEE',
              (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
              (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)) * 0.03,
              (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
              (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate)))
              GO


              and then you would call it like this



              EXECUTE Sproc_Name @FirstName = "Murdoch", @InvoiceDate = CONVERT(date, GETDATE())
              -- CONVERT(date, GETDATE()) gives you 2018-04-05


              I just used GetDate() for illustrative purposes, you can put in a string like "2018-04-05" and it should work as well.






              share|improve this answer



























                up vote
                2
                down vote



                accepted










                You should create a Stored Procedure that does this with a parameter called @firstname



                it would come out way cleaner.



                here is what the create would look like, I added in the @InvoiceDate parameters as well thinking that it was also something that was not static in the insert statement.



                CREATE PROCEDURE Sproc_Name 
                @FirstName nvarchar(50)
                ,@InvoiceDate DateTime
                AS
                INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
                ('TUITION',
                (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)),
                (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate))),
                ('TUITION_SERVICE_FEE',
                (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)) * 0.03,
                (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate)))
                GO


                and then you would call it like this



                EXECUTE Sproc_Name @FirstName = "Murdoch", @InvoiceDate = CONVERT(date, GETDATE())
                -- CONVERT(date, GETDATE()) gives you 2018-04-05


                I just used GetDate() for illustrative purposes, you can put in a string like "2018-04-05" and it should work as well.






                share|improve this answer

























                  up vote
                  2
                  down vote



                  accepted







                  up vote
                  2
                  down vote



                  accepted






                  You should create a Stored Procedure that does this with a parameter called @firstname



                  it would come out way cleaner.



                  here is what the create would look like, I added in the @InvoiceDate parameters as well thinking that it was also something that was not static in the insert statement.



                  CREATE PROCEDURE Sproc_Name 
                  @FirstName nvarchar(50)
                  ,@InvoiceDate DateTime
                  AS
                  INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
                  ('TUITION',
                  (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                  (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)),
                  (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                  (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate))),
                  ('TUITION_SERVICE_FEE',
                  (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                  (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)) * 0.03,
                  (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                  (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate)))
                  GO


                  and then you would call it like this



                  EXECUTE Sproc_Name @FirstName = "Murdoch", @InvoiceDate = CONVERT(date, GETDATE())
                  -- CONVERT(date, GETDATE()) gives you 2018-04-05


                  I just used GetDate() for illustrative purposes, you can put in a string like "2018-04-05" and it should work as well.






                  share|improve this answer















                  You should create a Stored Procedure that does this with a parameter called @firstname



                  it would come out way cleaner.



                  here is what the create would look like, I added in the @InvoiceDate parameters as well thinking that it was also something that was not static in the insert statement.



                  CREATE PROCEDURE Sproc_Name 
                  @FirstName nvarchar(50)
                  ,@InvoiceDate DateTime
                  AS
                  INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id) VALUES
                  ('TUITION',
                  (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                  (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)),
                  (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                  (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate))),
                  ('TUITION_SERVICE_FEE',
                  (SELECT tuition_amount FROM [dbo].[Grade] WHERE grade_id =
                  (SELECT grade_id FROM [dbo].[Student] WHERE first_name = @FirstName)) * 0.03,
                  (SELECT invoice_id FROM [dbo].[Invoice] WHERE student_id =
                  (SELECT student_id FROM [dbo].[Student] WHERE first_name = @FirstName AND invoice_date = @InvoiceDate)))
                  GO


                  and then you would call it like this



                  EXECUTE Sproc_Name @FirstName = "Murdoch", @InvoiceDate = CONVERT(date, GETDATE())
                  -- CONVERT(date, GETDATE()) gives you 2018-04-05


                  I just used GetDate() for illustrative purposes, you can put in a string like "2018-04-05" and it should work as well.







                  share|improve this answer















                  share|improve this answer



                  share|improve this answer








                  edited Apr 5 at 18:44


























                  answered Apr 5 at 18:36









                  Malachi♦

                  25.3k769173




                  25.3k769173






















                      up vote
                      0
                      down vote













                      Are you trying to insert all of the invoice items for all students with an invoice date of '2019-09-05'? If you use a single query to get all the students you are interested in creating invoice items for, then in the end you would have a total of two insert statements. The one below, then a similar one for the 'Tuition_Service_Fee'. Also, using table joins instead of sub queries is preferred in my opinion - more readable and can be better performing. But definitely, use variables instead of hardcoded values will allow the code to be reused whether you just call the script or create a stored procedure.



                      declare @invoiceDtm datetime

                      INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id)
                      select "Tuition", Grade.tuition_amount, invoice.invoice_id
                      from Student
                      join invoice on student.student_id = invoice.student_id
                      join grade on student.grade_id = grade.grade_id
                      where student.invoice_date = @invoiceDtm
                      --if you really want to specifiy the first names
                      and student.first_name in ('Murdoch', 'Hartwell')





                      share|improve this answer



























                        up vote
                        0
                        down vote













                        Are you trying to insert all of the invoice items for all students with an invoice date of '2019-09-05'? If you use a single query to get all the students you are interested in creating invoice items for, then in the end you would have a total of two insert statements. The one below, then a similar one for the 'Tuition_Service_Fee'. Also, using table joins instead of sub queries is preferred in my opinion - more readable and can be better performing. But definitely, use variables instead of hardcoded values will allow the code to be reused whether you just call the script or create a stored procedure.



                        declare @invoiceDtm datetime

                        INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id)
                        select "Tuition", Grade.tuition_amount, invoice.invoice_id
                        from Student
                        join invoice on student.student_id = invoice.student_id
                        join grade on student.grade_id = grade.grade_id
                        where student.invoice_date = @invoiceDtm
                        --if you really want to specifiy the first names
                        and student.first_name in ('Murdoch', 'Hartwell')





                        share|improve this answer

























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Are you trying to insert all of the invoice items for all students with an invoice date of '2019-09-05'? If you use a single query to get all the students you are interested in creating invoice items for, then in the end you would have a total of two insert statements. The one below, then a similar one for the 'Tuition_Service_Fee'. Also, using table joins instead of sub queries is preferred in my opinion - more readable and can be better performing. But definitely, use variables instead of hardcoded values will allow the code to be reused whether you just call the script or create a stored procedure.



                          declare @invoiceDtm datetime

                          INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id)
                          select "Tuition", Grade.tuition_amount, invoice.invoice_id
                          from Student
                          join invoice on student.student_id = invoice.student_id
                          join grade on student.grade_id = grade.grade_id
                          where student.invoice_date = @invoiceDtm
                          --if you really want to specifiy the first names
                          and student.first_name in ('Murdoch', 'Hartwell')





                          share|improve this answer















                          Are you trying to insert all of the invoice items for all students with an invoice date of '2019-09-05'? If you use a single query to get all the students you are interested in creating invoice items for, then in the end you would have a total of two insert statements. The one below, then a similar one for the 'Tuition_Service_Fee'. Also, using table joins instead of sub queries is preferred in my opinion - more readable and can be better performing. But definitely, use variables instead of hardcoded values will allow the code to be reused whether you just call the script or create a stored procedure.



                          declare @invoiceDtm datetime

                          INSERT INTO [dbo].[InvoiceItem] (invoice_item_name, amount, invoice_id)
                          select "Tuition", Grade.tuition_amount, invoice.invoice_id
                          from Student
                          join invoice on student.student_id = invoice.student_id
                          join grade on student.grade_id = grade.grade_id
                          where student.invoice_date = @invoiceDtm
                          --if you really want to specifiy the first names
                          and student.first_name in ('Murdoch', 'Hartwell')






                          share|improve this answer















                          share|improve this answer



                          share|improve this answer








                          edited Apr 6 at 16:49


























                          answered Apr 5 at 18:48









                          user3281004

                          211




                          211






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f191342%2finserting-two-rows-that-are-almost-identical-to-each-other%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              A48 SLpjgPGusVygJxbDWoX g 8M5tkwWK65Pd,G,Aub34v
                              vQzwaN,3af3Gu 2w3U35UcMsDi2gWjZdFtaEdNnS9ob0,p3Xf6 NzO lpZgUsf1fQO U 4rVZy1R2c8K

                              Popular posts from this blog

                              Chat program with C++ and SFML

                              Function to Return a JSON Like Objects Using VBA Collections and Arrays

                              Read an image with ADNS2610 optical sensor and Arduino Uno