I’m really not sure how to query this at all. I have in my DB the following
id,employee,jobsite1,stime,etime,lunchout,lunchin,description,materials,jobsite2,stime,etime,lunchout2,lunchin2,description2,materials2
That actually repeats 5 times. When I do SELECT * from table works like a charm pulls all my data (I export this into an xls to edit it), I then take all the info from jobsite2,3,4,&5 and copy and paste it onto ONE row. so basically
ID, EMPLOYEE, JOBSITE, , STIME,ETIME,LUNCHOUT,LUNCHIN, DESCRIPTION, MATERIALS
1, CHRIS , MYSITE, , 9:00, 1:00 ,12:15, 12:45 , WORKED HERE, NONE
1, CHRIS , SECONDSITE, 1:15, 5:00 , , , WORKED HERE, NONE
2, BOB , MYSITE , 9:00, 5:00 ,12:00 ,12:30 , WORKED HERE, NONE
3, MIKE , MYSITE , 9:00, 2:00 ,12:00 ,12:30 , WORKED HERE, BOUGHT STUFF
3, MIKE , SECONDSITE, 2:00, 5:30 , , , DOING THIS , NONE
IS there a way to query this without me doing this manually through excel? Using maybe JOIN? I have never used JOIN, but heard about it, and was always curious is exporting this could be easier once I have the right query setup? Does this make sense?
If I understand you correctly,you can do it using
UNION