bonjour

inutile de preciser , je suis debutant..!

je cherche a imprimer un integer[local variable @STUDY_CKEY]..juste pour avoir l'info dans mon fichier de log.
le script marche nickel...mais je n'arrive pas a trouver le moyen d'imprimer mon @STUDY_CKEY....
je viens d'essayer ca: print @STUDY_CKEY , ms error , apparement imprimer des integers ne marche pas....!???...peut-etre que print `@STUDY_CKEY` marcherait??
merci de votre aide.
Michel.
voila le script:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
isql -Usa -P `cat /etc/.sapassword` <<! >>rearchive.out
 
use ims
go
 
 
/* MG- execute insert_archive_queue one exam every 30 seconds */
 
/* tempdb..missing3 contains the non-shadowed study/exam*/
declare @STUDY_CKEY int
 
while (1=1)
 
begin
        set rowcount 1
        select @STUDY_CKEY= study_ckey from tempdb..missing3 where flag=0
 
        if (@@rowcount = 0)
                break
 
        set rowcount 0
        delete arc_address where study_ckey=@STUDY_CKEY
 
        execute insert_archive_queue "A",@STUDY_CKEY
 
        if (@@error != 0)
                return
 
        set rowcount 1
        update tempdb..missing3 set flag=1 where study_ckey = @STUDY_CKEY
        waitfor delay "00:00:30"
end
 
set rowcount 0
 
 
go
exit
!
~