CREATE TABLE goic (
	ra DOUBLE,
	decl DOUBLE,
	pmra FLOAT,
	pmdecl FLOAT,
	gmag FLOAT,
	rmag FLOAT,
	imag FLOAT,
	zmag FLOAT,
	d51mag FLOAT,
	jmag FLOAT,
	hmag FLOAT,
	kmag FLOAT,
	kepmag FLOAT,
	tmid INT,
	altid INT,
	altsource INT,
	teff INT,
	ebminusv FLOAT,
	av FLOAT,
	parallax FLOAT,
	glon FLOAT,
	glat FLOAT,
	pmtotal FLOAT,
	grcolor FLOAT,
	jkcolor FLOAT,
	gkcolor FLOAT,
	scptest INT,
	nfind INT,
	rclose FLOAT,
	mclose FLOAT
	);
LOAD DATA LOCAL INFILE 'goic.cat' INTO TABLE goic
	(@ra, @decl, @pmra, @pmdecl, @gmag, @rmag, @imag, @zmag, @d51mag,
	 @jmag, @hmag, @kmag, @kepmag, @tmid, @altid, @altsource, @teff,
	 @ebminusv, @av, @parallax, @glon, @glat, @pmtotal, @grcolor,
	 @jkcolor, @gkcolor, @scptest, @nfind, @rclose, @mclose)
        SET ra = IF(@ra=-9999,NULL,@ra),
            decl = IF(@decl=-9999,NULL,@decl),
            pmra = IF(@pmra=-9999,NULL,@pmra),
            pmdecl = IF(@pmdecl=-9999,NULL,@pmdecl),
            gmag = IF(@gmag=-9999,NULL,@gmag),
            rmag = IF(@rmag=-9999,NULL,@rmag),
            imag = IF(@imag=-9999,NULL,@imag),
            zmag = IF(@zmag=-9999,NULL,@zmag),
            d51mag = IF(@d51mag=-9999,NULL,@d51mag),
            jmag = IF(@jmag=-9999,NULL,@jmag),
            hmag = IF(@hmag=-9999,NULL,@hmag),
            kmag = IF(@kmag=-9999,NULL,@kmag),
            kepmag = IF(@kepmag=-9999,NULL,@kepmag),
            tmid = IF(@tmid=-9999,NULL,@tmid),
            altid = IF(@altid=-9999,NULL,@altid),
            altsource = IF(@altsource=-9999,NULL,@altsource),
            teff = IF(@teff=-9999,NULL,@teff),
            ebminusv = IF(@ebminusv=-9999,NULL,@ebminusv),
            av = IF(@av=-9999,NULL,@av),
            parallax = IF(@parallax=-9999,NULL,@parallax),
            glon = IF(@glon=-9999,NULL,@glon),
            glat = IF(@glat=-9999,NULL,@glat),
            pmtotal = IF(@pmtotal=-9999,NULL,@pmtotal),
            grcolor = IF(@grcolor=-9999,NULL,@grcolor),
            jkcolor = IF(@jkcolor=-9999,NULL,@jkcolor),
            gkcolor = IF(@gkcolor=-9999,NULL,@gkcolor),
            scptest = IF(@scptest=-9999,NULL,@scptest),
            nfind = IF(@nfind=-9999,NULL,@nfind),
            rclose = IF(@rclose=-9999,NULL,@rclose),
            mclose = IF(@mclose=-9999,NULL,@mclose);
