Guest User

Untitled

a guest
Apr 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. INSERT INTO partitions.accounts_providers_2(id_account, id_provider, id_at_provider, period, control_string)
  2. SELECT _accounts_id_to_save, _accounts_id_provider_to_save, _accounts_id_at_provider, '2',
  3. ('"_streets_city"=>"' || _streets_city || '", "_accounts_name"=>"' || _accounts_name
  4. || '", "_accounts_phone"=>"' || _accounts_phone || '", "_streets_street"=>"' || _streets_street
  5. || '", "_accounts_surname"=>"' || _accounts_surname || '", "_houses_house_num"=>"' || _houses_house_num
  6. || '", "_accounts_flat_num"=>"' || _accounts_flat_num || '", "_streets_city_type"=>"'
  7. || _streets_city_type || '", "_houses_house_block"=>"' || _houses_house_block
  8. || '", "_houses_house_liter"=>"' || _houses_house_liter || '", "_accounts_flat_liter"=>"'
  9. || _accounts_flat_liter || '", "_accounts_middlename"=>"' || _accounts_middlename
  10. || '", "_streets_street_type"=>"' || _streets_street_type || '", "_accounts_count_rooms"=>"'
  11. || CASE WHEN _accounts_count_rooms IS NOT NULL THEN _accounts_count_rooms::character varying ELSE ''::character varying END
  12. || '", "_accounts_count_people"=>"'
  13. || CASE WHEN _accounts_count_people IS NOT NULL THEN _accounts_count_people::character varying ELSE ''::character varying END
  14. || '", "_accounts_square_total"=>"'
  15. || CASE WHEN _accounts_square_total IS NOT NULL THEN _accounts_square_total::character varying ELSE ''::character varying END
  16. || '", "_accounts_square_heated"=>"'
  17. || CASE WHEN _accounts_square_heated IS NOT NULL THEN _accounts_square_heated::character varying ELSE ''::character varying END
  18. || '", "_accounts_square_living"=>"'
  19. || CASE WHEN _accounts_square_living IS NOT NULL THEN _accounts_square_living::character varying ELSE ''::character varying END
  20. || '"')::hstore
  21. FROM uploads."2011-12-08-15-04-16-420"
Add Comment
Please, Sign In to add comment