SQLite issue with Table Names using numbers?

后端 未结 2 1662
感情败类
感情败类 2021-01-12 09:16

I\'m developing an app which requires that the user selects a year formatted like this 1992-1993 from a spinner. The tablename is also named 1992-19

相关标签:
2条回答
  • 2021-01-12 10:07

    Yes and No. It has an issue with numbers at the beginning of a table name. 1992-1993 is an expression returning -1. Try to rename the table to Year1992.

    Here a similar issue on SO.

    0 讨论(0)
  • 2021-01-12 10:13

    sorry for late post

    There may be a deeper issue here - is the structure you are using (table name per item in spinner) the best one for the job?

    You may find that you want a number of tables e.g.

    spinner_value (id, value) form_data(id, spinner_value_id, etc ....)

    0 讨论(0)
提交回复
热议问题