Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE timetable
- SET eta = (
- CASE
- WHEN (trips.starttime::int / 100) + (destination.zuluoffset * -1 ) < 24 THEN ((trips.starttime::int / 100) + (destination.zuluoffset * -1 )) * 100
- WHEN (trips.starttime::int / 100) + (destination.zuluoffset * -1 ) > 23 THEN ((trips.starttime::int / 100) + (destination.zuluoffset * -1 ) - 24) * 100
- END )
- FROM
- destination,
- trips
- WHERE
- timetable.tripsid = trips.id;
- UPDATE timetable
- SET eta = lpad(eta, 4, '0');
- SET eta = lpad((CASE statement here), 4, '0')
- ERROR: function lpad(numeric, integer, unknown) does not exist
- LINE 3: SET eta = lpad((
- ^
- HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement