I don't know how to create this table:

There 4 objects:

Aa, bb,cc, res

Aa is name of a1,a2,a3,a4,a5 type
Bb is name of b1,b2,b3,b4,b5 type
Cc is only 1,0 type
Res is result value

If a1 and b1 and cc=1,then the value is 10;
If a1 and b1 and cc=0,then the value is 5;
If a2 and b1 and cc=1,then the value is 12;
If a2 and b1 and cc=0,then the value is 6;
If a3 and b1 and cc=1,then the value is 8;
If a3 and b1 and cc=0,then the value is 3;
If a4 and b1 and cc=1,then the value is 10;
If a4 and b1 and cc=0,then the value is 9;
If a5 and b1 and cc=1,then the value is 20;
If a5 and b1 and cc=0,then the value is 4;
If a2 and b2 and cc=1,then the value is 30;
If a2 and b2 and cc=0,then the value is 50;
.......

I want do a select cmd:
Select res from mytable where aa=a4 and bb=b3;

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

Reply via email to