Viewing 15 posts - 511 through 525 (of 1,217 total)
You didn't post the DDL, so you'll probably have to modify the column names - but the idea should be obvious. Generally, you want to find the highest CallID that...
November 22, 2006 at 2:58 am
Look up OPTION (FAST n) under "OPTION clause" in BOL. I'm not sure how it works and whether it allows to display the first n rows immediately, because I never...
November 21, 2006 at 7:35 am
Clustered index is decidedly better on such column (but there can be only one clustered index and several candidate columns for it)... but I don't think a range should cause...
November 15, 2006 at 1:42 am
No, there was no problem - the question was understood and answered.
If you want to get data for a certain month, the best way (performance wise) is to find date_start...
November 14, 2006 at 5:41 am
You can enter line breaks into the data in your column like this:
declare @message varchar(1000)
set @message = 'This is the first line'+char(13)+'This is the second line'
select @message
This is the...
November 14, 2006 at 5:32 am
Hi,
if you want to GROUP BY some part of the date, the same part of date has to be displayed in the select list. You can't group by year, and then select...
November 13, 2006 at 8:54 am
Hello Deepa,
you have posted a very similar question recently
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=321867
and it was answered to your satisfaction. Could you please point out the differences, or with what you have problems...
November 13, 2006 at 8:36 am
You didn't post the datatype of DATE column, but since you are using function YEAR(), I suppose it is datetime. Target of an update must be a pure column name;...
November 13, 2006 at 8:13 am
Actually, I'm using
DATEADD(d, DATEDIFF(d, 0, GETDATE()), 0)
but both ways result is the same - it is like 5+3 or 3+5. Tested.
November 13, 2006 at 1:03 am
Hello,
I'm not very skilled in use of hierarchy, so most probably there are better ways to do it, but here is one possible solution. It uses UDF - and I...
November 10, 2006 at 7:10 am
Wrack,
originally, before I found out how to work with DATETIME values in SQL Server to gain best performance, I was using UDF to strip off time portion, too. It is not...
November 10, 2006 at 1:25 am
What do you mean by "only date"? If what you mean is "date without time portion" then you have to be careful - as Remi (Ninja) wrote in previous post....
November 9, 2006 at 8:36 am
Hello,
I think you should not use dynamic SQL for this... but let's leave that for now and look at the way how to get the result.
It is a lot easier...
November 9, 2006 at 5:31 am
Yes, the semicolons are pretty confusing... I'm not using OPENROWSET myself, except when I need to get data from some external source (Excel, Access), I just remembered that it works...
November 8, 2006 at 6:37 am
Well, for example by using OPENROWSET - although I'm not sure this is what John meant. I'm using linked servers, so I don't know whether there are some other possibilities or...
November 8, 2006 at 5:30 am
Viewing 15 posts - 511 through 525 (of 1,217 total)