Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2002
    Location
    Singapore
    Posts
    71

    Unanswered: Diff Result Between SQL 7 & SQL 2000

    Hi.

    When I execute the following sql statement in SQL 2000 DTS or query analyzer, I received the following error message. I used [ ] because my field names have spaces in between.

    The same sql statement ran perfect in SQL 7. What could be wrong? Please advise. Thanks a million.


    Update SAPvsSQL set [Sales Organisation] = sales_org,
    [Value Out By] = val_diff, [Qty Out By] = qty_diff


    Error message:

    Server: Msg 16882, Level 11, State 1, Procedure sp_runwebtask, Line ....

    SQL Web Assistant: Web task not found. Verify the name of the name for possible errors.


    Best regards

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You sure you just didn't execute all of the code in the QA window, and you're executing something you don't see?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    And also, what are you setting the columns to?

    Those aren't local variables....is there more to the statement?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Jun 2002
    Location
    Singapore
    Posts
    71
    Originally posted by Brett Kaiser
    And also, what are you setting the columns to?

    Those aren't local variables....is there more to the statement?
    Hi,

    Thank you for your email reply.

    Those in [ ] were actual field names in my database table. I used them for display purposes so instead of showing Sales_organation, I display Sales Organisation, Value Out By instead of val_diff and finally Qty Out By instead of qty_diff (look more meanful to the users).

    You are right that I didn't show all the script in my previous message because they worked ok until this line. I am just being curious why the same script work PERFECT in SQL 7 but not in SQL 2000. I have been running this same set of script for more than a year and still running fine as at this morning. Reason why I am trying it on SQL 2000 because we will be moving to SQL 2000 totally by end this month.

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    No problems here...your doing something else wrong....

    Code:
    USE Northwind
    GO
    
    CREATE TABLE SAPvsSQL (
    	  [Sales Organisation]  varchar(10)
    	, [Value Out By] 	 varchar(10)
    	, [Qty Out By] 	 varchar(10)
    )
    GO
    
    DECLARE @Sales_Org varchar(10), @val_diff varchar(10), @qty_diff varchar(10)
    
    SELECT @Sales_Org = 'A', @val_Diff = 'B', @qty_diff = 'C' 
    
    INSERT INTO SAPvsSQL ([Sales Organisation], [Value Out By], [Qty Out By])
    SELECT 'X', 'Y', 'Z'
    
    SELECT * FROM SAPvsSQL
    
    UPDATE SAPvsSQL 
       SET    [Sales Organisation]      = @sales_org
    	, [Value Out By] 	= @val_diff
    	, [Qty Out By] 	= @qty_diff
    
    SELECT * FROM SAPvsSQL
    GO
    
    DROP TABLE SAPvsSQL
    GO
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •