Forum Replies Created

Viewing 15 posts - 46 through 60 (of 595 total)

  • RE: Run-time error 80040e07

    One more thing - do your insert statements contain date constants as shown in your example? You don't need to convert the date strings:

    INSERT INTO Vacaciones_Hist

    VALUES...

  • RE: DTSRun error

    Did you add 'Corporate\HelenS' to the sysadmin role because that login id is used to run SQL Agent?  To schedule the job, you'll need to make sure that the account...

  • RE: DTSRun error

    Let's verify the environment. You've got SQL Server running on a server, and you've created a DTS package the runs successfully from Enterprise MAnager on your workstation.  Then, you scheduled...

  • RE: Executing a batch file from T-SQL

    Assume you have a batch file called TEST.CMD located in C:\ on your server that contains this code:

    @echo off

    echo This is TEST.CMD

    pause

    To run this from Query Analyzer using integrated security,...

  • RE: DTSRun error

    Expanding on what Terry wrote, if you run the DTS package from a workstation, then that's where the drive mappings the package refers to come from. If you then schedule...

  • RE: Sql server working in Mixed mode,but ... Not associated with a trusted SQL Server connection.

    Check the PHP.INI file for this configuration item:

    mssql.secure_connection = "1"

    If this is "1", then Integrated Security will be used.

    If it is "0" (the default value), then your SQL login and...

  • RE: Ideas for SQLServerCentral.com

    "we have a usability expert and a designer working on the look and feel to make things more, ah, well....beautiful?"

    It's really quite depressing when a functional site like sqlservercentral.com, which...

  • RE: Profiler usage question

    If you want to try the trigger method, look over the following example.

    The Log table stores the information you wish to log.

    The LogTest table was created just to test the use of the...

  • RE: Copy a table?

    Be aware that the SELECT * INTO method doesn't copy indexes or triggers. If you need an EXACT copy, including those objects, the you can fully script the...

  • RE: SQL SERVER AND EVENT VIEWER ERROR

    Has the password been changed on the domain account? I would suggest creating a domain login id that id dedicated to SQL Server (not used for anything else). You can...

  • RE: Figuring Out Objects Not Owned by DBO...

    I tweaked your cursor method a bit:

    --LOOP THROUGH ALL DATABASES ON SERVER AND DISPLAY ALL OBJECTS/OWNERS--

    DECLARE @name sysname

    , @sql varchar(8000)

    DECLARE dbname CURSOR FOR

    ...

  • RE: unique column in 2 tables - interesting problem

    Consider Identity columns with odd and even seed values, both incremented by 2:

    CREATE TABLE A (id int IDENTITY(1,2), ...) -- 1,3,5...

    CREATE TABLE B (id int IDENTITY(2,2), ...) --...

  • RE: calculating date & time difference from 4 text fields

    Here's Ken's version, which works quite well, using Stuff() instead of Left() and Right():

    SELECT D.MiDiff/1440 AS Days

    ,D.MiDiff%1440/60 AS Hours

    ...

  • RE: Datetime field

    or,

    SELECT Stuff(Right(CONVERT(varchar(30), GetDate(), 9), 14), 9, 4, ' ')

  • RE: Transaction inside a cursor?

    Chris,

    To avoid the primary key violation error, you'll have to either eliminate the duplicates before trying to INSERT the data, or by checking for duplicates as part of the...

Viewing 15 posts - 46 through 60 (of 595 total)