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
 General SQL Server Forums
 New to SQL Server Programming
 please very adjent

Author  Topic 

ramu143
Yak Posting Veteran

64 Posts

Posted - 2008-07-21 : 07:27:21
SELECT top 1 SUM(CALL_DURATION/60) AS nat_ROAM_talktime,CONVERT(VARCHAR(8),CALL_DATE,20) as date FROM CDR
WHERE roam_flag =1
GROUP BY CONVERT(VARCHAR(8),CALL_DATE,20)
order by CONVERT(VARCHAR(8),CALL_DATE,20)
int his queriry i am getting top 1 but i need bottom one please send a quiery

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-21 : 07:28:25
order by . . DESC


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-21 : 07:34:39
Don't convert the date to string. If the call_date contains time, just remove it using below

SELECT 	TOP 1 
SUM(CALL_DURATION/60) AS nat_ROAM_talktime,
DATEADD(DAY, DATEDIFF(DAY, 0, CALL_DATE), 0) AS [date]
FROM CDR
WHERE roam_flag = 1
GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, CALL_DATE), 0)
ORDER BY [date] DESC



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ramu143
Yak Posting Veteran

64 Posts

Posted - 2008-07-21 : 07:55:42
date add function requires 3 arguments
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-21 : 07:57:38
sorry typo. Amended.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-21 : 11:29:21
"Please very adjent"

What is adjent?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-21 : 11:31:33
quote:
Originally posted by sodeep

"Please very adjent"

What is adjent?


thats another typo...he meant urgent i guess
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-22 : 04:04:14
quote:
Originally posted by visakh16

quote:
Originally posted by sodeep

"Please very adjent"

What is adjent?


thats another typo...he meant urgent i guess


Yes it is. Thats why the spelling mistake

Madhivanan

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

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-07-22 : 04:55:09
Why are problems always very urgent, not 'slightly important' or 'fairly critical', or 'can wait til next week'?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-22 : 04:59:13
Lack of competence?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-07-22 : 05:08:51
Laziness?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-07-22 : 05:12:55
these kinds of posts are seriously starting to irritate me. and i don't get irritated easily
especially the one whit "urgenttttttttttttt"

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-22 : 05:15:45
Phew! I first thought you meant our guesses why people are in a rush...

You must mean this topic?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=107087



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-07-22 : 05:22:32
how'd you guess?

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-07-22 : 05:41:00
quote:
Originally posted by spirit1

these kinds of posts are seriously starting to irritate me. and i don't get irritated easily



Yup. I'm starting to ignore the pleas of urgency.
"When everything's urgent, nothing's urgent"

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-22 : 10:17:17


I have seen this guy(Ramu) always put "Urgent" or Adjent in his request.
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-07-22 : 10:41:32
My guess is some of these people wait until the deadline nears on a project and due to ineptness, they haven't completed their code. Then it's mission critical and they turn to these sites so that some of you (being the kind-hearted talents that you are) will help save their butts and their jobs - then it's VERY ADJENT. I've seen the code you all turn out and it's amazing. It's what I strive to be able to do as I continue to learn but at least I, and many others, make an honest attempt to do it myself, turning for help when I've simply become too frustrated to spot the obvious. I can say you've never disappointed me in your responses. Your patience with some of these posters is incredible - somehow I think you should all have "saint" somewhere within your titles, not only Peso but everyone else who has posted on this topic (except, of course Ramu).

I do have to admit though, some of them are just too funny (or sad, depending on your outlook).

Terry
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-23 : 11:33:34
Your gain is probably that you study and learn the suggestion we make.
Ramu and his peers will never study them and learn.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -