Forum Replies Created

Viewing 15 posts - 3,406 through 3,420 (of 3,543 total)

  • RE: How to append while keeping original records

    Curious. I don't have problems with code like this. You can have any combination of table names and field names in the join (as long they are of the same...

  • RE: Copying a database

    I normally do this before I create/restore the DB.

    I use

    select 'sp_addlogin '''+name+''',@sid=',sid from syslogins where name = 'loginname'

    to get the sid from the host machine.

    and then create the login on...

  • RE: Disk Size

    Try

    declare @o int, @d int, @t varchar(255)

    exec sp_oacreate 'scripting.filesystemobject', @o out

    exec sp_OAmethod @o, 'GetDrive', @d OUT, 'C:'

    exec sp_OAGetProperty @d, 'TotalSize', @t OUT

    select @t

    exec sp_oadestroy @o

  • RE: How to append while keeping original records

    For this type of operation I use

    INSERT INTO TableA

    SELECT b.*

    FROM TableB b

    LEFT OUTER JOIN TableA a ON a.key = b.key

    WHERE a.key IS NULL

    But for 7M rows it could take a...

  • RE: Copying a database

    I use both 1) and 3). MarkusB is right it depends on size. If the db is minimal and no FK's then I use DTS otherwise it depends on whether...

  • RE: Exporting to a text file using xp_cmdshell

    It is the nature of osql as with isql and QA. The output columns are fixed to the column size, i.e. if you use convert(varchar(20),filetext) then the column width would...

  • RE: Dynamic WHERE clause problems

    I agree with all of jpipes comments.

    Your last post will not work as you have made the table optional on an IF statement. Put the create outside of the IF.

    Another...

  • RE: Communication Problem between SQL and IIS

    In situations like this I put diagnostic code in my ASP pages on IIS to tell me how long each piece of code takes (db access,html writes etc). This normally...

  • RE: Linked Server Issue

    You have to set ANSI_NULLS and ANSI_WARNINGS for connections not once you've connected. Try right click on server name in EM and select properties. Click on Connections tab and set...

  • RE: impossible to search "= N"

    Confused here. What is your question?

    Are you trying to find question mar character as in = '?'

    or are you trying to find equals sign as in = '='

  • RE: trouble writing select with an OPENQUERY

    Only by building sql string for the whole statement and using sp_executesql

  • RE: CASE stmt needed?

    Very quick answer off top of my head and not tried or tested, but I would use your first query and add the following

    INNER JOIN tblMMAdmins XX ON XX.SystemUserName =...

  • RE: ODBC does not add entry

    What is the error message?

    Are you attempting Trusted connection or sql login? What library are you using pipes or TCP/IP? Is the server behind a firewall? Can you ping the...

  • RE: New Hardware HELL

    When I did a 28GB database I connected the two servers's network cards using a single network cable and did the copy that way. Still took a long time but...

  • RE: Copy table with image columns

    Do not know much about image columns (do not use them myself) but I believe the only way to read and write image columns is to use READTEXT and WRITETEXT.

    In...

Viewing 15 posts - 3,406 through 3,420 (of 3,543 total)