Showing posts with label separate. Show all posts
Showing posts with label separate. Show all posts

Friday, March 30, 2012

How to control format of datetime attributes?

There is an attribute that have type DateTime, based on the field type in data source. It hasn't separate name column. The member caption is formatted as yyyy-MM-dd hh:mm:ss. Can I control the format of Member name without giving separate name column.

I assigned different format in the format field of key property window, but it had no effect. What I did wrong?

Hello. I do not think that you will have to pay any penalty from adding a new column in the data source view with a new format of your date column. I recommend to use the TSQL function CONVERT that have arguments for different date formats. Have a look at CONVERT in Books On Line, and you will see the complete list of different codes/arguments for different date formats.

HTH

Thomas Ivarsson

|||

Thank you,

I thought about more sofisticated solution, that can be used in multi culture environment without adding x additional fields with "formatting" of a datetime attribute.

I hoped, that the AS2005 is smarter as AS2005 and offers more possibilties.

Do you know what is the format field in key properties for?

Wednesday, March 7, 2012

How to compare SQL server stored procedures from two separate databases?

Is there a straight forward way or a tool to compare SQL server database objects, such as stored procedures located in separate databases?

Well, the way that I always do it is to use the RedGate SQL Compare tool. www.red-gate.com. It works very nice and will compare everything, including permissions.

There are other ways, and Buck Woody (who I have seen around the forums) has an article here that covers it pretty well:

http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=210&rl=1

|||You can use Visual Studio Team System(VSTS) for Database professional. It is covered all the features of readgate and something extra.|||

I use the easiest/dumbest/cheapest way

Get SPs from both databases, and use free version of examdiff to compare them (or you can use Visual SourceSafe, etc..)

|||

There are several free tools that do this. The one that I use is SQL Effects Clarity CE.

It compares tables, stored procedures, views, functions, users, roles, etc.

You can download it here: http://www.sqleffects.com/sfxClarityDetails.html

Hope this helps.