Hello guys.

I just discussed with my boss because ask me something that I don't think you can in MySQL and in general in SQL.

I've this output:
Code:
mysql> SELECT
	*
FROM
	doTable
WHERE
	`idticket` LIKE '%36781730%'
OR `idticket` LIKE '%36776190%';
+----------+------------------+----------+--------------+------------------------+---------+-------+
| idticket | d1_assignation   | resource | state        | statenotebook          | id      | id2   |
+----------+------------------+----------+--------------+------------------------+---------+-------+
| 36776190 | 2013-03-17 10:12 | Prep     | Assigned SMS | transfered to notebook | 4070607 | 35017 |
| 36776190 | 2013-03-17 10:13 |          | Assigned     |                        | 4070608 | 35018 |
| 36781730 | 2013-03-18 07:52 |          | Assigned     |                        | 4080831 | 43872 |
| 36781730 | 2013-03-18 07:56 | PES/AT   | Assigned SMS | transfered to notebook | 4080832 | 43873 |
+----------+------------------+----------+--------------+------------------------+---------+-------+
4 rows in set
what you ask instead is:
Code:
+----------+------------------+----------+--------------+------------------------+---------+-------+
| idticket | d1_assignation   | resource | state        | statenotebook          | id      | id2   |
+----------+------------------+----------+--------------+------------------------+---------+-------+
| 36776190 | 2013-03-17 10:12 | Prep     | Assigned SMS | transfered to notebook | 4070607 | 35017 |
| 36781730 | 2013-03-18 07:52 |          | Assigned     |                        | 4080831 | 43872 |
+----------+------------------+----------+--------------+------------------------+---------+-------+
to my knowledge the two lines have nothing in common.

For the lines with id2 35017 and id2 43873, is sufficient insert the condition 'resource' NOT NULL and 'state' equal to 'Assigned', but this condition not extract the lines with id2 43872 and id2 35018, because the 'resource' IS NULL.

It's correct what I say?
I need expert opinion.

Thank you in advance for your help.