differences between SQL 7 and SQL 2000 ??

  • Hi, I have a stored procedure that I execute against a SQL 7 database without any problems....I have then the same database installed on a SQL2000 server, what I want to do is simply to execute the same stored procedure against the 2000-database. When I execute it against the 2000 database I get the following error msg " Error 1004: Invalid column prefix T2 : No table name specified " .....my stored procedure looks like this :

    SELECT @pwd = T2.ATTRVALUE, @node_id = T2.FNODE

    FROM NODEDATA T1 INNER JOIN

    NODEDATA T2 ON (T1.FNODE = T2.FNODE)

    WHERE (T1.ATTRID = 'LOGIN') AND

    (T1.ATTRVALUE = @USER) AND

    (T2..ATTRID = 'PWD');

    Can someone please give me a hint why its possible to run this code in SQL7 but not in 2000 ??????

    ****PLEASE RESPOND TO GROUP ***

    Help very appreciated

    Regards

    /John

  • I believe it is your dot notation for your tablenames. SQL7 (erroneously I think) supports the single dot, whereas SQL2k does not, it requires a double dot syntax. I had the same problem in upgrading from 7to 2k.

  • Hi, and thx for your answer....

    I guess that you mean 2000 does not support the double dot notification, or ??

    /John

    I believe it is your dot notation for your tablenames. SQL7 (erroneously I think) supports the single dot, whereas SQL2k does not, it requires a double dot syntax. I had the same problem in upgrading from 7to 2k.

    [/quote]

  • As you fix this I recommend adding the explicit owner - you get a slight perf boost and fix the problem at the same time.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

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

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