length of string query in Topcat TAP
    Petr Skoda 
    skoda at sunstel.asu.cas.cz
       
    Tue Apr  6 12:42:59 CEST 2021
    
    
  
Dear all,
I wanted to get a guess of maximum length of spectral type string in 
SIMBAD (in order to limit database collumn declaration in one our 
archiving system ) by TAP query run through TOPCAT window and I failed.
On http://simbad.u-strasbg.fr:80/simbad/sim-tap
I tried the query
SELECT top 100
    sp_type as sp, LENGTH(sp_type)
    FROM basic
where sp_type is not null
but TOPCAT does not allow (red syntax ) me to type lenght, LENGTH ,
CHAR_LENGTH or anything else (e.g. SIZE) ... in ADQL is CHAR_LENGTH a 
reserved word , but when enforcing the TAP submission it complains on it
(was expecting .... and long list of keywords) but then it warns
(HINT: "CHAR_LENGTH" is not supported in ADQL, but is however a reserved 
word. To use it as a column/table/schema name/alias, write it between 
double   quotes)
I am a little confused ... Is it a problem of TOPCAT syntax checker or a 
general lack in ADQL .... in other words, the ADQL does not allow to 
measure the length of a string atribute ?
Thanks for explanation
(BTW I succeeded just to load all sp_types in a table and then used the 
TOPCAT internal function length(string) in a new synhetic collumn directly 
on a table. But if I would not be able to download all SIMBAD sp_types to 
TOPCAT I would be lost just by using ADQL ....
Best regards,
Petr
*************************************************************************
*  Petr Skoda                         Phone : +420-323-649201, ext. 361 *
*  Stellar Department                         +420-323-620361           *
*  Astronomical Institute CAS         Fax   : +420-323-620250           *
*  251 65 Ondrejov                    e-mail: skoda at sunstel.asu.cas.cz  *
*  Czech Republic                             skoda at asu.cas.cz          *
*************************************************************************
    
    
More information about the dsp
mailing list