Forum Replies Created

Viewing 15 posts - 31 through 45 (of 98 total)

  • RE: format results of query

    There's probably a neater way, but this works:

    replace(replace(isnull([c1],'')+' '+ isnull([c2],'')+' '+ isnull([c3],'')+' '+ isnull([c4],'')+' '+ isnull([c5],''),'  ',' '),' ',',')

    The first replace gets rid of the two spaces where there is an empty string...

  • RE: Script to wait for file to start executing package. Event based Triggering.

    Place the following code in an activeX task as the first task in the package:

    Function Main()

    Set objFSO  = CreateObject("Scripting.FileSystemObject")

     If objFSO.FileExists("c:\done.txt") then

      Main = DTSTaskExecResult_Success

     Else

      Main = DTSTaskExecResult_Failure

     End If

    Set objFSO=nothing

    End Function

    Next...

  • RE: Finding long running SQL Agent Jobs

    Greg, I just had a similar need and ran across a post by Louis See1 that referenced sp_get_composite_job_info (which is called by sp_help_job).

    I modified this sp slightly by adding a...

  • RE: export to csv

    When you start the wizard it will ask you for a data source - after entering your server and DB, click next and it will ask you for the destination.  Near...

  • RE: DTS Define Columns

    When I first read your post I thought the same, that you should be able to modify columns in "define columns".  Apparently not. 

    I also considered suggesting inserting the data in a...

  • RE: DTS Define Columns

    Can you modify the query such as "select cast(numberfield as decimal(8,3))"?

  • RE: Track SQL Login Failure to Hostname

    mom - unfortunately, it doesn't appear in the event log - it has "User: N/A" for failures.  I even tried setting up security logging in event viewer on the server,...

  • RE: SQLServer 2000 and MSAccess 2000.

    Well said, Andy.  I should have clarified that my suggestion was generally just a bandaid.  It occurred to me to suggest it because I had just recently had a situation...

  • RE: Is it possible to automatically stop the sql service

    Another thought.  Have you considered using sp_dboption to set the db as single user or offline?

  • RE: Is it possible to automatically stop the sql service

    Hmm.  I think I gave you bad advice for your circumstance, but maybe like me you'll at least find that the batch file is handy for re-booting SQL.

    The problem is...

  • RE: Is it possible to automatically stop the sql service

    I have used the following in a batch file to reboot the SQL server:

    net stop sqlagent$servername

    net stop mssql$servername

    net start mssql$servername

    net start sqlagent$servername

    You could call the batch file as a step...

  • RE: SQLServer 2000 and MSAccess 2000.

    Jonathan,

    To reduce timeouts w/ADO, you may want to try adding something like this:

     oconn.CommandTimeout=120

    I think default is 60 sec.

  • RE: Import files created today

    Thanks, rschaeferhig.  That's much better.  I knew there had to be a better way, but went with what I could think of at the time.

    Here it is again with some...

  • RE: Import files created today

    Here's how in a two step DTS pkg:

    SQL Task:

    --Write contents of directory to file

    Declare @CMD varchar(100)

    set @cmd='Dir c:\ImportFolder > c:\ImportFolder\Dir.txt'

    exec master.dbo.xp_cmdshell @CMD

    ActiveX Task:

    April 23, 2004 at 7:23 pm

    #504113

  • RE: SP works in QA but not Data Transformation Query

    Glad to hear you solved it.  Although it's a moot point now, to answer your question:

    As I understood it, you were able to see the output you wanted in QA,...

Viewing 15 posts - 31 through 45 (of 98 total)