Viewing 15 posts - 9,346 through 9,360 (of 13,469 total)
i have a different conversion in my notes: what format are your dates actually in?
DECLARE @jdate int
SET @jdate = 109252
--in AS400/DB2 date is 01/01/1900 + 109 years + 252 days
select...
May 27, 2010 at 11:29 am
Dan i poked around the net trying to find out the ramifications of why TRUSTWORTHY on master database might be a bad idea, and it just comes right back...
May 27, 2010 at 11:28 am
run sp_who or sp_who2;
every spid greater than 50 is a user connection.
May 27, 2010 at 10:45 am
what value did you put in for the path to the file, N'\\server\folder\Trace',
if it is not a local directory, but a UNC path, you might have problems depending on...
May 27, 2010 at 10:41 am
ok tomas, a couple of things;
scalar functions can slow things down, as they introduce a hidden cursor/REBAR...million rows=million function calls.
I've changed your function froma scalar(called once per row) to a...
May 27, 2010 at 10:01 am
Suresh excellent job on posting a complete example, thanks!
in this case, you want to compare the actual execution plans to see if it makes a difference.
in your example, they produce...
May 27, 2010 at 9:25 am
another way without the UNION:
select
CASE
WHEN manager='Y'
THEN 1
ELSE 2
END
as myorderBy,name,salary
from sometable
ORDER...
May 27, 2010 at 9:14 am
oh yeah we are on the same page. there's another thread on CLR that got me all excited becasue i got it to work to read a web page...for...
May 27, 2010 at 9:06 am
select 1 as myorderBy,name,salary from sometable where manager='Y'
UNION ALL
select 2 as myorderBy,name,salary from sometable where manager='N'
ORDER BY myorderBy,salary
May 27, 2010 at 9:00 am
it's all good; i just moved the WEHRE statment into a CASE so i could print a status:
SIGNING_DATEENTRY_DATETimeStatus
2010-05-01 00:00:00.0002010-05-04 00:00:00.000On Time Signing
2010-05-01 00:00:00.0002010-05-07 00:00:00.000On Time Signing
2010-05-01 00:00:00.0002010-05-10 00:00:00.000Exception Not within...
May 27, 2010 at 8:45 am
you can't without breaking referential integrity.
Otherwise you'd be dropping the foreign key constraint, or disabling the foreign key constraint so it would be invalid after you deleted the parent record.
maybe...
May 27, 2010 at 8:32 am
still the same idea, i think; for example the week of today is 22:
select datepart(week,getdate())
so biz day wise, m-f of this week is 22, m-f of last week is 21;
so...
May 27, 2010 at 8:29 am
pinky i guess the question is what do you want to do if the date is invalid?
return NULL?
SELECT
juliandate,
CASE
WHEN juliandate LIKE...
May 27, 2010 at 8:24 am
Gopi Muluka (5/27/2010)
Did you tried this?
Exec xp_cmdshell '"C:\Program Files\Internet Explorer\iexplore.exe"'
the problem with that is it will spawn an iexplorer instance, but not clean up after itself...after one hour, you'd have...
May 27, 2010 at 8:18 am
jared here's an example i think can show you the idea;
you want to use BETWEEN two dates, and use DATEADD to determin the range based on another date:
--results
SIGNING_DATEENTRY_DATE
2010-05-01 00:00:00.0002010-05-04 00:00:00.000
2010-05-01...
May 27, 2010 at 8:16 am
Viewing 15 posts - 9,346 through 9,360 (of 13,469 total)