Why don't you store the values in a different table consisting only of the fields "satellite id/number", and "strength", and a link to the appropriate row in the source table (the one that contains the timestamp) ?
----- Original Message ----- From: Mukesh Kumar <mukeshk...@gmail.com> To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Sent: Friday, June 8, 2018, 12:52:58 Subject: [sqlite] Selecting multiple similar columnname. Hi Ryan, Thanks for the advice. I cant share the exact Schema, however i can give an idea. I am trying to store GNSS satellite info, which is streaming every second. My Primary Key is the Timestamp at which i have got the information.. And other columns in the table are the satellite information like SNR,elevation,abc,def,ghi...... for each of the satellite. max number of satellite at a given timestamp can be 64. So in my schema, all the satellite parameters are getting repeated 64 times. I want a easy way to extract the data, lets say get timestamp when any of the satellite has SNR > 30. My Idea was to write a simple query like Select SNR* from Table where SNR*> 30; where * takes value from 1-64. Could you please suggest how to handle such scenarios ? Regards Mukesh P* Please don't print this e-mail unless you really need to.* On Fri, Jun 8, 2018 at 3:35 PM, R Smith <ryansmit...@gmail.com> wrote: > On 2018/06/07 6:11 PM, mukeshkb4u wrote: >> Hi All, >> I have a table with multiple similar column names, like >> abc_1,abc_2,abc_3....... >> Is there a way i can do a select on only these columns in a table, without >> specifiying the full column list? >> Can i use a regular expression in selecting column names ? > There is no such way, and shouldn't be. You could achieve this by writing > a pre-processor on your sql queries, but honestly my advice for simplest > solution - make a view showing only the specific set of columns and then > query that view when needed - perhaps even joining that view to the > original table if you wish to add one or two other columns. > That said, I would like to reiterate Simon's point - If you have that many > similar columns, it suggests a schema with scope to improve. If you post > the whole schema and its purpose/description, someone here might be able to > suggest an easier/better way to do it. > Cheers! > Ryan > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users