Hi all,
I have a problem with a query that I thought is easy. I have a database 
containing a following data:
CREATE TABLE [Magazyn]
(
   [IdMagazyn] integer PRIMARY KEY AUTOINCREMENT ,
   [IdMat] integer,
   [Partia] varchar (10),
   [Ilosc] integer,
   [DelK] integer DEFAULT 0,
   [Mdata] integer
)
Then,  I have the following data in this Table:
Id    IdMat     Partia  Ilosc  DelK
1    6    1457714    900    1
5    6    1457714    900    1
6    6    1457714    480    1
7    6    1476051    900    0
8    6    1476051    900    0
13    6    1476051    900    0
14    6    1479230    900    0   15    6    1479230    900    1
16    6    1479230    900    2
29    1    1454042    1000    1
30    1    1454042    1000    1   31    1    1454042    1000    1   
32    1    1454042    1000    1   33    1    1454042    200    1
34    9    1475137    950    0   35    3    1458702    1000    1
36    5    1480710    900    0
50    4    1475907    900    1
51    4    1475907    900    1   52    6    1479230    900    1
53    6    1479230    900    1
54    6    1476051    900    0   55    6    1476051    900    0   56    
6    1457714    900    0   57    6    1457714    900    0   58    6    
1457714    900    0   59    6    1457714    900    0   60    6    
1457714    900    0

and as a result of the query I need to select a list of 'Partia'  for a 
choosen IdMat, that meens (example IdMat=6):
Id      IdMat      Partia 1         6             1457714   7         
6            1476051   14       6            1479230   and of course 
'Partia' number is selected only once.

How should this query look like?

Regards
WojciechW.


_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to