set more columns to null when empty
This commit is contained in:
parent
70b24db9eb
commit
206854224e
|
@ -24,6 +24,9 @@ select * from "raw".awardsmanagers;
|
||||||
|
|
||||||
alter table temp.awardsmanagers drop column "tie";
|
alter table temp.awardsmanagers drop column "tie";
|
||||||
|
|
||||||
|
update temp.awardsmanagers
|
||||||
|
set notes = nullif(notes, '');
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS main."awardsmanagers" (
|
CREATE TABLE IF NOT EXISTS main."awardsmanagers" (
|
||||||
"manager" TEXT,
|
"manager" TEXT,
|
||||||
"award" TEXT,
|
"award" TEXT,
|
||||||
|
|
|
@ -27,6 +27,9 @@ update awardsplayers
|
||||||
set awardid = 'Silver Slugger'
|
set awardid = 'Silver Slugger'
|
||||||
where awardid = 'SIlver Slugger';
|
where awardid = 'SIlver Slugger';
|
||||||
|
|
||||||
|
update temp.awardsplayers
|
||||||
|
set notes = nullif(notes, '');
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS main."awardsplayers" (
|
CREATE TABLE IF NOT EXISTS main."awardsplayers" (
|
||||||
"player" TEXT,
|
"player" TEXT,
|
||||||
"award" TEXT,
|
"award" TEXT,
|
||||||
|
|
|
@ -31,6 +31,7 @@ where playerid = 'smithbu01' and yearid = 1911;
|
||||||
|
|
||||||
update batting
|
update batting
|
||||||
set
|
set
|
||||||
|
G_batting = nullif(G_batting,''),
|
||||||
RBI = nullif(RBI,''),
|
RBI = nullif(RBI,''),
|
||||||
SB = nullif(SB,''),
|
SB = nullif(SB,''),
|
||||||
CS = nullif(CS,''),
|
CS = nullif(CS,''),
|
||||||
|
@ -39,7 +40,8 @@ set
|
||||||
HBP = nullif(HBP,''),
|
HBP = nullif(HBP,''),
|
||||||
SH = nullif(SH,''),
|
SH = nullif(SH,''),
|
||||||
SF = nullif(SF,''),
|
SF = nullif(SF,''),
|
||||||
GIDP = nullif(GIDP,'');
|
GIDP = nullif(GIDP,''),
|
||||||
|
G_old = nullif(G_old,'');
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS main."batting" (
|
CREATE TABLE IF NOT EXISTS main."batting" (
|
||||||
"player" TEXT,
|
"player" TEXT,
|
||||||
|
|
Loading…
Reference in New Issue