Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Selecting the maximum date when multiple values exist

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-10 : 07:46:06
Sandy writes "We have a table that stores multiple values for the same value type and I need to pull the maximum add date. I have tried using max(adddate) but this is not working. Can you please provide the correct syntax.

Thanks"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-10 : 07:52:11
You should post table structure, sample and expected result

Is this you want?

Select max(date) from yourtable group by values

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

kapilarya
Yak Posting Veteran

86 Posts

Posted - 2005-08-10 : 08:26:13
try checking this
i think this will help you

select isdate('abc0'), isdate('12/12/2005'), isdate('23/23/2005')

try putting where clause like

select max(yourfield) from yourtable
where isdate(yourfield)=1


Kapil Arya
Go to Top of Page
   

- Advertisement -