Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Friday, March 30, 2012

how to control the table's column number

Hi,

When I add the table into the report, the default column number is 3. Let's say I need 10 columns on the report, besides right click on the last column and click on "add column right" to add the other 7 columns, is there any easy way?

Thanks.

Sorry, there is no other way of doing this. You have to add additional columns through the popup menu.

-- Robert

sql

How to control caption for the bit attribute?

Hi Gurus,

Have anybody idea how to control the caption of bit attribute?

The default is True/False.

1. How to force the AS to show Y/N or Yes/Now еtс.
2. How to force the AS to show localized bool string (Wahr/Falsch, Истина/Ложь).

I can create table like

ID Caption

0 Yes
1 No

Or calculated fields in UDM

but all it awkward.

I have about 50 bit attributes in all my dimensions. It would be too expensive to devote so much attension to every bit attributes.


If you have a table as described, with a bit column (ID in your example) and a character column with the value you want displayed (Caption in your example), then you can create the attribute in your dimension so that it uses ID as the KeyColumn for the attribute and Caption as the NameColumn for the attribute. When you do this, AS manages the attribute internally using the values of the ID column, but it will display to the end user the values of the Caption column.

For localized versions, extend your table design to include additional localized captions. Then, in the dimension design, go to the Translations tab and set up a translation for the dimension. This would include defining the Windows locale that the translation applies to and identifying the column that contains the localized captions for the attribute in question.

HTH,

Dave Fackler

|||

but all it awkward.

I have about 50 bit attributes in all my dimensions. It would be too expensive to devote so much attension to every bit attributes.

For every bit attribute I have to JOIN a "caption" table, then I have to set separate Name column. It's to expansive.

It would be made no pleasure :-(

|||

It would be too expensive to devote so much attension to every bit attributes

Can you devote this attention just to one such attribue, and make all other dimensions role playing with this one ?

|||

Hi, Mosha

If it was a dimension then there was no problem. But I speak about attributes of one dimension. I seems to be inpossible to have "role plaing" attribute. I have made one DSV virtual table and have made correspondents virtual foreign keys to it in order to "translate" more then one bit attribute of my dimension, but AS doesn't make it right :-(

sql

Wednesday, March 28, 2012

How to connect to SQL server 2005 from C# after default installation?

Hi everyone,

I just installed Visual Studio 2005 and SQL Server 2005. However, I`m not able to connect to the database.

When running this C# code, I get a SqlException.

using System; using System.Data; using System.Data.SqlClient; class Program {
static void Main(string[] args) {
SqlConnection connection = new SqlConnection(); connection.ConnectionString = "Data Source=(local)\\sqlexpress;Initial Catalog=X;Integrated Security=True;"; connection.Open(); connection.Close();
}
}

I get the following error message:

Cannot open database X requested by the login. The login failed.
Login failed for user Y.

Can anyone tell me how to connect to sql server 2005 after default installation? Any help would be appreciated! :-)

Jan

Most likely your user ID does not exist in a list of the logins for the database. You need to grant an access for your Windows account to the database. Check next links with some info

http://support.microsoft.com/kb/325003/en-us#XSLTH4213121122120121120120

http://support.microsoft.com/kb/240872/en-us

|||Thx, my program runs!

I executed the following command (in VS Command Prompt) to add my windows account to the list of database accounts.

C:\>osql -E -S (local)\sqlexpress
1> EXEC sp_grantlogin 'machine_name\user_name'
2> go
1> exit

How to connect to SQL Server 2000 and SQL Server 2005 in one computer??

Hi All!!!

In my Computer has MS SQL Server 2000(with default Instance) and now I Install MS SQL server 2005(with Instance name: SQL2005 ). Now I want to write Web Application to connect to the both databases (SQL Server 2000 and MS SQL Server 2005), How to Add connection string in my web.config to do it.

Help me ?

Thanks & Regards,

You can put the two connection strings in the web.config file and use either in your code..

|||

Hi !!!

Thanks for your support !!! Please give me the connection string to connect to SQL Server 2000 & SQL Server 2005.

Thanks

|||

check out www.connectionstrings.com

Friday, March 23, 2012

How to connect second instance if server has two instance?

We have one sql server 2005 machine which have two instance named:
DEVSQL(default server named when first installed) and DEVSQL\TESTING (second
installed). On the client, I can connect default instance, but the second
instance cannot connect. What settings I should to do?
Hi,
you will have to provide either the instancename or the portnumber in
the conenctionstring or you connection dialog of choice:
Servername\InstanceName (If SQL Browser is activated it will redirect
the request to the appropiate listerner of the instance
or
Servername,portnumber
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de

Wednesday, March 7, 2012

how to compare current date with sql db datetime data type

Hi,

I am using one datetime data type ( name: date_added ) and getdate() as default value. I want to display only those records added today. How I can compare current date with date_added.

Thanks
ManojSELECT * FROM tablename WHERE CONVERT(varchar(10),date_added,112)=CONVERT(varchar(10),GetDate(),112)

This converts both dates to yyyymmdd format, and then compares them. A better alternative might be:

SELECT * FROM tablename WHERE date_added>=CONVERT(datetime,CONVERT(varchar(10),GetDate(),112))

This presumes that there are no records added later than today. It compares the date_added to getdate() return value, converted to yyyymmdd, then converted back to a date.

Sunday, February 19, 2012

How to choose the default hierarchy for a dimension?

I created a server-time dimension and generated several hierarchies within the same dimension, does anyone know how to select a particular hierarchy as the default one?

I didn't see it on the properties for the dimension or hierarchy.What is default hierarchy semantics that you are looking for ? I.e. what will it be used for ? What special treatment will it receive ?|||It's a time dimension and there are 3 hierarchies defined:
Reporting Year -> Reporting Quarter
Year - Quarter - Month - Date
Year - Week - Date

It seems as though the Reporting Year -> Reporting Quarter hierarchy is used by default, how would I change the configuration to use a different hierarchy by default?|||

Can you please explain what do you mean by

"It seems as though the Reporting Year -> Reporting Quarter hierarchy is used by default"

|||The 'first' heirarchy is the default hierarchy. IE: The left most heirarchy in your model.

C|||Chris - can you please explain what does "default hierarchy" means in AS ? Thanks !|||From your browsing client, If you grab a Dimension containing multiple hierarchies, and drag it over (by whatever means you're using) to your Rows, or Columns, or Filter etc... it will show your default hierarchy.|||Ah, that explains it. Sorry for my confusing terminology. Thanks, Chris + Mosha.