Question: Is it possible to create the temporary directories in cocoa application for saving the files temporarily.

As per the scenario I need to process some video files and those files firstly will be converted to thumbnails etc then whose files will be uploaded to server.

How this can be achieved?

Answer: 
```
select p.* from San_Proposta p 
where p.StatusProposta_Id = 1

union 

select p.* from San_Proposta p 
    left join San_Negocio n on n.Proposta_Id = p.Proposta_Id
where p.StatusProposta_Id = 2
    and n.ValidaCaptacao <> n.ValidaVenda

```
I tried to follow your thoughts about the contents and relations, but it's quite hard. So I suggest you to re-think your query.

**EDIT:** ok. thanks for the update.

I would use the following statement.

```
SELECT san_proposta.proposta_id FROM   san_proposta WHERE  statusproposta_id = 1
UNION ALL
SELECT san_proposta.proposta_id FROM   san_proposta
       JOIN san_negocio ON san_proposta.proposta_id = san_negocio.proposta_id
                       AND san_negocio.validacaptacao <> san_negocio.validavenda  

```