Thursday, February 27, 2014

SQL Server change schema to dbo for TABLES and STORED PROCEDURES

Oops... so you mistakenly created some tables , etc, without specifying it belongs to dbo. It's fine, here's a very quick way to remedy it!

SELECT 'ALTER SCHEMA dbo TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'oldschema'

SELECT 'ALTER SCHEMA dbo TRANSFER ' + ROUTINE_SCHEMA + '.' + SPECIFIC_NAME 
FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA = 'oldschema'

Copy and paste the results in Query Analyzer and run.

Wednesday, February 26, 2014

AgilePoint C# API: Updating a custom attribute

There are a couple of ways you could employ to update a custom process attribute in AgilePoint. If you have the premier license, it's available as a stencil under Premier Extension. This is pretty handy when you have simple, straightforward values.

However, when you need to manipulate data or perform complex data calculations prior to the update, you can make use of the Managed C# code stencil instead. It can be found under Advanced Extensions.
With just a simple line, you're on your way:
api.SetCustomAttr(pi.WorkObjectID, "YourAttributeName", "TheValue");

Retrieving?
string x = (string)api.GetCustomAttr(pi.WorkObjectID, "YourAttributeName");      

Sunday, February 23, 2014

Must-try foods in Taiwan (well, mostly Taipei)

Some of the most popular food in Taiwan. Most of the information is taken from the CNN article - Best Taiwanese food. The good folks at CNN Travel should have prepared one in Excel format for me to download in the first place...

I wanted something in Excel format that I could print out and refer to. Hope it will be useful to you too!


Related Posts Plugin for WordPress, Blogger...