sssibrahim
Programmer
Hi!,
I'm new to this SQL Querying. I'm having the following question:
My table MACHINE contains the following columns:
MachineID
PurchaseDate
Brand
ServiceDate
Day1
Day2
Day3
Day4
Day5
Day6
Day7
where Day1 to Day7 gives the respective Online Hours of that machine From Monday to Sunday. Now I want a Single Query that will return me the OnlineHours of all the Machines in a Month or a year (i.e. the date must increment automatically and the corresponding Day(OnlineHours)value must be selected based on the DAY(Mon-Sun) of the Date.
Can anyone help me with a piece of example code. Its very urgent pls.
Thanks in advance.
Regards,
Ibrahim
I'm new to this SQL Querying. I'm having the following question:
My table MACHINE contains the following columns:
MachineID
PurchaseDate
Brand
ServiceDate
Day1
Day2
Day3
Day4
Day5
Day6
Day7
where Day1 to Day7 gives the respective Online Hours of that machine From Monday to Sunday. Now I want a Single Query that will return me the OnlineHours of all the Machines in a Month or a year (i.e. the date must increment automatically and the corresponding Day(OnlineHours)value must be selected based on the DAY(Mon-Sun) of the Date.
Can anyone help me with a piece of example code. Its very urgent pls.
Thanks in advance.
Regards,
Ibrahim