Link to home
Start Free TrialLog in
Avatar of nirisan
nirisan

asked on

SQL statement to convert data from rows to columns from a spreadsheet in required format

Hi
I have a spreadsheet where I have to convert a column into rows with header and add 1 or 0 if data is present or not, as the row values.

Samples attached.

Can I do this by importing the spreadsheet into a SQL database and write a select statement? If so can the sql statement be provided?

so for one pair of origin and destination will have all the applicable days as 1 or 0 in one row.
 original1.xls required-format.xls
SOLUTION
Avatar of reb73
reb73
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nirisan
nirisan

ASKER

thanks