Assistance with SQL commands to get certain columns? -


i trying import data excel file sql database. have written function select data excel file using sql statements. part works fine having difficulty writing sql statement since table not standard format.

i have situation this:

enter image description here

notice how there separation in how data listed between plant , col1.

i want select column name (from col1 col6), plant, vehicle, , date category falls in( category1, category2) , vehicle = vehicle , plant in(plant1, plant2)

i can in multiple steps or use programming language assistance want contain as possible sql make more efficient. have method separate data using programming language slow, being why trying this.

the expected output aiming this:

enter image description here


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -