set more columns to null when empty

This commit is contained in:
filifa 2024-05-04 23:17:38 -05:00
parent 70b24db9eb
commit 206854224e
3 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,9 @@ select * from "raw".awardsmanagers;
alter table temp.awardsmanagers drop column "tie";
update temp.awardsmanagers
set notes = nullif(notes, '');
CREATE TABLE IF NOT EXISTS main."awardsmanagers" (
"manager" TEXT,
"award" TEXT,

View File

@ -27,6 +27,9 @@ update awardsplayers
set awardid = 'Silver Slugger'
where awardid = 'SIlver Slugger';
update temp.awardsplayers
set notes = nullif(notes, '');
CREATE TABLE IF NOT EXISTS main."awardsplayers" (
"player" TEXT,
"award" TEXT,

View File

@ -31,6 +31,7 @@ where playerid = 'smithbu01' and yearid = 1911;
update batting
set
G_batting = nullif(G_batting,''),
RBI = nullif(RBI,''),
SB = nullif(SB,''),
CS = nullif(CS,''),
@ -39,7 +40,8 @@ set
HBP = nullif(HBP,''),
SH = nullif(SH,''),
SF = nullif(SF,''),
GIDP = nullif(GIDP,'');
GIDP = nullif(GIDP,''),
G_old = nullif(G_old,'');
CREATE TABLE IF NOT EXISTS main."batting" (
"player" TEXT,