Viewing 15 posts - 541 through 555 (of 598 total)
You have to stop SQL Server in order for the segments used to be properly defragmented.
May 1, 2006 at 3:48 pm
insert into MyTable (MyColumn)
values('John''s') --note the extra quote
May 1, 2006 at 1:29 pm
Try this:
declare @sqlt varchar (50)
set @sqlt = 'USE ' + @dbname
exec (@sqlt)
May 1, 2006 at 12:45 pm
There is a way to get the SQL, but I can't remember it offhand and I don't have access to EM here. Look under the events that your trace is...
May 1, 2006 at 10:26 am
You should be using the Scope_Identity() function (assuming you're using SS 2000).
see: http://www.sqlservercentral.com/columnists/awarren/checkyoursqlserveridentity.asp
May 1, 2006 at 10:19 am
Three possibilities come to mind:
1) Insert trigger on the database to check for dupes and reject.
2) Make the transform task a VB script, run a sql query to check for...
April 27, 2006 at 2:17 pm
substring gets just the characters indicated by the parameters
so
substring('223456', 1, 2) will return '22'
If you want the left side, also look at
Left(string,length)
For the above example it would be:
Left('223456', 2)...
April 27, 2006 at 2:14 pm
One word of caution: this will get down to the millisecond. Look at Datepart to go about getting just the date...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_2mic.asp
or Day(), Month() and Year()
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_2c1f.asp
April 27, 2006 at 2:10 pm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_2c1f.asp
select * from table
where DOCDATE <= DATEADD ( yy , -1, getdate() )
and DOCDATE <= getdate()
April 27, 2006 at 2:00 pm
DECLARE
@var1 varchar(50),
@tablename varchar(25),
set @tablename = 'test'
If OBJECT_ID(@tablename) is NULL
BEGIN
SET @var1 = 'CREATE TABLE ' + @tablename
EXEC (@var1)
END
--then run your insert
April 27, 2006 at 11:58 am
I''ve not used bcp very much so can't answer your question intelligently, though I do believe it's possible.
However, you can indeed loop in DTS. See here:
http://www.sqldts.com/default.aspx?246
I've got several DTS...
April 27, 2006 at 11:29 am
Take a look at PATINDEX:
http://msdn2.microsoft.com/en-us/library/ms188395.aspx
and CHARINDEX:
http://msdn2.microsoft.com/en-us/library/ms188395.aspx
April 27, 2006 at 10:58 am
*nods*
call me a cynic, but after all the bumps and bruises and "premanent" job layoffs and companies folding and...
That's become exactly my attitude.
Though I would also add:
What experience will I...
April 27, 2006 at 10:48 am
Highlight the source, hold down the CTRL button, highlight the destination. Right-click and you should see the transform task.
(this is from memory, I don't have the GUI in front of...
April 27, 2006 at 10:42 am
What are the table structures?
Show us an expected result set.
April 27, 2006 at 10:18 am
Viewing 15 posts - 541 through 555 (of 598 total)