SELECT SQL Select SQL and upgrade your performance

  • SELECT SQL
  • MSSQL
  • MySQL
  • Utilities
  • CSV to SQL
  • Contact
0
DateAdd and Leap Year issue
DateAdd and Leap Year issue
There is an issue with Leap Year and DateAdd function that can appear if you want to compare two dates from different years and using some date value ...
How to SELECT Min/Max value with associated column from same row
How to SELECT Min/Max value with associated column from same row
When you need select Min or Max value from table with one column, it's easy SQL task. A little harder is same request when you want to find minimum va...
Solved - Arithmetic overflow error converting float to data type numeric
Solved - Arithmetic overflow error converting float to data type numeric
Are you trying convert float to numeric and you get "Arithmetic overflow error converting float to data type numeric" error? This could happen even if...
How to recover unsaved T-SQL or previous version of altered view or store procedure
How to recover unsaved T-SQL or previous version of altered view or store procedure
When you alter view or stored procedure and you realize, previous version wasn't saved and you need it. Or you want recover SQL script immediately aft...
How to find and remove hidden characters and invisible whitespace when LTrim, RTrim not work
How to find and remove hidden characters and invisible whitespace when LTrim, RTrim not work
Sometimes it can happen, that you compare two strings, which looks exactly sames, but they are processed as not equal. Also when you use SELECT DISTIN...
 
 
Execute SQL Task Error: 0xC002F210, Problems with the query,
Execute SQL Task Error: 0xC002F210, Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
3 most often reason, when you are using variables in Execute SQL task inside SSIS and get following error: Error: 0xC002F210 ... , Execute SQL Task: ...
How to use a variable inside SQL in SSIS Data Flow Tasks
How to use a variable inside SQL in SSIS Data Flow Tasks
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...
Solved - Retrieving the COM class factory for component with CLSID in SSIS
Solved - Retrieving the COM class factory for component with CLSID in SSIS
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 err...
Loop through ADO recordset in SSIS
Loop through ADO recordset in SSIS
For some solutions in SSIS you may need to go over all records from some SELECT and each record use in some subqueries. In this case you want loop rec...
 
 
A couple of MySQL DML things I did not know
A couple of MySQL DML things I did not know
As I'm coming from Microsoft SQL Server environment, working with MySQL is constantly surprising me in many ways, both good and bad :) In contrast to ...
Read this Entry
SQL script to create intro image by parsing article text in Joomla 3.x
SQL script to create intro image by parsing article text in Joomla 3.x
When I migrated one of my web site from Joomla 1.5 into Joomla 3.3 I found there is finally nice feature in Joomla 3.x called Images and Links, which ...
Read this Entry
How to merge 2 tables into one result in MySQL
How to merge 2 tables into one result in MySQL
Today 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 f...
Read this Entry
 
 

How to alter column with default constraint in MSSQL

Details
Written by Stanislav Duben
Published: 13 January 2011
Parent Category: MSSQL
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.
Read more: How to alter column with default constraint in MSSQL 1 comment
Last Updated: 22 December 2012
Hits: 74208

How to use a variable inside SQL in SSIS Data Flow Tasks

Details
Written by Stanislav Duben
Published: 27 December 2010
Parent Category: MSSQL

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.

Read more: How to use a variable inside SQL in SSIS Data Flow Tasks Add new comment
Last Updated: 27 February 2018
Hits: 330509

Solved - Retrieving the COM class factory for component with CLSID in SSIS

Details
Written by Stanislav Duben
Published: 15 January 2010
Parent Category: MSSQL

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. 

 

Read more: Solved - Retrieving the COM class factory for component with CLSID in SSIS 1 comment
Last Updated: 27 January 2016
Hits: 116590

Find all tables with column name

Details
Written by Stanislav Duben
Published: 13 January 2010
Parent Category: MSSQL

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.

Read more: Find all tables with column name Add new comment
Last Updated: 22 December 2012
Hits: 29091

How to merge 2 tables into one result in MySQL

Details
Written by Stanislav Duben
Published: 07 January 2010
Parent Category: MySQL

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.

 

 

Read more: How to merge 2 tables into one result in MySQL 7 comments
Last Updated: 22 December 2012
Hits: 409596

How to drop column with default constraint

Details
Written by Stanislav Duben
Published: 15 October 2009
Parent Category: MSSQL
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.
 
Read more: How to drop column with default constraint Add new comment
Last Updated: 22 December 2012
Hits: 44018

Page 3 of 5

  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
  • End

Contact

Travel Guides

  • Travel Guides
  • Atlanta Travel Guide
  • Berlin Travel Guide
  • Brazil Travel Guide
  • Bulgaria Travel Guide
  • Caribbean Travel Guide
  • Detroit Travel Guide
  • Egypt Travel Guide
  • Hong Kong Travel Guide
  • Japan Travel Guide
  • Madrid Travel Guide
  • Miami Travel Guide
  • New York Travel Guide
  • Norway Travel Guide
  • Prague Travel Guide
  • Rome Travel Guide
  • Shanghai Travel Guide
  • Slovakia Travel Guide
  • Spain Travel Guide
  • Sydney Travel Guide
  • Tijuana Travel Guide
Powered by T3 Framework