Viewing 15 posts - 13,696 through 13,710 (of 14,953 total)
All five of those are covered by the conditions in Mark's query. I've used that method before, and it works.
May 13, 2008 at 2:47 pm
Another thing you can do is create a startup proc, and use the WaitFor command and a While loop to make it execute something over and over again.
While 1...
May 13, 2008 at 2:45 pm
I've actually seen the graphical query designer break a working query by doing this kind of auto"fixing".
The query included a self-join on a table, with 7 iterations of the self-join.
When...
May 13, 2008 at 2:33 pm
Matt Miller (5/13/2008)
GSquared (5/12/2008)
declare @FirstDate datetime, @LastDate datetime
select @FirstDate = CONVERT(VARCHAR(10),DATEADD(m,-7,GETDATE()),101),
@LastDate = CONVERT(VARCHAR(10), GETDATE(), 101)
SELECT
t1.Date_Taken, t1.Time,
t1.Main_ID, t1.WATER_ULEVEL
FROM dbo.tblSEL t1 INNER JOIN dbo.tblLocation t2
ON t1.Main_ID=t2.Main_ID
WHERE t2.Location='PRK'
AND t1.Date_Taken>=@FirstDate AND
t1.Date_Taken<=@LastDate
ORDER BY t1.Date_Taken,...
May 13, 2008 at 2:23 pm
You're welcome. (I still recommend taking a look at index use for this, if you haven't already.)
May 13, 2008 at 2:21 pm
Best set it up on the mirror. If the whole idea is to handle problems when the principle goes down, you don't want the principle going down to take...
May 13, 2008 at 2:19 pm
Matt Miller (5/13/2008)
GSquared (5/13/2008)
Important:
In a future version of SQL Server...
May 13, 2008 at 2:17 pm
xp_cmdshell on some servers is set up to run under a different account than the SQL service. Have you checked that?
May 13, 2008 at 1:56 pm
Yes. A witness server is recommended, but not required.
May 13, 2008 at 1:54 pm
I just checked my databases and servers, and ANSI padding is False on all of them, but per BOL:
Important:
In a future version of SQL Server ANSI_PADDING will always...
May 13, 2008 at 1:51 pm
Matt:
Your test doesn't quite do it:
set ansi_padding on
go
create table #T(k varchar(10) primary key clustered)
insert #T
select 'a' union all
select 'a ' union all
select 'a ' union all
select 'a ...
May 13, 2008 at 1:45 pm
Per BOL, the column behavior is set when the column is created. The setting in place when you insert/select/update doesn't affect it. That might be affecting your tests,...
May 13, 2008 at 1:41 pm
The graphical query designer in QA/Enterprise Manager has its own layout. A really, really annoying one that nobody has ever yet managed to find readable. Code you put...
May 13, 2008 at 1:33 pm
Mark's solution is the one I would use. Should do exactly what you need.
May 13, 2008 at 1:28 pm
If you have a primary key on the table, I'd recommend creating a temporary table and doing something like this:
create table #T (
ID int)
insert into #t (ID)
select ID
from MyTable
where Col1...
May 13, 2008 at 1:25 pm
Viewing 15 posts - 13,696 through 13,710 (of 14,953 total)