OUTPUT format:
1   2   3 4 5 6 7 8 9 10 11
NUV FUV u g r i z j h k  redshift

Query used:
Select p.objID, p.ra, p.dec,
g.NUV_MAG, g.NUV_MAGERR, g.FUV_MAG, g.FUV_MAGERR,
p.u, p.Err_u, p.g, p.Err_g, p.r, p.Err_r, p.i, p.Err_i, p.z, p.Err_z,
t.j_m_k20fe, t.j_msig_k20fe, t.h_m_k20fe, t.h_msig_k20fe,
t.k_m_k20fe, t.k_msig_k20fe,
s.z, s.zErr, s.zConf
FROM TWOMASS.dbo.xsc t, BESTDR2.dbo.PhotoObjAll p, GALEXDRONE.dbo.nuvfuv g, BESTDR2.dbo.SpecOBJall s
WHERE s.specobjid=p.specobjid
and s.zConf>0.95 and s.zWarning=0
and t.ra>308.5 and t.dec>-11.3 and t.dec<-4
and p.ra>308.5 and p.dec>-11.3 and p.dec<-4
and g.RA>308.5 and g.DEC>-11.3 and g.DEC<-4
and g.NUV_MAG>-99 and g.FUV_MAG>-99
and t.cc_flg='0'
and (p.primtarget & 0x00000040 > 0)
and ( ((flags & 0x8)=0) and ((flags & 0x2)=0) and ((flags & 0x40000)=0)
and   ((flags & 0x10) =0) and ((flags & 0x1000)=0) and ((flags & 0x20000) = 0) )and p.objid=BESTDR2.dbo.fgetnearestobjideq(t.ra,t.dec,0.08333)
and p.objid=BESTDR2.dbo.fgetnearestobjideq(g.RA,g.DEC,0.08333)
