Viewing 15 posts - 14,491 through 14,505 (of 15,381 total)
Sure you can replace it with null or use the nullif function.
declare @Return varchar(5)
set @Return = CHAR(13)
select REPLACE(@return, char(13), null), nullif(@Return, char(13))
June 24, 2011 at 7:22 am
sturner (6/23/2011)
Push the rows over to thew remote server and then run a...
June 23, 2011 at 9:35 am
EEEWWWWW!!!!! I missed the 1 minute part and only 32 seconds. As i was writing this you posted that neither 3 or 4 worked on a single line. Not sure...
June 23, 2011 at 9:07 am
sturner (6/23/2011)
You can't use CR/LF in the command line... just semi colons.
BAH! Thanks was wondering why that was an issue.
Try like this:
--method 3
EXEC('INSERT INTO VISITOR_POSITIONS (ID, VIPO_DESC) SELECT 1001, ''Test1''...
June 23, 2011 at 8:53 am
Not sure why method 3 did not work. Looks correct to me. Method 4 will only work if the remote server is sql 2008. From the two you have working...
June 23, 2011 at 8:47 am
Since it sounds like you have a lot of data to insert you might find it faster to do you insert as a single command like this.
EXEC('INSERT INTO Table (Name)...
June 23, 2011 at 7:42 am
And intellisense can not make up for naming issues like the OP is facing. That is a mistake that anyone with any real sense would make because the join has...
June 23, 2011 at 7:33 am
Be careful with the IsDate function. It will return values that can be parsed as a date that are probably not actually realistic for your application. For example:
select IsDate(5421)
There are...
June 23, 2011 at 7:30 am
Seems like you could create a table with a single nvarchar column large enough to hold the largest record for the import portion. Then do 9 - 10 insert statements...
June 22, 2011 at 1:39 pm
bubs (6/22/2011)
Found my mistake.It should be E.ID = T.EmployeeID
NOT
E.EmployeeId = T.EmployeeID
Thanks.
Perfect example of why column names should remain the same across tables. Otherwise you can end up with a column...
June 22, 2011 at 12:55 pm
Sorry if my first post sounded nasty. Apparently I was channeling a certain individual who posts here frequently.
If you are going to be converting this into a datetime field...
June 22, 2011 at 8:11 am
Wow this a classic example of why using the datetime datatype is so important. You have created a bowl of pasta and you are struggling with how to stir the...
June 22, 2011 at 7:52 am
June 22, 2011 at 7:44 am
rbecl (6/22/2011)
I am new to SQL and would like to find this out. I regard read-only activity to consist of:
views, stored...
June 22, 2011 at 7:38 am
Well all too often people will write an insert trigger to create an audit trail or something along those lines. Let's assume there are 3 records being inserted at once...
June 21, 2011 at 2:10 pm
Viewing 15 posts - 14,491 through 14,505 (of 15,381 total)