Jump to content
Fórum Script Brasil
  • 0

Mostrar Maior Campo De Datas


Guest Marcelojc

Question

Guest Marcelojc

olá galera !!!!

tenho um consulta assim :

codigo nome data1 data2 data3

1 xxxxx 15/10/2006 16/10/2006 21/10/2006

Gostaria que quando fizesse a pesquisa pelo codigo =1 (até aqui eu sei)

Maia a outra parte que gostaria que mostrasse fosse a maior data, no caso data3=21/10/2006

já tentei com máx e com último nos totais e sempre me mostram todas as datas.

gostaria que ficasse assim:

codigo =1 data3 = 21/10/2006

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

asc&desc

lembrando asc=asendente e desc=desendente!

depois de add o codigo é só ver e implementar

;)

------------------------------------------------------------------

SELECT *

FROM EMPREGADO

ORDER BY DataNasc DESC;

Link to post
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
Answer this question...

×   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.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148691
    • Total Posts
      644530
×
×
  • Create New...