Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Tuesday, March 27, 2012

Dimension with two names for each Key

Hi!

I need to build a dimension that offers two names for each entry.

For example, I have an electronics sparepart, a simple resistor that is called "abc-xy-12345" as company internal part number and also maybe "Resistor 1.0 kOhm 0.5 W" for a human being. Finally, for me as database guy, this part is a 4 byte integer number, I understand this is preferred to using the 15 byte part number. The dimension will have around 10,000 members when fully loaded, if that is important for the decision how to do it.

So I need to have a dimension that allows some of the users need to see the part as part number since they need to do a VLOOKUP in Excel or similar with the data, while the other usergroups needs to build a report upon the data, and they want to see a "self speaking name".

I do not want to build two nearly identical dimensions, what other way can I use to accomplish this?

If I add the order number to the text property of the key attribute and have another attribute on the long clear name, should this attribute be based on the integer for key as well and use name for the text?

Hi Ralf,

maybe the fastest way is create two attribute both with Key = your integer code.

One with Name = Company Part Number Name and the other with Name = Self Speaking Name

Francesco

|||

I was thinking that too, but where do you set the Key attribute to (the one that is displayed with the little golden key) for the dimension onto?

Anyone of the two, does not matter? Or have the ID alone (invisible) as the key as "anchor" and add the two names each as attribute?

|||

Hi Ralf,

the attribute with the little golden key is the attribute that has Set Attribute Usage = Key (right click on the attribute to check). It's used by AS as "unique key" in the dimension and in your case it has KeyColumn = your integer key code column .

Because both your attribute are at the lowest granularity in your dimension (1 member for every integer key code), you can:

use the one with Set Attribute Usage = Key (the one with the little golden key) with NameColumn set to the column you prefer (Company Part Number Name or Self Speaking Name)

then add another attribute (with Set Attribute Usage = Regular) with KeyColumn = your integer key code column and NameColumn = the other description you have.

Francesco

Wednesday, March 7, 2012

Different Server Names

Hello,

I am using ADO controls for MSSQL Database. The server name on my machine is different from the server name on the machine where i am running my application. When i make changes to my application, i have to rebuild the connection on my ADO Control. Is there a way to create a server name on my developement machine to match the server name where i run my application?

Would appreciate any help.Hi Ed

Welcome to DBForums :D

Don't bother buggering about with instance names. Just create some control procedure in your front end code that works out "If I am running in development mode on this machine connect to server A, otherwise connect to server B".|||hello pootle flump

thanks for the reply.

i have created a variable which contains the datasource string. i change the datasource string when on development with my machines servername and switch the servername to the working machine. it displays a message that it cant find the server. is there something i missed?|||Which one displays the message? What is your connection string? Are either of the instances SQL Server Express? Have you installed Visual Studio 2005\ 2003 on your workstation?|||pDataSource$ = "Development"
pUserId$ = "sa"

pConnectionString$ = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" + pUserId$ + ";Initial Catalog=Ormon;Data Source=" + pDataSource$

ADOControl.ConnectionString = pConnectionString$

when i want to run the application in the actual environment i simply change the pDataSource$ value to "Actual"

unfortunately, the "server cannot be found" error occurs|||Can you connect to either? You are not specifying a password for sa. Also, sa is a very poor choice for a login for an application.

Please also look at my questions again - you missed a couple.