Jump to content
Fivewin Brasil

Ajuda com Comando SQL


Jmsilva

Recommended Posts

Olá! como ficaria um SELECT, para exibir SEMENTE as linhas em que os campos CODIGO e a DATACADASTRO sejam idênticas

Pseudo código:

Select * from <nometabela> where codigo=codigo and datacadastro=datacadastro;

        CODIGO,TIPO,DATA,QTDE
result: 1,'S',01/01/2020,  10
        1,'E',01/01/2020, 100
        
        5,'E', 10/01/2020, 20
        5,'S',10/01/2020,   5
        5,'S',10/01/2020,   3

BLZ

 

Link to comment
Share on other sites

 

Olá! como ficaria um SELECT, para exibir SEMENTE as linhas em que os campos CODIGO e a DATACADASTRO sejam idênticas

Pseudo código:

Select * from <nometabela> where codigo=codigo and datacadastro=datacadastro;


        CODIGO,TIPO,DATA,QTDE
result: 1,'S',01/01/2020,  10
        1,'E',01/01/2020, 100
        
        5,'E', 10/01/2020, 20
        5,'S',10/01/2020,   5
        5,'S',10/01/2020,   3

BLZ

 

Com im put e pesquisa somente um uma tabela? Ou comparando duas tabelas, como se fosse um RELATION?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...