Hi,
Is there a way to extract the content of a column/row in its 'stored' format - i.e. the actual bytes? So that it's 'fairly' easy to read! I have a utility that will look at the hex bytes of any file, but the entire database is (understandably) quite complex. Let me explain the problem that I'm facing and someone might point me in a better direction. I found that a SELECT statement was not returning all of the rows as expected. The query selected rows from a table "where QUERYID = 1". Using the sqlite3 shell program: If I ran a simple "SELECT * FROM table;" then all expected rows were returned - hence the rows were in the table. Looking at the output from the query the QUERYID column contains a value of 1 for all rows (as expected). However, if I ran "SELECT QUERYID,COUNT(*) FROM table GROUP BY 1;" I get two rows in my answer set. They both 'look' like they contain a value of 1, but obviously they are different to the dbms. It would seem for instance as if some rows have a value of 1 (numeric) whilst others might be ' 1' or '1 ' (both text with differing spaces - hence different ot the dbms). The QUERYID column is defined as INTEGER - but effectively sqlite3 ignores this and looks at the data value itself. Hence my question above, is there a way that I can extract the 'real' content (i.e. the bytes) from each row? I have worked around the problem. I noted above that a query such as "SELECT QUERYID,COUNT(*) FROM table GROUP BY 1;" gave two result rows. I worked out that on the table rows counted in one group were inserted by selecting the QUERYID value from another table (using an INSERT/SELECT) and the table rows counted in the second group the value was directly inserted from my program using a parameterised insert. I'm going through an intermediate layer dll (the sqlite3 plus com dll from eztools). I changed my ' parameterised insert ' so that I build the QUERYID value into the sql text itself - but I'd like to try and understand what happened. All help much appreciated. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118 9740192 www: <http://www.ward-analytics.com> http://www.ward-analytics.com Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United Kingdom, GU1 3SR Registered company number: 3917021 Registered in England and Wales. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users