Syndicate

How to alter column with default constraint in MSSQL
Written by Stanislav Duben   
Thursday, 13 January 2011
SQL_icon_base.jpgWhen you try alter column in MSSQL 2005 from one datatype to other with some default value by ALTER TABLE xxx ALTER COLUMN column_name you get error about existing constraint. Unfortunately there is nothing like CASCADE CONSTRAINT. You must DROP constraint first and then you can ALTER column and finally you have to create CONSTRAINT again. I will show you easy way, how to do it.
 
 
 
 
Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
How to use a variable inside SQL in SSIS Data Flow Tasks
Written by Stanislav Duben   
Monday, 27 December 2010

2-sql-servers.png

Sometimes you need to use a variable inside SQL in SSIS Data Flow Tasks. For example, you may want to select TOP x records in a periodically scheduled task. This X variable could be used to adjust performance or sometimes a condition cannot be specified when the package is created. And of course there are many other reasons for why you would want to use a variable in Data Flow Tasks. The problem is that, although you can put "?" in your SQL query for the DB source, you cannot set up the parameters there by clicking a button. And you will get an error message if you try to use this query. But there are ways to accomplish the same thing. In this article I will show you how to do it using Script Task.

 




Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
Solved - Retrieving the COM class factory for component with CLSID in SSIS
Written by Stanislav Duben   
Friday, 15 January 2010

SQL_icon_base.jpg I get strange error during redeveloping one SSIS. When I tried run some SQL task, finally such an easy one with "SELECT 1", I always received same error.

 

[Execute SQL Task] Error: Executing the query "" failed with the following error: "Retrieving the COM class factory for component with CLSID {7816B7A3-CD60-4539-BD38-C35AFC61F200} failed due to the following error: 80040154.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. 

 

Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
Find all tables with column name
Written by Stanislav Duben   
Wednesday, 13 January 2010

SQL_icon_base.jpgCommon situation, you need to make same changes in database, and you have column name.  But you aren't sure in which tables this column is, where to look etc. Here is the simple solution.

 

 

 

 

 

 

Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
How to merge 2 tables into one result in MySQL
Written by Stanislav Duben   
Thursday, 07 January 2010

cofee_book.pngToday I get interesting question. How to merge in MySQL two tables, where could be same primary key and different values. Result should be as select from one table with key column and 2 columns with both values from two tables, each in separate column.

 

 

 

 

 

 

Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
How to drop column with default constraint
Written by Stanislav Duben   
Thursday, 15 October 2009
SQL_icon_base.jpgWhen you try drop column in MSSQL 2005 with some default value by ALTER TABLE xxx DROP column_name you get error about existing constraint. Unfortunately there is nothing like CASCADE CONSTRAINT. You must DROP constraint first and then you can DROP column. I will show you the easiest way, how to do it.
 
 
 
 
Tag it:
Delicious
Digg
YahooMyWeb
Technorati
 
<< Start < Prev 1 2 3 Next > End >>

Results 1 - 6 of 13