Viewing 15 posts - 91 through 105 (of 1,216 total)
Only read your post after posting my reply. Yes, if the original situation is always NULL in all rows, then you can write update that will take the numbers one...
January 7, 2009 at 8:43 am
I suppose it is one of those cases of bad design with which you are stuck and can't change it... otherwise, if there is any possibility, I would suggest to...
January 7, 2009 at 8:36 am
Just to avoid any misunderstanding, you can not store only date without time in a table with DATETIME datatype - what you can do is to modify insert so that...
January 7, 2009 at 8:17 am
That's of course much better than using dynamic SQL. Dynamic SQL should be used only where it is necessary.
January 7, 2009 at 8:00 am
Whenever I hear about migration from 2000 to 2005 and performance problems with character data, first thing that comes in my mind is collation. If that's the source of problem,...
January 6, 2009 at 8:40 am
Please read your post again, I think you have some mistake there. Or do you really want to select number as name and name as number?
Even if this would be...
January 6, 2009 at 8:24 am
Yeah, attaboy is also interesting... I wonder whether it has something in common with the tropical leafcutter ants (Atta sp.) ? :hehe:
December 23, 2008 at 7:30 am
Right, of course you can copy and paste, but derived tables make the code easier to maintain - you only need to change it in one place if something changes...
December 23, 2008 at 7:10 am
nabajyoti.b (12/23/2008)
however i did not get 20081223 as output for any of the style though 112 is included in the range.Could you please let me know why?
Because not all the...
December 23, 2008 at 6:09 am
I always wondered what these kudos are... but never really bothered to look for it. Just now I looked into Wikipedia and found out that it comes from Greek, and...
December 23, 2008 at 5:06 am
Or maybe MIN(ORDERDATE) and MAX(ORDERDATE) are meant as external parameters of the query and should in fact be @min_orderdate and @max_orderdate? You didn't explain anything about your query, so we...
December 23, 2008 at 1:32 am
Hello Santhosh,
I think that all the posters have missed the main point, and that is that Cum_Sal is a running total of the output. As I understand it, there is...
December 22, 2008 at 4:48 am
OK, that means you need to add the COUNT inside the derived table Q:
SELECT PH.ProductID, MAX(PH.PurchasePrice), MIN(PH.PurchaseOrderDate) AS LastPurchaseDate, Q.PartCount
FROM dbo.PurchaseHistory PH
JOIN ( ...
December 22, 2008 at 2:21 am
Definitely go with the CTE or derived table solution, function will be slower.
If there is a chance that someone will need to use your code with SQL Server 2000, use...
December 22, 2008 at 1:45 am
Hello Sakhti,
Did you restart SQL Server, or SQL Server Agent?
Maybe the problem is that you are confusing two things - one is whether SQL Server as such is running, another...
December 22, 2008 at 1:40 am
Viewing 15 posts - 91 through 105 (of 1,216 total)