1
You can see that the countryside ORCAMENTO.DATA_VENDA,
is duplicated isn’t it? Well, I don’t know how to make it more precise than the field ORCAMENTO.DATA_VENDA,
come as null
(As if I deleted the values of the column that is repeated) .
Below is how Sql is in the system
SELECT
ORCAMENTO.ID AS CODIGO,
ORCAMENTO.DATA_VENDA AS DATA_ORCAMENTO,
ORCAMENTO.DATA_VENDA,
ORCAMENTO.VALOR_FINAL
FROM ORCAMENTO
LEFT JOIN CLIENTES ON (ORCAMENTO.NOME_CLIENTE = CLIENTES.CLIENTE)
LEFT JOIN VENDEDOR ON (ORCAMENTO.ID_VENDEDOR = VENDEDOR.ID)
WHERE
ORCAMENTO.SITUACAO = 'IMPORTADO'
The result of it currently comes like this:
I need my appointment to go something like this:
- You can do it?
- How would it be?
Monde the Question Title for better understanding.
What does "two equal fields being one of them null" mean? If one of them is null then it will never be equal to another field, even if the content of the other is null. If you want to test whether the contents of a field are NULL use:
... campo IS NULL ...
. Note the fact that your DATA_VENDA field is not duplicated, only the content of the listed lines is NULL.– anonimo
I see that you have not read or if you want to visualize what I am asking... if you check what is in msg understand what I want. be less literal and more rational.
– Edu Mendonça
the image is just an illustration of how I want it to stay is not real with the least knowledge would know just seeing the above query.
– Edu Mendonça
so it is very easy to come out negative all kind of question just by the title without analyzing the content of the question.
– Edu Mendonça
I’m not the one who denied your question, I just commented that maybe you don’t understand the meaning of NULL.
– anonimo
this doesn’t make any sense, if the data_sale field has to be null it shouldn’t be the same field that is in the table. just do
... data_venda as data_orcamento, null as data_venda ...
. using his words "with the least amount of knowledge you would know"– Rovann Linhalis
What I need is to clear the copy of the field to be null
– Edu Mendonça
the code I put up, do it.
– Rovann Linhalis
The field of sale doesn’t have to be I’m just added a column more.
– Edu Mendonça
then just do what I said and add a column like null...
SELECT
 ORCAMENTO.ID AS CODIGO,
 ORCAMENTO.DATA_VENDA AS DATA_ORCAMENTO,
 NULL AS DATA_VENDA,
 ORCAMENTO.VALOR_FINAL
FROM ORCAMENTO
 LEFT JOIN CLIENTES ON (ORCAMENTO.NOME_CLIENTE = CLIENTES.CLIENTE) 
 LEFT JOIN VENDEDOR ON (ORCAMENTO.ID_VENDEDOR = VENDEDOR.ID)
WHERE
 ORCAMENTO.SITUACAO = 'IMPORTADO'
this is the only option for what you are wanting, if it is not that try to understand and explain better what you are wanting.– Rovann Linhalis
not everything in life It makes sense, what matters is the end result. and with respect to the knowledge that I have spoken above the minimum of knowledgeable to understand what is being proposed. if I had known how to do this I would not have asked.
– Edu Mendonça
Anyway helped me and very much. Thank you very much.
– Edu Mendonça
could rewrite your question as "bring two equal but different fields" and that doesn’t make any sense. Here we only have the information posted in the question and goodwill of many people wanting to help, and you "charged" the minimum of knowledge to interpret your question which was quite rude. On the solution, have.
– Rovann Linhalis