fix numberofchildren cast
This commit is contained in:
parent
b6f26900a7
commit
a36ee22be6
@ -169,7 +169,8 @@ UPDATE import.personnes SET maritalstatus1=json_build_object('fr', trim(maritals
|
|||||||
|
|
||||||
-- 25. Prepare personnes numberofchildren
|
-- 25. Prepare personnes numberofchildren
|
||||||
ALTER TABLE import.personnes ADD COLUMN numberofchildren1 integer;
|
ALTER TABLE import.personnes ADD COLUMN numberofchildren1 integer;
|
||||||
UPDATE import.personnes SET numberofchildren1=to_number(trim(numberofchildren::text) ) WHERE numberofchildren!=''; -- <== case BOUM
|
UPDATE import.personnes SET numberofchildren1=NULLIF(numberofchildren, '')::int;
|
||||||
|
-- SELECT numberofchildren, numberofchildren1 FROM import.personnes;
|
||||||
|
|
||||||
|
|
||||||
-- 26. Prepare personnes household_composition_type
|
-- 26. Prepare personnes household_composition_type
|
||||||
|
Loading…
Reference in New Issue
Block a user