Hi,
In a single table I am updating the field Route_Class. Pretty straight forward.
UPDATE workingtable SET workingtable.route_class = Switch(
WorkingTable.Stop_ID = '04434MAXXIS', 'MAX-04434',
WorkingTable.Stop_ID = '04434MICHELIN', 'MIS-04434',
WorkingTable.Stop_ID = '04434TOYO TIRE', 'TOY-04434',
WorkingTable.Stop_ID = '04434CMCCLA', 'CMC-WED4434')
In the same table, there is different criterion for the WorkingTable.Stop_ID value '04434CMCCLA',
where IF 'Date_Field' is the Day of week is 1 (Tues) I want to make the route_class 'CMC-TUES4434' else leave it as is. I tried using a Case statement
CASE (WHEN (WorkingTable.Stop_ID = '04434CMCCLA') AND (WEEKDAY, workingtable.ScheduledArrival= 1)) THEN 'CMC-TUES4434' ELSE 'CMC-WED4434' END
Any help is appreciated.
RP
In a single table I am updating the field Route_Class. Pretty straight forward.
UPDATE workingtable SET workingtable.route_class = Switch(
WorkingTable.Stop_ID = '04434MAXXIS', 'MAX-04434',
WorkingTable.Stop_ID = '04434MICHELIN', 'MIS-04434',
WorkingTable.Stop_ID = '04434TOYO TIRE', 'TOY-04434',
WorkingTable.Stop_ID = '04434CMCCLA', 'CMC-WED4434')
In the same table, there is different criterion for the WorkingTable.Stop_ID value '04434CMCCLA',
where IF 'Date_Field' is the Day of week is 1 (Tues) I want to make the route_class 'CMC-TUES4434' else leave it as is. I tried using a Case statement
CASE (WHEN (WorkingTable.Stop_ID = '04434CMCCLA') AND (WEEKDAY, workingtable.ScheduledArrival= 1)) THEN 'CMC-TUES4434' ELSE 'CMC-WED4434' END
Any help is appreciated.
RP