On 12 Aug 2010, at 2:31pm, John wrote:

> I'm very beginner in SQL query syntax and my problem is :
> 
> I have a database that contains several objects and their properties.
> 
> Each object has it's own table where its properties are stored ( TEXT
> Keyword, REAL Value ).
> So, in each table we find Keywords such as : Weight, Length, Cost,...
> Table name is described object name.
> 
> 
> What I would need is a query that parses all objects (i.e. tables )
> and return their Name if a specific condition is true.
> 
> For example,
> 
> "return all object Names that have Length > 3.5 "

CHange your schema so that the details for all objects are stored in the same 
table.  This will greatly simplify your life when you start doing real 
operations with your data.  Give every object a number (first object is number 
1, then number 2, etc..).  The columns for this table should be

INTEGER Object
TEXT Keyword
REAL Value

 Or perhaps you'd prefer to give each object a name:

TEXT Object
TEXT Keyword
REAL Value

Whichever if the above you chose your original question then boils down to

SELECT Object FROM ObjectProperties WHERE Keyword = 'Name' AND Value > 3.5

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to