Viewing 15 posts - 13,051 through 13,065 (of 13,460 total)
The name that goes in your connection string is SOMEMACHINNAME\INSTANCENAME;
I would ask this first: why must you create an additional instance, instead of using the default instance on the...
Lowell
May 18, 2006 at 11:25 am
I think we need to see the table definitions; it looks to me like you have separate tables for ID, name and address;
at the very least the ID and NAME...
Lowell
May 18, 2006 at 11:12 am
very simple:
update some_table set somecolumn=replace(somecolumn,'.txt','.csv')
Lowell
May 17, 2006 at 9:07 pm
you want to use the datediff function for this:
SELECT DATEDIFF(day, somedatecolumn, getdate()) AS no_of_days from sometable
SELECT * from sometable where DATEDIFF(day, somedatecolumn, getdate()) =3 --exactly 3 days old
SELECT * from...
Lowell
May 17, 2006 at 9:05 pm
monster searches like this are bad, but sometimes you gotta do it:
I made an ugly server intensive cursor for a similar question a while back;noone came up with a...
Lowell
May 17, 2006 at 11:38 am
you would not need to increase the size of the isql variable; that is just containing the command "sp_helptext your_long_procedure_name" ; i think the max size it could ever be...
Lowell
May 16, 2006 at 7:35 am
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...
Lowell
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
Lowell
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'...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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 =...
Lowell
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...
Lowell
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...
Lowell
May 11, 2006 at 11:23 am
Viewing 15 posts - 13,051 through 13,065 (of 13,460 total)