Print state of running query to output

  • Hi All,

    I want print state of running query to output, because my query need long time to run.

    But print statement dos not work correctly!!

    Note: I cannot use "go" in my query!

    /* My Query */

    print 'Fetch Data From Table1 is Running...'

    insert into @T1

    select x,y,z

    from Table1

    print 'Fetch Data From Table1 Done.'

    print 'Fetch Data From Table2 is Running...'

    insert into @T2

    select x,y,z

    from Table2

    print 'Fetch Data From Table2 Done.'

    print 'Fetch Data From Table3 is Running...'

    insert into @T3

    select x,y,z

    from Table3

    print 'Fetch Data From Table3 Done.'

    print 'Fetch Data From Table4 is Running...'

    insert into @T4

    select x,y,z

    from Table4

    print 'Fetch Data From Table4 Done.'

    print 'Fetch Data From Table5 is Running...'

    insert into @T5

    select x,y,z

    from Table5

    print 'Fetch Data From Table5 Done.'

  • You could try using RAISERROR WITH NOWAIT, see link[/url].

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply