Viewing 15 posts - 2,791 through 2,805 (of 7,191 total)
If the source and destination are in the same database, or even a different database on the same instance, I'd be surprised if SSIS were the better option. But...
February 15, 2016 at 5:47 am
It's better use proper date arithmetic than rely on character conversions that are less efficient and vulnerable to regional settings. Try something like this:
SET @START_DATE = DATEADD(MONTH,@START_MONTH-1,DATEADD(YEAR,@START_YEAR-1900,'19000101')
John
February 15, 2016 at 4:00 am
Does the query work if you run it in Management Studio?
If this is something you're going to do frequently (or even if it isn't), you might consider creating a permanent...
February 15, 2016 at 3:47 am
You haven't posted the stored procedure definition, but I'm guessing it connects to a remote server, maybe using a linked server. Perhaps 2:00 to 2:30 am is when index...
February 15, 2016 at 2:23 am
Yes, I see what you mean, although I interpreted that requirement as referring to ALTER DATABASE...REMOVE FILE and ALTER DATABASE..MODIFY FILE statements.
John
February 11, 2016 at 8:51 am
SQLSlammer (2/11/2016)
They won't be able to delete any mdf or ldf files if sql server us running anyway, so that one is covered off.
Are you sure about that? If...
February 11, 2016 at 8:34 am
OK, so you're using a trusted connection. That means that whatever security context the package runs under needs access to the MYDB database. Usually, if you run the...
February 10, 2016 at 9:23 am
Scott, please will you post the connection string from the MYSERVER.MYDB connection manager?
Thanks
John
February 10, 2016 at 9:07 am
You need to set up some sort of auditing that captures every use of those objects. You can't do it retrospectively. Beware, you may find yourself capturing an...
February 10, 2016 at 4:16 am
TJT (2/5/2016)
what am I doing wrong?
Nothing, as far as I can tell, except spelling DECLARE wrongly. Now, what exactly is it that doesn't work as you expect? Don't...
February 5, 2016 at 8:13 am
(1) Take the database offline
(2) Copy the files to new names and/or locations
(3) Bring the database back online
(4) Create a new database by attaching the new files
John
February 5, 2016 at 7:03 am
Oh yes, of course. I got as far as the CTE and then forgot to put the MAX in. Thanks for spotting, Phil.
John
February 4, 2016 at 8:12 am
WITH Combined AS (
SELECT Timestampcol, <other columns>, 'Table1' AS TableName
FROM Table1
UNION ALL
SELECT Timestampcol, <other columns>, 'Table2'
FROM Table2
)
SELECT Timestampcol, <other columns>, TableName
FROM Combined
John
February 4, 2016 at 7:53 am
Yes, you have a Boolean expression there, which T-SQL doesn't evaluate. You need to use a CASE expression to specify what values you want for active and inactive -...
February 4, 2016 at 4:20 am
Brandie
An underscore is a wildcard for a single character - if you want to find literal underscores then you need to escape them in your search pattern. Having said...
February 3, 2016 at 5:13 am
Viewing 15 posts - 2,791 through 2,805 (of 7,191 total)