SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Change to Dimension ID and Fact ID from Varchar to Int. Need to sort in Analysis Services


Change to Dimension ID and Fact ID from Varchar to Int. Need to sort in Analysis Services

Author
Message
Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
In an attempt to get something done quick I made a blunder and my Age dimesnion IDwas varchar along with the fact table.

I managed to sort it out and they are now both int.

However Im getting the following error message(s) for every fact table.

Error 1 MeasureGroupAttribute [SEN].[COP Stage Pupil Business Measures].[Age].[DW Age ID]
The key column #0 has data type 'WChar' different than the attribute's key column data type 'Integer'. 0 0

Im not sure how to sort this out. is there any way to get this reset?

Ta

Debbie
anthony.green
anthony.green
SSC Guru
SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)

Group: General Forum Members
Points: 99358 Visits: 8691
Have you refreshed your data source view so that it picks up the new schema?



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
Yes I have done all of that and the data source is reflecting the new data types
anthony.green
anthony.green
SSC Guru
SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)

Group: General Forum Members
Points: 99358 Visits: 8691
Strange as that would of been my first point to look at, as it seems to be the most logical.

Have you tried using a calculated column using a cast operator to implicitly change the data types (shouldn't have to if the DSV is correct but might be worth a shot).



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
Looks like Ive got a lot more problems that that I currently have a very broken Project. T
Mackers
Mackers
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2615 Visits: 499
You'll need to alter the datatype of the attribute

Edit the dimension and go to properties of the offending attribute. KeyColumns --> DataType needs to be changed from WChar to Integer

Mack
Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
It already is an integer. The data source is fine. Do you mean on the cube its self?
Mackers
Mackers
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2615 Visits: 499
Sorry for being unclear..... Edit the dimension of the cube and go to properties of the offending attribute. KeyColumns --> DataType needs to be changed from WChar to Integer

The cube attribute stores the datatype as well - not sure just updating just the DSV is enough

Mack
Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
OK so...

Im in the cube. I go into the tab dimension useage
for the Age dimension the measure group column side is underlined in red

The Key column has data type Wchar different that the attributes ID of Integer. To correct this issue edit the relationship or delete and recreate it.

OK so I go in to try and delete and I cant see anything about the key column, Even when I go into advanced.

I could try and create the relationship again in here but I'm guessing I'm still not in the right area that you are talking about
Debbie Edwards
Debbie Edwards
SSCrazy Eights
SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)SSCrazy Eights (8.1K reputation)

Group: General Forum Members
Points: 8104 Visits: 696
Ive deleted and added again in the Dimension useage tab. The red underline has gone. lets see what happens.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search