Groups | Blog | Home
all groups > sql server programming > april 2004 >

sql server programming : =?ISO-8859-1?Q?What_wrong_in_my_stored_proc=3F__Can=B4t_be_possible....?=


mark NO[at]SPAM mepos.de
4/24/2004 5:13:35 PM
Hi All,

I have some for me not understandable Error :-(
Using MS SQL Server 7.0. What´s that for a bullshit, what´s wrong?
Beetween msg 2 and 3 is a missing ")", but where?



Here´s the Code:


DECLARE crsPABM SCROLL CURSOR
FOR
SELECT verw_ADM, verw_Wand, (verw_ADM - verw_Wand ) As
verw_Innen, verw_kart_ID
From vk_verw_VerfWerte
WHERE verw_kalk_ID = @KalkID AND ((verw_kart_ID = 1 ) OR
(verw_kart_ID = 3 ) OR (verw_kart_ID = 5 ) )
ORDER By verw_kgm DESC
OPEN crsPABM

1 If @debug = 1 print 'FETCH crsPABM INTO @RecCount: ' + + Cast (
@RecCount As Char(10))

FETCH crsPABM INTO @luppeAussen, @luppeWand, @luppeInnen,
@verw_kart_ID

2 If @debug = 1 print 'FETCH crsPABM @@FETCH_STATUS:' + Cast (
@@FETCH_STATUS As Char(10))

FETCH NEXT FROM crsPABM INTO @pAussen, @pWand, @pInnen,
@verw_kart_ID

3 If @debug = 1 print ' FETCH crsPABM @@FETCH_STATUS:' + Cast (
@@FETCH_STATUS As Char(10))


Here´s the Output:


MSG 1 FETCH crsPABM INTO @RecCount: 2
MSG 2 FETCH crsPABM @@FETCH_STATUS:0
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von ')'.
mark NO[at]SPAM mepos.de
4/25/2004 4:11:12 AM
Hi All,

the @@Error is 0..........


FETCH crsPABM INTO @RecCount: 2
FETCH crsPABM @@FETCH_STATUS:0 @luppeAussen: 70 @luppeWand:
9.7 @luppeInnen : 60.3 @verw_kart_ID:5
@@ERROR:0
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von ')'.
@@ERROR:0
FETCH crsPABM @@FETCH_STATUS:0 @pAussen: 92
Hugo Kornelis
4/25/2004 10:32:41 PM
[quoted text, click to view]

(snip)

[quoted text, click to view]

It's not a missing ")", but a syntacticatl error near one of the
")"'s. I think that it just might be the extra "+" in the line you
marked "1" - underlined if you view this with nonproportional font:

1 If @debug = 1 print 'FETCH crsPABM INTO @RecCount: ' + + Cast (
=====


Best, Hugo
--

AddThis Social Bookmark Button