sqlite - Select query with logical operators as sub query -


I will run conditional selection queries on the table of sewer structures (S_ Structure) in Sikyat. The table contains the following columns: struct_type (structure type) and year (construction year).

The selection will be based on the structure type as well as the structure age, I think I have sorted the selection selection bit and in relation to age, I want to cut the year from the local time. It's all right and well, but what kind of rational operator do I define as sub queries for: 2 & lt; Age and lieutenant; = 5. Select [Year], [StrikeTipp] from [S_Structures] WHERE [Struc_Type] No ("Manhole", "Roading I", "Dummy", "And Manhole", "T-Piece "," Sub-catchment "," top end "); And where (striptime ('% Y', 'now') - year) & gt; '2' and (striptime ('% Y', 'now') - year); & Lt; = '5';

A subquery will be included in an additional selection field.

Only one single WHERE clause is allowed.

Just use:

  SELECT [Year], [Struc_Type] FROM [S_Structures] WHERE [Struc_Type] NOT IN ('Manhole', 'Roding Eye', 'Dummy', 'and manhole', 't-pays', 'sub-catchment', 'top end') and (striptime ('% Y', 'now') - years 3 and 5;  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -