0 votes
25 views

Hi,

This is Huanian. I have created a database and there is a table there. But when I do the query test, it said the table does not exist. See below for the description.

print (qc.mydb_list('NearbyGalaxy'))              # Use of the 'mydb://' prefix is optional
print (qc.mydb_list('mydb://NearbyGalaxy'))

ra,double precision,
dec,double precision,
zgal,double precision,
mjd,integer,
plate,smallint,
fiber_id,smallint,
mag_g,double precision,
mag_r,double precision,
mag_z,double precision,
r50,double precision,
devab_r,double precision,
df1=convert(qc.query(sql="select * from mydb://NearbyGalaxy"))
queryClientError: Error: QM: MyDB table nearbygalaxy does not exist

I have no idea why that happens, since it worked very well last year. 

by | 25 views

1 Answer

+1 vote
The core problem is in the use of upper-case characters in the table name, these are only allowed when the table name is quoted and the quoting behavior has changed in recent updates.  I've created a copy of the table in your mydb with the all lower-case chars so the query should work now, and using lower-case names should avoid this in the future until the quoting bug is fixed in the next update.  Please let us know if you still have problems.
by datalab (19.2k points)
I got it and it worked well now. Thanks a lot.

361 questions

372 answers

385 comments

604 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories