Hi

Could someone please help me out here?

TABLE:
RECNO    | ID       |        TYPE
---------------------------------
1                | 1        |    NULL
2                | 2        |    4                <-KEEP AS IS
3                | 2        |    6                <- DROP
4                | 3        |    NULL        <- KEEP AS IS
5                | 4        |    NULL        <-KEEP AS IS
6                | 5        |    1                <-NULL
7                | 5        |    3                <-DROP
8                | 6        |    7                <-NULL
9                | 6        |    3                <-DROP

What I neede is a SQL statement that for a given value of TYPE, lets say 4,
selects all the unique id's with TYPE = 4 when appropriate otherwise NULL

like:

SOLUTION:
RECNO    | ID       |        TYPE
---------------------------------
1                | 1        |    NULL
2                | 2        |    4
3                | 3        |    NULL
4                | 4        |    NULL
5                | 5        |    NULL
6                | 6        |    NULL


I know this isn't  MySQL specifik but hope for someones help anyway :-)
Sorry for any inconvenience this may course users of the list
Regards Soren


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to