Viewing 15 posts - 9,226 through 9,240 (of 13,460 total)
in TSQL, you'll want to use the DATADD function. when you add a negative number, it subtracts it from the date: you can use it to add or subtract any...
Lowell
June 17, 2010 at 6:17 am
it's been removed as a separate executable, and is all the pieces are moved around a bit, but are accessible in part of SSMS:
http://www.mssqltips.com/tip.asp?tip=1673
Lowell
June 16, 2010 at 3:50 pm
ok try this as a proof of concept: in your Sandbox, do a Select * into newtable from sometable, and then run this query:
i'm using FORXML to concat all the...
Lowell
June 16, 2010 at 2:53 pm
well syntactically, i think this is correct, but it's untested:
SELECT * FROM OPENQUERY( [linked server],'SET FMTONLY OFF; EXEC (''declare @body1 varchar(4000)
set @body1 = ''New Website Product as of '' +...
Lowell
June 16, 2010 at 12:56 pm
it might also be parameter sniffing; if you have parameters with default values on them, a query plan is probably built assuming the default value (ie myproc(@The date datetime =...
Lowell
June 16, 2010 at 12:51 pm
Set @Job = '<HTML>The following opportunity has been changed to ' + @Stage + ': '
+ '<br />'
+'Subject: '+ @Subject
+ '<br />'
+'Project Number: '+ @ProjectNumber
+ '<br...
Lowell
June 16, 2010 at 12:44 pm
DBCC SHRINKFILE is granted to the roles sysadmin and db_owner
to remove permissions from a user, you'd most likely take away the db_owner role from them.
there is no other way...
Lowell
June 16, 2010 at 11:44 am
it might be more clear if it looked like this...the zero is the first date in SQL:
select DATEADD(wk, DATEDIFF(wk,'19000101 00:00:00.000',getdate()), '19000101 00:00:00.000')
--is the same as
select DATEADD(wk, DATEDIFF(wk,0,getdate()), '19000101 00:00:00.000')
--is the...
Lowell
June 16, 2010 at 8:24 am
Dan this is one of the coolest things to use once you get your head wrapped around it.
if you select DATEDIFF(wk,0,getdate())
this will return week '5763' , which is the #...
Lowell
June 16, 2010 at 8:15 am
you can use the DATEADD and DATEDIFF function to determine the monday of the current week.
--Monday of the Current Week
select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
so you want to avoid converting a datetime...
Lowell
June 16, 2010 at 7:45 am
Steve i made an ITVF based on your example, but i added a bit more to it;
i was thinking if i allow periods in the data, i need to check...
Lowell
June 16, 2010 at 7:35 am
you probably heard wrong, i think.
a SSRSreport is saved to a .rdl file(RDL=report definition language?), which is xml for the report's structure,design,location of all it's objects, etc.
that is what your...
Lowell
June 16, 2010 at 5:24 am
calvo's example is exactly correct, i think; the EXEC() statement is stand alone, and does not affect the session/window it is a part of.
so to do what you want, you...
Lowell
June 15, 2010 at 11:01 am
this will give you the results featuring row_number(); use the inner portion of the query to see the raw results, the outer query returns just the duplicate items:
productname,colorcode,categoryname,brandname,colorname
SELECT * FROM...
Lowell
June 15, 2010 at 9:22 am
will you be providing any details? For any meaningful answer we need the CREATE TABLE definitions of both tables, and which "value" (column) triggers some change to be propigated to...
Lowell
June 15, 2010 at 8:09 am
Viewing 15 posts - 9,226 through 9,240 (of 13,460 total)