SQL-query  
Top  Previous  Next

The SQL- query is the parent of amost search routines in databases. For all of those who don't trust our developer's skills in programming search routines, and who might have fun trying out an sql-query themselves, we left our test-tool from the developing phase simply in the Moodmixer.  
 
H Warning: Die SQL-Query hasn't got any error checking- in some cases ( ie. if a query uses wrong syntax) the Moodmixer can crash! SQL-queries are done at your own risk!  
 
The SQL-query can be started via the menu option [Search- SQL-query] .  
 
sqlsearch  
 
The syntax for queries in SQL is as follows:  
 
Fieldname- condition -value-logical operator  
 
The following fields and values are availble:  
 
Fieldname
SQL-syntax
Value
Format of value
writing





Title
TagTitel
String
Placeholder use %
'set in' quotaion marks
File name
Dateiname
String
Placeholder use %
'set in' quotaion marks
Preference value
Vorrang
number
integer/whole numbers 1-10
without addition
Category 2
Def2
number
integer/whole numbers 1-10
without addition
Category 3
Def3
number
integer/whole numbers 1-10
without addition
Category 4
Def4
number
integer/whole numbers 1-10
without addition
Category 5
Def5
number
integer/whole numbers 1-10
without addition
path
VollerPfad
String
Placeholder use %
'set in' quotaion marks
File size
Größe
number
integer/whole numbers Byte
without addition
Entry date
entry date
Date
tt.mm.jjjj
without addition
Last change
last change
Date
tt.mm.jjjj
without addition
Year
Tag year
number
vierstellig
without addition
Length
length
number
whole numbers in Seconds
without addition
Last played
last played
Date
tt.mm.jjjj
without addition
Artist
TagInterpret
String
Placeholder use %
'set in' quotaion marks
Album
TagAlbum
String
Placeholder use %
'set in' quotaion marks
Artist
Interpret
String
Placeholder use %
'set in' quotaion marks
Composer
Komponist
String
Placeholder use %
'set in' quotaion marks
Genre
Genre
String
Placeholder use %
'set in' quotaion marks
Albumname
Albumname
String
Placeholder use %
'set in' quotaion marks
ndustryNummer
IndustrieNummer
String
Placeholder use %
'set in' quotaion marks
Label
Label
String
Placeholder use %
'set in' quotaion marks
LCNo ( Labelcode)
LCNR
number
integer/whole numbers
without addition





 
 
as condition one can use the normal operators:  
 
The can be used in strings as well as numeric fields  
 
 
=    equals  
<>   doesn't equal  
<=    is lower than or equal ( for strings it is higher in the alphabet)  
<    is lower than  
>=    is higher than or equal  
>    is higher  
 
Only for string entries there are other conditions:  
 
LIKE equals ( can be used with string and placeholder % )  
NOT LIKE doesn't equal ( can be used with string and placeholder % )  
 
as logical operators there are  
 
AND       both values have to be true at the same time  
OR      just either of those value has to be true at the same time  
 
G Attention: AND-combinations have a higher associativity than OR - combinations (as in mathematics the usual precedence rules : multiplication has higher associativity than addition' - in GB: BODMAS ) !  
 
A SQL-query of our search for christmas titles as in the combined search would look like this:  
 
 
sqlweihnachtenabfrage  
 
The result displays the same amount of titles !  
So , if somebody out there has fun using SQL-queries - go ahead and check if our developers haven't made a mistake in their search routins after all!