Forum Replies Created

Viewing 14 posts - 301 through 314 (of 314 total)

  • RE: SQL Agent puzzle

    1.Try running "Select @@ServerName" and see what it returns if it returns the FormerMachineName then SQL Server has not been remaned so need to rename the SQL Server.

    sp_dropserver 'old server...

  • RE: Delete Database confirmation in Script

    Drop database doesnot have any paramter(s) other than the database Name. So if you want a prompt then it has to be added to batch file or script before calling...

  • RE: Table content to spreadsheet

     

    1.Create ActiveX Cript to delete Destination Excel

    '**********************************************************************

    '  Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

     Dim objFSO, objFile,strFileName

     strFileName ="\\ServerName\folderName\ExcelNameReport.xls"

     Set objFSO = CreateObject("Scripting.FileSystemObject")

     If objFSO.FileExists(strFileName) Then

      set objFile = objFSO.GetFile(strFileName)

      objFile.Delete(True)

     End If

     Main = DTSTaskExecResult_Success

    End Function

    2.Create SQL Connection...

  • RE: Can I modify a DTS connection dynamically from MS Access

    There is something called "Dynamic Properties Task" in DTS that could be used to dynamically change the connection property. It can use an ini fil or run a query..

    Second option...

  • RE: Design question

    Here is the first stab.

    1.FacilityMaster Object

    FacilityID,Name,Address,City,State,County,District...

    2.GroupMaster Object

    GroupMasterID,GroupName,State,County,District...

    3.Facility_X_Group

    FacilityID,GroupMasterID,...

    Hope this helps.

    Thanks

    Sreejith

  • RE: MS Excel freezes when opening during DTS test

    This has happened to me as well. Whenever this happens I look at Task manager and find that Excel.exe is still running even if I had closed it. So I...

  • RE: images

    I don't think BLOB(IMAGE/TEXT) can be insterted using normal instert statement. The way I have done in past is using VB. You have to use "GetChunk" and "AppendChunk" method.

    Hope this...

  • RE: CANNOT ADD DATA

    Does the table have a trigger that is failing on insert? Cos that is one kind of error that will be tuff to troubleshoot.

  • RE: Moving Jobs

    MSDB restore can be dangerous as it will overwrite the jobs on destination server.Use Enterprise manager right click on jobs and Choose "Generate SQL Script".

     

  • RE: Start date/time of currently running jobs

    use sysjobs and sysjobschedules (join on job_id) will give you what you see in Management->SQL Server Agent->Jobs

  • RE: Pivot/Rotate Table

    I need a clarification on this. How do u know break is the first one and task1 follows break? is there time assiciated with date that tells you that comes...

  • RE: Date Function 4-4-5 Week Quarter

    For Fiscal Calender calculation the way I had handled was building a calender table and autopopulate it once a year (as soon as Fiscal Calender is created by finance). The...

  • RE: Droping 100 stored procedures without having to delete one by one.

    DECLARE @sp_name varchar(100),

     @s_Cmd nvarchar(255)

    DECLARE drop_sp CURSOR FOR

    SELECT sp.NAME FROM sys.procedures sp,sys.Tables tb

     WHERE LEFT(sp.NAME,CHARINDEX('_',sp.Name)-1)=tb.Name

     AND LEFT(sp.NAME,CHARINDEX('_',sp.Name)) not like ''

     AND sp.Name like 'Agreements_Delete'

     ORDER BY sp.Name

    OPEN drop_sp FETCH NEXT FROM drop_sp INTO @sp_name

    WHILE...

  • RE: Filling Gaps - Running Totals

    I happen to read this articles on "Joy of Number" and had some explaination about avoiding cursors. So Here is how we can avoid cursors.

    1.Create a table to hold Numbers....

Viewing 14 posts - 301 through 314 (of 314 total)