1

The entirety of my code is:

BEGIN TRAN --SACTION
SELECT 1
COMMIT --TRAN

with any combination of tran, transaction or neither it always returns error:

Incorrect syntax near the keyword 'BEGIN'.

I'm using Microsoft SQL Server 7.0. This is a corporate system, a legacy. I can't update it from my own accord.

The code does nothing useful but demonstrates the problem. commit or commit transaction yields the same error. No mimic, I wrote the code myself.

Trying BEGIN TRAN SELECT 1 COMMIT TRAN also gives the same error.

Select 1 runs OK. Begin, Begin Tran or Begin Transaction yield error.

I was pondering if someone could have altered the system catalogs so that the reserved word BEGIN was replaced by another word. In this case, how would I query for the new equivalent?

Paul White
  • 94,921
  • 30
  • 437
  • 687
Lynx Kepler
  • 191
  • 4
  • 13

0 Answers0