1
$\begingroup$

I'm trying to query http://tapvizier.u-strasbg.fr/adql/?%20V/147/sdss12 using the following query, built by clicking Construct your query and Columns and constraints, and then selecting the columns and constraints I want. My goal is to get a csv file of photometric magnitudes and redshift data from SDSS DR12.  

 -- output format : csv
 SELECT TOP 100 "V/147/sdss12".RA_ICRS,  "V/147/sdss12".DE_ICRS,  "V/147/sdss12".mode,  "V/147/sdss12".q_mode,  "V/147/sdss12".class,  "V/147/sdss12".SDSS12,  "V/147/sdss12".m_SDSS12, 
 "V/147/sdss12".objID,  "V/147/sdss12"."Sp-ID",  "V/147/sdss12".ObsDate,  "V/147/sdss12".Q,  "V/147/sdss12".umag,  "V/147/sdss12".e_umag,  "V/147/sdss12".gmag,  "V/147/sdss12".e_gmag, 
 "V/147/sdss12".rmag,  "V/147/sdss12".e_rmag,  "V/147/sdss12".imag,  "V/147/sdss12".e_imag,  "V/147/sdss12".zmag,  "V/147/sdss12".e_zmag,  "V/147/sdss12".zsp,  "V/147/sdss12".zph, 
 "V/147/sdss12".e_zph,  "V/147/sdss12"."<zph>",  "V/147/sdss12".e_zsp,  "V/147/sdss12".gPmag,  "V/147/sdss12".gpmag,  "V/147/sdss12".ipmag,  "V/147/sdss12".iPmag,  "V/147/sdss12".rpmag, 
 "V/147/sdss12".rPmag,  "V/147/sdss12".upmag,  "V/147/sdss12".uPmag,  "V/147/sdss12".zpmag,  "V/147/sdss12".zPmag
 FROM "V/147/sdss12"
 WHERE "V/147/sdss12".e_zsp<0.01 
AND "V/147/sdss12".Q=3

but when I press Test, I get the following error message:

adql.db.exception.UnresolvedIdentifiersException: 11 unresolved identifiers: V/147/sdss12 [l.5 c.72 - l.5 c.92], V/147/sdss12 [l.5 c.95 - l.5 c.115], V/147/sdss12 [l.5 c.118 - l.5 c.138], V/147/sdss12 [l.5 c.141 - l.5 c.161], V/147/sdss12 [l.5 c.164 - l.5 c.184], V/147/sdss12 [l.6 c.1 - l.6 c.21], V/147/sdss12 [l.6 c.24 - l.6 c.44], V/147/sdss12 [l.6 c.47 - l.6 c.67], V/147/sdss12 [l.6 c.70 - l.6 c.90], V/147/sdss12 [l.6 c.93 - l.6 c.113]! - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".gPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".gpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".ipmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".iPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".rpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".rPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".upmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".uPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".zpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".zPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - 10 unresolved identifiers: V/147/sdss12 [l.5 c.72 - l.5 c.92], V/147/sdss12 [l.5 c.95 - l.5 c.115], V/147/sdss12 [l.5 c.118 - l.5 c.138], V/147/sdss12 [l.5 c.141 - l.5 c.161], V/147/sdss12 [l.5 c.164 - l.5 c.184], V/147/sdss12 [l.6 c.1 - l.6 c.21], V/147/sdss12 [l.6 c.24 - l.6 c.44], V/147/sdss12 [l.6 c.47 - l.6 c.67], V/147/sdss12 [l.6 c.70 - l.6 c.90], V/147/sdss12 [l.6 c.93 - l.6 c.113]! - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".gPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".gpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".ipmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".iPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".rpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".rPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".upmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".uPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".zpmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12". - Ambiguous table reference ""V/147/sdss12"" in ""V/147/sdss12".zPmag" ! It may come (at least) from "V/147/sdss12" or from "V/147/sdss12".

What am I doing wrong here?

$\endgroup$
2
  • $\begingroup$ I used their default query and got "no data in table", so I think the glitch is on their site/side. You may to contact them $\endgroup$ Commented Jul 6, 2022 at 14:05
  • $\begingroup$ If you delete the last 11 fields it works, and returns results. Must be the last 11 fields don't exist. $\endgroup$ Commented Jul 6, 2022 at 17:43

1 Answer 1

2
$\begingroup$

You didn't do anything wrong. The last 10 column names differ only in upper/lower case, the query generator didn't disambiguate them, and the error message was inaccurate.

You can fix it by putting the ambiguous column names in quotes. Omitting the unnecessary table qualifiers:

SELECT TOP 100 RA_ICRS, DE_ICRS, mode, q_mode, class, SDSS12, m_SDSS12,
  objID, "Sp-ID", ObsDate, Q, umag, e_umag, gmag, e_gmag,
  rmag, e_rmag, imag, e_imag, zmag, e_zmag, zsp, zph,
  e_zph, "<zph>", e_zsp, "gPmag", "gpmag", "ipmag", "iPmag", "rpmag",
  "rPmag", "upmag", "uPmag", "zpmag", "zPmag"
FROM "V/147/sdss12"
WHERE e_zsp < 0.01 
  AND Q = 3
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .