Viewing 15 posts - 13,066 through 13,080 (of 13,469 total)
ahh;
the subquery in the parenthesis needs an alias:
this fails: select name from (select name,id from sysobjects union select name,id from syscolumns)
this works:select name from (select name,id from sysobjects union...
May 15, 2006 at 12:43 pm
because of the sum function, you have to GROUP BY in the outer select: try this syntax:
select sum(col1),col2 from
(select col1,col2 from table1 union select col1,col2 from table2)
GROUP BY COL2
May 15, 2006 at 11:52 am
your syntax is incorrect:
AND (src_terrier.Areacode LIKE @chr_div+ '%')
so if @chr_div = 'EV', the addition of the % sign makes the wild card search anything that STARTS with 'EV', like 'evansville'...
May 13, 2006 at 6:44 am
if the IN statement was running accross a bigger list, like in(SELECT X FROM SOME TABLE),
I would expect it should be faster, because it would bailout as true on the...
May 12, 2006 at 11:10 am
i doubt it; most db servers are hidden behind the firewall at the hosting company, and only the web server can see the db server.
but that also means that you...
May 12, 2006 at 11:02 am
just missing the END command of the case statement: let me know how this seems to work now
(CASE WHEN @PropertyValue BETWEEN 1 AND 10
THEN @PropertyValue * 100000
WHEN @PropertyValue...
May 11, 2006 at 3:22 pm
there are quite a few on this site;
here is an example using this version of split:
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=225
declare @string varchar(200),
@LeadTimeFrame int
set @LeadTimeFrame=3
if @LeadTimeFrame = 1 set @string='24'
else if @LeadTimeFrame =...
May 11, 2006 at 1:00 pm
MAYBE another indicator is this: the only difference i see forwhen
IF (@LeadTimeFrame = 1)
is evaluated, the SQL is the same except for an additional check in the WHERE...
May 11, 2006 at 11:53 am
i can see a minor improvement; it looks like that huge if-then-else to get the @PriceRange could be replaced by a three line case statement:
SET @PriceRange = (CASE...
May 11, 2006 at 11:23 am
there is a plug in for source safe on this site which keeps all the DDL in source sage for you; you could use that application as far as source...
May 11, 2006 at 9:01 am
here's another way to get them by using a cursor to enumerate the procs, and simply using sp_helptext:
declare
@isql varchar(2000),
@provname varchar(64)
declare c1 cursor for select name from sysobjects where name not...
May 11, 2006 at 7:48 am
the GUI doesn't let you browse to, or paste a UNC path; so to use the GUI, you MUST map a drive; if the problem was a scheduled job, then you...
May 11, 2006 at 7:32 am
from http://www.windowsitpro.com/Article/ArticleID/14025/14025.html
|
May 11, 2006 at 6:54 am
there's a difference between a primary key, which technically can span multiple columns, and a column that has the identity function on it to auto generate the next value of...
May 11, 2006 at 6:36 am
i didn't think actual database backups were labeled with a version... i thought only the server had an @@version, and the data was always backed up to an 8.00 version,...
May 10, 2006 at 3:37 pm
Viewing 15 posts - 13,066 through 13,080 (of 13,469 total)