Hi,
I am very new and never write a TSQL code before. I started learning from yesterday.
I have those tables.
Holiday
- HolidayDate
All the Holiday dates in a year will be populated.
Routes
- RouteID(Identity), StaffID, SatDayDelivery(bit)
Pickup
- PickUpID(Identity), RouteID, StaffID, PickupDate
What I want to do is ---
1) Copy all records from Routes to Pickup in every weekdays.
2) And copy the (SatDayDelivery = True) records on Friday or the day before Holiday.
After learning I know how to copy the data but I don't know how to do complex things. Still learning..
Any help will be greatly appreciated.
rgds,
zhtway
I am very new and never write a TSQL code before. I started learning from yesterday.
I have those tables.
Holiday
- HolidayDate
All the Holiday dates in a year will be populated.
Routes
- RouteID(Identity), StaffID, SatDayDelivery(bit)
Pickup
- PickUpID(Identity), RouteID, StaffID, PickupDate
What I want to do is ---
1) Copy all records from Routes to Pickup in every weekdays.
2) And copy the (SatDayDelivery = True) records on Friday or the day before Holiday.
After learning I know how to copy the data but I don't know how to do complex things. Still learning..
Any help will be greatly appreciated.
rgds,
zhtway