Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by U3RldmUgW » Thu, 23 Aug 2007 06:18:00


That look promising...

But unfortunately the ";" character did not fix the syntax error.

And keep in mind that this is during run-time of the SPROC and not compiling
into the DB.
 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by Tibor Kara » Thu, 23 Aug 2007 06:28:56

Can you provide a repro? Your code returned an *expected* error (no such table...).

--
Tibor Karaszi, SQL Server MVP
http://www.yqcomputer.com/
http://www.yqcomputer.com/

 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by Russell Fi » Thu, 23 Aug 2007 06:38:11

Steve,

OK, I missed the boat. Which probably means that there is something going
on earlier that is at the root of the problem. My repro (comment out
whichever inserts you do not want to test) had no error on 2005, with or
without the semi-colon.

create table #Py_Tbl (After1987 int, AY INT, AM INT, PenHrs INT)
insert into #Py_Tbl values(55, 1986,7,2)
insert into #Py_Tbl values(66, 1985,7,2)
insert into #Py_Tbl values(77, 1986,7,0)
insert into #Py_Tbl values(77, 1987,0,0)
insert into #Py_Tbl values(77, 1987,0,2)

If Exists(Select * From #Py_Tbl Where ((AY=1986 and AM>=7) or AY>1987) and
PenHrs<>0)
update #PY_Tbl Set After1987=1

Restored:

SELECT * from #PY_Tbl
drop table #Py_Tbl

What next?

RLF
 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by U3RldmUgW » Thu, 23 Aug 2007 06:40:02

I do not understand what you want me to supply? This error is easily
duplicated on the production server.
 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by U3RldmUgW » Thu, 23 Aug 2007 06:46:02

he SPROC is over 1000 lines. If calculates a persons pension.

The BEGIN/END block around the UPDATE #PY_TBL fixes the problem.

I'm feeling it's a true parsing bug in SQL - but I've got no way to
reproduce it in a smaller fashion.

"Russell Fields" wrote:

 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by Russell Fi » Thu, 23 Aug 2007 07:54:50

teve,

I certainly cannot argue with you about that possibility. And I understand
that it may not be worth pursuing any further.

RLF

"Steve Z" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...


 
 
 

Odd syntax issue - didn't happen in SQL 2000 - error in SQL 20

Post by Tibor Kara » Thu, 23 Aug 2007 16:47:10

>I do not understand what you want me to supply?

Something we could execute that gives us the same error message. I see from your discussion with
Russell that it isn't that easy, though. A parsing bug seems probable, and I guess that if you want
to pursue this you would have to open a case with MS.

--
Tibor Karaszi, SQL Server MVP
http://www.yqcomputer.com/
http://www.yqcomputer.com/