Viewing 15 posts - 391 through 405 (of 413 total)
Sorry - it's because my db is on 65 compatibility level (enterprise manager, right-click on db, properties, options tab).
July 14, 2005 at 8:13 am
Try this:
if '' = ' '
select 'equal'
else
select 'not equal'
-- returns 'equal'
select replace('a"a', '"', '')
-- returns 'a a'
String manipulations in T-SQL are tricky (not to say strange) - at least on...
July 14, 2005 at 7:54 am
That replaces " by a single space, unfortunately. Is there an easy way to have all quotes in a string replaced by what is known as "the empty string" in a traditional...
July 14, 2005 at 7:34 am
Well, you actually gave me the idea yourself, in the thread Please give me a replacement for a Cursor,...
July 14, 2005 at 7:24 am
The original problem didn't say what to do if there is no N'th highest salary. My solution doesn't output a deptno in this case, so I guess that's OK
July 14, 2005 at 7:21 am
Maybe this one is easier to read (I haven't tested performance):
create table tmb1 (deptno numeric, sal numeric)
insert into tmb1 (deptno, sal ) values (1, 1000)
insert into tmb1 (deptno, sal )...
July 14, 2005 at 6:14 am
I think I have an even faster solution than you, Remi:
Declare @Sample as int
Declare @OffSet as int
SET @Sample = 3
SET @OffSet = 1
create table #a(id int identity(1,1), name varchar(100))
insert into...
July 14, 2005 at 1:30 am
Try something like
select substring(staffname, 1, charindex(' ', staffname))
This requires exactly one firstname and one surname - as in your sample data. If this is not enough, please describe what the...
July 14, 2005 at 12:59 am
Same problem with dynamic execution - and there is no firewall between the servers, I've been told (I have tested that port 135 is open).
July 12, 2005 at 2:28 am
Two simoultaneous db connections should have different @@SPIDs, I don't think there is a problem here. On the other hand, there may have been an earlier (now terminated) db connection...
July 11, 2005 at 1:17 pm
I think so - I use this trick with @@SPID once in a while. One problem with temp tables is that you can't index them. In your case, put a...
July 11, 2005 at 7:36 am
Just to get a hint of where the processing time is spent:
What happens to processing time if you use a permanent table results (same definition), instead of a temp table?
What...
July 11, 2005 at 6:22 am
Scott, Thanks for an excellent suggestion. Unfortunately both servers are Win 2000. But I have a feeling that we are getting closer...
Sushila, Openquery works... Unfortunately I cannot use it, since...
July 11, 2005 at 6:11 am
Viewing 15 posts - 391 through 405 (of 413 total)