I tried in SQLite and it complained about the two ##, so I did
string SPECTRALtemp$="CREATE TABLE temp_spectral_data (wavelength int, intensity int)";
dbEdit change conn:=dbSource$ sql:=SPECTRALtemp$;
dbImport;
and I see the temp_spectral_data table created.
BTW, we improved the db support in LT in 2023b, so code can look cleaner where error code can return, so the above will look like
wks.db.conn$="Driver={SQLite3 ODBC Driver};Database=C:\Users\dev\Downloads\hawaii.sqlite";
wks.db.sql$="SELECT name FROM sqlite_master WHERE type='table' AND name='temp_spectral_data'";
string strErr$;
if(wks.db.test(1, strErr$) != 1) {
//strErr$=;
type "need to add table";
wks.db.sql$="CREATE TABLE temp_spectral_data (wavelength int, intensity int)";
wks.db.run();
}
else
type "table existed already";