Thanks for the response Simon. I am working with field loggers where the field workers are capturing different assets using a Trimble mobile device. I have more than 1200 individual tables, each table holding the values of a unique asset.
Living in South Africa where bandwidth is a myth in some areas and lots of verifications must happen before we pump the data unnecessarily to a central point I would like to read only those asset data tables, that were touched and not all 1200 individual tables just to find some empty tables. This will assist me in verifying some basic data abnormalities which could be rectified before data is transferred and then deleted. That is one aspect. I also want to use minimal triggers to identify certain abnormalities and perform certain processes. This I want to keep Central and not writing triggers for all 1200 tables. So key to a solution I was thinking of is to store table names and field names in a central table and then reference those tables and those fields identified as problem areas during the capture process. I have inherit this system and trying my best to rewrite it as it is not a normalised system. But as usual business continue and no one is waiting for the IT guys and there is no end in sight for enhancement requests! Does it sound familiar? Bertus On 1 Nov 2011, at 10:25am, Stander, Bertus (Pretoria) wrote: > If I create a table as illustrated below. > > CREATE TABLE Testing ( > > ID INTEGER PRIMARY KEY AUTOINCREMENT, > > Tbl_Name VARCHAR (45)); In this example you have a TABLE called 'Testing' and a COLUMN called 'Tbl_Name'. > The value of 'Tbl_Name' is set to 'My_Table' > > Will it be possible to read the values in table My_Table using the field > 'Tbl_Name'? > > Select * from Testing.Tbl_Name; > > The tests I have performed is not working. Good commands for your above example would be INSERT INTO Testing (Tbl_Name) VALUES ('My_Table'); SELECT * FROM Testing; SELECT ID,Tbl_Name FROM Testing; SELECT ID FROM Testing WHERE Tbl_Name = 'My_Table'; However, the names you have picked are a little strange unless you are storing information about tables. It would be more normal to see CREATE TABLE My_Table ( ID INTEGER PRIMARY KEY AUTOINCREMENT, My_Column TEXT); INSERT INTO My_Table (My_Column) VALUES ('example row'); SELECT * FROM My_Table; SELECT ID, My_Column FROM My_Table; SELECT ID FROM My_Table WHERE My_Column = 'example row'; Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users This email has been scanned for viruses and malware, and automatically archived by Mimecast SA (Pty) Ltd, an innovator in Software as a Service (SaaS) for business. Mimecast Unified Email Management UEM) offers email continuity, security, archiving and compliance with all current legislation. To find out more,contact Mimecast. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users