Forum Replies Created

Viewing 15 posts - 14,491 through 14,505 (of 15,381 total)

  • RE: Want to Remove or Replace the Carriage Return

    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))

  • RE: EXEC()

    sturner (6/23/2011)


    10,000 rows... No way I'd be doing separate inserts via ODBC. I would explore alternate methods.

    Push the rows over to thew remote server and then run a...

  • RE: EXEC()

    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...

  • RE: EXEC()

    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''...

  • RE: EXEC()

    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...

  • RE: EXEC()

    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)...

  • RE: Join Question

    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...

  • RE: convert varchar into certain datetime format

    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...

  • RE: Using While loop logic...looking for something better

    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...

  • RE: Join Question

    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...

  • RE: convert varchar into certain datetime format

    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...

  • RE: convert varchar into certain datetime format

    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...

  • RE: Parser for Multi-Valued Parameters

    For even better performance read Jeff Moden's Tally Oh![/url] article.

  • RE: What "read only activity" can exist on databases

    rbecl (6/22/2011)


    Hi, What "read only activity" can exist on databases?

    I am new to SQL and would like to find this out. I regard read-only activity to consist of:

    views, stored...

  • RE: Trigger Query

    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...

Viewing 15 posts - 14,491 through 14,505 (of 15,381 total)