Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. UPDATE timetable
  2. SET eta = (
  3. CASE
  4. WHEN (trips.starttime::int / 100) + (destination.zuluoffset * -1 ) < 24 THEN ((trips.starttime::int / 100) + (destination.zuluoffset * -1 )) * 100
  5. WHEN (trips.starttime::int / 100) + (destination.zuluoffset * -1 ) > 23 THEN ((trips.starttime::int / 100) + (destination.zuluoffset * -1 ) - 24) * 100
  6. END )
  7. FROM
  8. destination,
  9. trips
  10. WHERE
  11. timetable.tripsid = trips.id;
  12.  
  13. UPDATE timetable
  14. SET eta = lpad(eta, 4, '0');
  15.  
  16. SET eta = lpad((CASE statement here), 4, '0')
  17.  
  18. ERROR: function lpad(numeric, integer, unknown) does not exist
  19. LINE 3: SET eta = lpad((
  20. ^
  21. 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