Viewing 15 posts - 421 through 435 (of 533 total)
Also, a lot of times when people do things like this they would be much better off not updating tables ... it is very possible it would be much better...
May 13, 2010 at 10:44 am
You've provided basically zero information so all you're going to get are general guesses.
My best guess is that the fields (in this example x and y) you are using on...
May 13, 2010 at 10:28 am
konstanddp (5/13/2010)
hope this discussion is still active.
I am sitting with exactly the scenario where I would have liked to be able to call a subroutine within a sql script.
I...
May 13, 2010 at 10:16 am
I asked 3 questions and you didn't answer any of them so I can't really help you.
May 12, 2010 at 10:50 am
It sounds like you've never used SQL Server Profiler. What you should first do is open Books Online and then search for 'SQL Server Profiler'. There is a...
May 11, 2010 at 10:41 am
What error do you have?
Do you allow anonymous access on IIS? How do you have the permissions set up on the report you want your external person to see?
May 11, 2010 at 10:36 am
declare @t_table1 table
(Col1int)
insert into @t_table1
select 11 union
select 22 union
select 33 union
select 44
declare @t_table2 table
(Col1int,
Col2varchar(10))
insert into @t_table2
select 11, 'ab' union
select 11, 'ac' union
select 11, 'ad' union
select 22, 'jk' union
select 22, 'jy'...
May 10, 2010 at 1:32 pm
Of course ^
ISNULL is better than doing a CASE.
May 7, 2010 at 12:38 pm
Might be a slightly cleaner way, but this works:
select case charindex('.', Column1)
when 0 then Column1
else stuff(Column1, charindex('.', Column1), charindex('\', Column1, 3) - charindex('.', Column1) - 1, '') end
from @t_temp;
May 7, 2010 at 12:33 pm
shane94 (5/7/2010)
From what I've read giving SQL as little as possible to "figure out" is always the preferred approach...
Throw away whatever you read that said that. That is incorrect...
May 7, 2010 at 12:26 pm
GregoryF (5/7/2010)
bteraberry (5/7/2010)
Mine was more efficient. Plus STUFF is simply cool and underused.
Props on the STUFF, in 12 years of doing SQL, that's the first time I have ever...
May 7, 2010 at 12:19 pm
Mine was more efficient. Plus STUFF is simply cool and underused.
May 7, 2010 at 12:15 pm
shane94 (5/7/2010)
bteraberry (5/7/2010)
and lets say for SOME reason one of the middle blocks gets deleted that means every...
May 7, 2010 at 12:11 pm
It's just bad design. (I would suggest doing some reading on normalization.) Basically, unless there is a compelling performance reason to do so, never store data in the...
May 7, 2010 at 12:06 pm
Actually, I should do it like this so it may be more clear:
declare @vc_string varchar(20);
select @vc_string = '\\xyz.se.df.a.b\fgd\';
select stuff(@vc_string, charindex('.', @vc_string), charindex('\', @vc_string, 3) - charindex('.', @vc_string) - 1, '');
May 7, 2010 at 11:48 am
Viewing 15 posts - 421 through 435 (of 533 total)