Viewing 15 posts - 6,166 through 6,180 (of 10,144 total)
@River1, here are two useful hints for you:
1. Don't encapsulate a batch of statements into a stored procedure until you've finished debugging them - it's much easier to debug a...
June 27, 2012 at 8:28 am
Hadrian (6/27/2012)
Thanks to all!I succeded to solve the problem using pre-fetch hints .
Please share. Others with a similar problem in the future may benefit.
June 27, 2012 at 6:29 am
Jeff Moden (6/26/2012)
ChrisM@Work (6/26/2012)
Jeff Moden (6/25/2012)
ChrisM@Work (6/25/2012)
SELECT
EmployeeID,
Email,
DomainLHS = SUBSTRING(Email, x.PosStart,x.PosEnd-x.PosStart),
DomainRHS = SUBSTRING(Email, y.PosStart,y.PosEnd-y.PosStart)
FROM @t
CROSS APPLY (
SELECT PosStart = 1+CHARINDEX('@',EMAIL,1),
PosEnd = NULLIF(CHARINDEX('.',EMAIL,CHARINDEX('@',EMAIL,1)),0)
) x
CROSS APPLY...
June 27, 2012 at 6:04 am
sh3llm4n (6/27/2012)
i wanna select Nth row of a concatenated column... i wrote this, but it gives me error...
"SELECT TOP 1 test FROM (SELECT TOP 1 (name+cast(id as char)+xtype) as...
June 27, 2012 at 5:56 am
There's no need at all for all the CTE's, it simply makes a trivial query look more complex than it is. If this doesn't work first time, it won't take...
June 27, 2012 at 4:46 am
Use indexes on those temp tables
Create procedure usp_del_event
@date_prm datetime = null, @daystokeep int = 15
as
begin
set nocount on
declare @date datetime
if @date_prm is null
begin
set @date = GETDATE()
end
else
begin
set @date = @date_prm
end
set @date=convert(datetime,CONVERT(char(11),@date))
set...
June 27, 2012 at 3:58 am
sturner (6/26/2012)
patrickmcginnis59 (6/26/2012)
Or would all companies simply agree not to pollute?Or do you simply have no opinion on this?
In your mind all companies *must* pollute something in order to make...
June 27, 2012 at 2:50 am
New2SQL-343122 (6/27/2012)
From the Below Script, how to find Actual row count at Step 4 & Step 5.
Basially, need to validated between Index Scan and Index Seek.
Using SQL Server 2000.
/* Script...
June 27, 2012 at 2:20 am
Thanks. Resolving the expensive iTVF results in this:
DATEADD(dd, -1, @year + '-' + MONTH(b.shpdate) + '-01')
Can you post the code for populating the variable @year?
June 27, 2012 at 1:58 am
fawadafr (6/26/2012)
Chris:In your examples you are using the five product names I had provided. What would be the best way if I am dealing with 5,000+ products?
The best way, as...
June 27, 2012 at 1:52 am
Posters are encouraged to place the DDL and DML directly into a post rather than in an attached file. This looks way too big for that. Does it run?
June 27, 2012 at 1:45 am
croberts 87372 (6/26/2012)
Would I attach the sample tables or just paste into window?
As per the article, CREATE TABLE statements and INSERT INTO statements. The article offers hints on the quickest,...
June 26, 2012 at 9:52 am
croberts 87372 (6/26/2012)
June 26, 2012 at 9:36 am
croberts 87372 (6/26/2012)
The first query returns 531 rows, second 633, third 247 and the fourth 1454.
I was...
June 26, 2012 at 8:59 am
river1 (6/26/2012)
WHAT ARE CTE's?
Can you confirm that your database is SQL Server 2008? If so, have a look in the help system (Books Online) for your client, which is...
June 26, 2012 at 8:13 am
Viewing 15 posts - 6,166 through 6,180 (of 10,144 total)