-3

I have a big issue, because I don't know how I can put a singles Value from a table into a new table. Here are the construct of the invoice, how I upload it:

enter image description here

Edit: I give the comment below right, you need more information. I tell you my steps:

The values I need for my work are in a invoice, so I upload this invoice in my database. In the first screenshot you will see the only the construct of the invoice. The values stand for price and a item number. But I need only the prices and the item number. So I have to put these three value in a new table

This is my goal:

enter image description here

DavidG
  • 24,279
  • 14
  • 89
  • 82
Marcello
  • 1
  • 2
  • Do you feel your question is brief enough for others to answer? – Viki888 Nov 23 '16 at 11:01
  • From your requirement, basically you are trying to achieve PIVOT. Have a look on this thread. http://stackoverflow.com/questions/7674786/mysql-pivot-table – Viki888 Nov 23 '16 at 12:08

1 Answers1

-1
 insert into table_1(col1,col2,col3,col4)
 select value1 as col1, value2 as col2, value3 as col3, value4 as col4 from table_2

Make sure the columns names of table_2 much match the columns names of table1 (in which you are inserting the values)

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78