Viewing 15 posts - 121 through 135 (of 462 total)
I was going through one white paper recently and thought its good. A lengthy one but discusses lot of aspects with performance tuning.
(May be more suited for a DBA...
December 14, 2009 at 6:56 am
Please read this article on how to post query,
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Is this what you need?
select geog.region_name, sum(sales) AS Total_sales
from store_info inner join geog
On geog.store_name = store_info.store_name
Where geog.region_name = 'west'
group by geog.region_name
Order...
December 14, 2009 at 3:28 am
What is the business rule to get your 'first' and 'last' row?
AS suggested earlier, give some test data in a consumable format and what you expect and the rule for...
December 11, 2009 at 1:41 am
Some test data and table script would help a lot.
But is this what you want?
Select X.id,Y.id,X.create_time Pending_time,Y.create_time unlock_time
From ticket_history X
JOIN ticket_history Y
ON X.ticket_id = Y.ticket_id
AND X.state_id = Y.state_id
Where...
December 10, 2009 at 12:28 am
Not completely sure if I understand your requirement, but i think 'multithreading' is something you may want to look at. Create a new thread and leave it to execute. This...
December 9, 2009 at 6:42 am
or this?
Declare @string varchar(20)
SET @string = '2009-Nov-11'
SELECT datepart(m,CONVERT(datetime, @string))
December 9, 2009 at 2:53 am
pesche_h (12/8/2009)
However, is there also a solution for other conversions than date-conversions? (e.g. overflow when converting to smallint, conversion...
December 8, 2009 at 11:07 am
Checkout ISDate
,
http://msdn.microsoft.com/en-us/library/ms187347(SQL.90).aspx
December 8, 2009 at 6:17 am
How is your date stored in char data type, I mean the format? what is the conversion that you are doing?
December 8, 2009 at 6:01 am
ALZDBA has given you a good example. How'd you tell SQL Server what is the 'last' message?
December 8, 2009 at 5:57 am
Isnt it the same as,
http://www.sqlservercentral.com/Forums/Topic829346-149-1.aspx
I thought arun has answered it and u dint give any feedback on that thing there?
December 8, 2009 at 4:42 am
Hi James, good to see data in a consumable format but I am afraid the requirement you are giving is insufficient. Its an attempt to answer your question and give...
December 8, 2009 at 4:36 am
Not sure but these date functions handle these things, no?
This,
Select dateadd(mm,1, dateadd(day,0, datediff(day,0,'2010-01-29')))
would give me the result,
2010-02-28 00:00:00.000
Edited: Ohh ignore it please Chris, I now got what...
December 7, 2009 at 4:30 am
You can use tally table also, does this help?
I think it will return the last record also which is of no importance in this case,
SELECT (U1.ROLLNO + 1)
FROM ...
December 7, 2009 at 4:20 am
If the deadline is going to be one month ahead of the current date when the update is happening, then can you use this?
sorry if I underestimated your requirement
Select dateadd(mm,1,...
December 7, 2009 at 1:46 am
Viewing 15 posts - 121 through 135 (of 462 total)