Viewing 15 posts - 3,721 through 3,735 (of 5,394 total)
GilaMonster (10/27/2010)
Anyone got an idea how to track table changes. Server side traces, triggers, change tracking/change data capture not acceptable options.http://www.sqlservercentral.com/Forums/Topic1011428-391-1.aspx
DBCC TimeWarp? You can know today the changes that will...
October 27, 2010 at 8:20 am
;WITH groupedOrders AS (
SELECT Err_Stmt, Error_At_line, COUNT(*) AS [count(*)]
FROM orders1111
GROUP BY Err_Stmt, Error_At_line
)
SELECT *, ID_Number = STUFF((
SELECT ',' + ID_Number
FROM orders1111
WHERE Err_Stmt = G.Err_Stmt
AND Error_At_line = G.Error_At_line
FOR XML PATH('')
),1,1,SPACE(0))
FROM...
October 27, 2010 at 8:09 am
I'm afraid there's no way.
What you see is the output of a RAISERROR command. I'm not aware of any way to get rid of it.
October 27, 2010 at 6:48 am
Here's your code formatted properly.
CREATE TABLE #Select (SSN VARCHAR(10))
CREATE TABLE #SubSelect (XXX VARCHAR(10))
INSERT INTO #Select (SSN)
VALUES ('123456780')
INSERT INTO #Select (SSN)
VALUES ('123456788')
INSERT INTO #Select...
October 27, 2010 at 4:08 am
You specified MAXERRORS = 0, so you don't allow errors during import.
BOL states:
MAXERRORS = max_errors
Specifies the maximum number of syntax errors allowed in the data before the bulk-import operation is...
October 27, 2010 at 4:03 am
I suppose you want this because you're changing configuration from an application and it raises an error when the message is encoutered, right?
Then, the answer is simple: don't do that.
Changing...
October 27, 2010 at 3:57 am
I have seen something similar with our Oracle server, running AIX 6.1 on a box with 8 Power7 CPUs.
The first 4 CPUs are almost always fully loaded, while the remaining...
October 27, 2010 at 1:25 am
With a few changes you can have up to 12 years.
With a real tally table[/url] you could have all the years you want.
-- Set year in a variable
DECLARE @StartYear int
DECLARE...
October 26, 2010 at 2:32 pm
This should fo the trick for you:
-- Set year in a variable
DECLARE @Year int
SET @Year = 2010
;WITH Months AS (
-- Create a month numbers CTE
SELECT 1 AS MonthNumber
UNION ALL SELECT...
October 26, 2010 at 11:20 am
You can use sp_rename:
EXEC sp_rename 'schema.table.name', 'newname', 'COLUMN'
As for adding new columns, you can use ALTER TABLE:
ALTER TABLE tablename ADD [column definition]
October 26, 2010 at 6:47 am
Create a job with appropriate name (e.g. 'DO SOME STUFF').
Add new operating system step and set the command as follows:
DTSRUN /E /S<serverName> /N<DTSPackageName>
Save the job.
Open a query window and issue:
EXEC...
October 25, 2010 at 9:00 am
You're welcome.
Glad I could help
October 25, 2010 at 8:55 am
To run a DTS packae directly, you would have to use xp_cmdshell, which is not recommeded.
I would instead create a SQL Agent job that runs the package and then start...
October 25, 2010 at 6:13 am
This should do the trick:
IF OBJECT_ID('Tempdb..#Procedures') IS NOT NULL
DROP TABLE #Procedures
CREATE TABLE #Procedures (name varchar(128))
DECLARE @ProcedureName varchar(20)
SET @ProcedureName = 'sp_start_job'
DECLARE @sql varchar(4000)
SET @sql = 'USE [?]; INSERT INTO #Procedures SELECT...
October 25, 2010 at 4:34 am
Viewing 15 posts - 3,721 through 3,735 (of 5,394 total)