Taj, > Now, I've got two questions. > The first is that I have a column (company) in a customers table. The > problem is that this column has a comma in it for some rows. For example: > > sqlite> select lastname,business FROM customers WHERE id=449; > Toleser|St Lawrence University, Biology Dept. > > Now, that's all fine and everything for interactive SQL, but when I'm > using this in a program (written in Delphi), the comma messes up the > returned values (since they are comma seperated). So, the Delphi > interface ends up returning: > Toleser|St Lawrence University|Biology Dept. > > That's no good :(. Does anyone have any suggestions on what to do about > this problem? I'm using SQLite 2.8.15.
You can do escaping that replaces the comma with something else when writing to the table, then converts it back after you have gotten the info from the comma-separated format. For example, URLs regularly use %XX to escape characters such as space, where XX is the hexadecimal ASCII value. So "space" (ASCII 32) will be "%20". Just remember to escape not only the comma, but also the percentage sign or whatever signals your escape sequences. > As for my question about temporary tables: How long does SQLite keep the > temporary tables around? Only for 1 query? Or until the table hasn't > been modified for X amount of time? Or something I haven't thought of > yet... Can't answer this one, sorry. Ulrik -- Ulrik Petersen, Denmark