Forum Replies Created

Viewing 15 posts - 121 through 135 (of 172 total)

  • RE: Returning a Cursor from a SP

    Hello. Based on your post you could take it a step further and create a temporary table instead of a cursor and use a function to assign the appropriate...

  • RE: Script to Create 100 Databases

    Whoops. I forgot to substitute @DataSize and @LogSize. Those lines should be:

    'size = ' + @DataSize + ')' +

    'size = ' + @LogSize + ')' +

    Everett

  • RE: Script to Create 100 Databases

    Hello. This should get you on your way. The key to this solution is to create a CURSOR.

    DECLARE

    @DatabaseNamevarchar(50),

    @DataSizeint,

    @LogSizeint,

    @CreateDatabasevarchar(500)

    DECLARE TableCursor CURSOR FOR

    SELECT DatabaseName, DataSize, LogSize

    FROM...

  • RE: Need to delete first character of a string

    This example uses 788, 567, and 577 instead of N,S,E,W. Replace 4 & -4 with 2 & -2, and 5 with 3.

    USE pubs

    SELECT stor_address,

    CASE WHEN SUBSTRING(stor_address,0,4) IN('788','567','577')...

  • RE: order by in a Union, use derived table?

    Hello.

    That should work, but you don't need to nest it this way. Try placing the ORDER BY clause after the second statement. Here's an example:

    USE Northwind

    SELECT TOP...

  • RE: DTS Package Hanging

    Hello. You can use sp_update_jobschedule (@enabled property) to enable or disable a job.

  • RE: Exchange 5.5 /2000

    Hello.

    We were looking in to this and had decided to use ADO 1.21 with Exchange 5.5.

    However, before implementing it we moved to Exchange 6.0, started using XML, and...

  • RE: DTS Package Hanging

    Hello. Take a look at sysjobhistory in the msdb database. I've never used it but between run_date, run_status & run_duration you can probably put something together (ex: run...

  • RE: Query analyzer messages tabs output

    Ah. Cool question, is there a simpler way than: saving the result and then importing it. I hope someone has an idea.

    P.S. the save message tab information...

  • RE: Capturing Error in DTS package

    The comments should tell you. Here's an example:

    JOB RUN:'*JobName*' was run on 10/31/2002 at 4:48:00 AM

    DURATION:0 hours, 1 minutes, 36 seconds

    STATUS: Failed

    MESSAGES:The job failed. The Job was invoked...

  • RE: creating word document

    There was a good example of how to use sp_oa recently. The code was for a spreadsheet but the author did a top rate job. Here's the link:...

  • RE: Capturing Error in DTS package

    For me, I have the job on failure report the last step run to me via e-mail (and to the log). When I need to know where in a...

  • RE: Deleting a filegroup

    I believe you can use the ALTER DATABASE command to delete files. BOL has a long section on this command.

  • RE: Query analyzer messages tabs output

    Groan. @v-2 should be @TestString and ... sorry about using the phrase 'bit by bit'

  • RE: Query analyzer messages tabs output

    I have a bad feeling that I'm still not seeing what you want.

    My quick answer is yes

    declare @TestString varchar(250)

    set @v-2 = 'set statistics time on '...

Viewing 15 posts - 121 through 135 (of 172 total)