Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2011
    Posts
    78

    Unanswered: Please help with the Update statement

    Anyone know the syntax for the following statement in SQL 2008?
    The statement below is for 2005. Please let know. Thank you.


    Update [EDA4010].[REVENUE_TYPE]
    set [REVENUE_TYPE] .REVENUECATEGORYCODE= ExistingKeyValue
    where [REVENUE_TYPE] .REVENUECATEGORYCODE=BadKeyValue or <[REVENUE_TYPE].REVENUECATEGORYCODE> IS NULL


    Error messages when you try to process a database or a cube in SQL Server 2005 Analysis Services&#58; &#34;The attribute key cannot be found&#34; and &#34;The record was skipped because the attribute key was not found&#34;

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what values did you use in ExistingKeyValue and BadKeyValue

    also, those angle brackets are wrong... removes dem
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2011
    Posts
    78
    Thanks for replying. I didn't know what to put for existingkeyvalue, but the badkeyvalue is referring to null values?

    I am not sure how to apply this.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you need to supply actual values, as i believe what you have there is just a template that illustrates the structure of the UPDATE statement

    badkeyvalue should be replaced with the bad revenue category code value that you want changed, and existingkeyvalue should be replaced with the good revenue category code value that you want it changed to
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jul 2011
    Posts
    78
    Thank you r937. I fixed my cube problem without having to use this query. But it's good to know in case I need to use it in the future.

Posting Permissions

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