15 Execute SQL Task in SSIS | Use variables in Execute SQL task in SSIS

preview_player
Показать описание
Execute SQL Task in SSIS | Use variables in Execute SQL task in SSIS
Download the file\script used in the Video from below link

Execute SQL Task in SSIS
How execute SQL Task works in SSIS?
Why we use execute SQL task in SSIS?
How do I run an SQL file in SSIS?
What is the difference between execute SQL task and execute SQL task?

Happy Learning.

Рекомендации по теме
Комментарии
Автор

Aqil you are the best SSIS person the video is very much helpful you have covered variable and parameters as well with execute SQL task....thanks a lot for your help

nivetha.meceskct
Автор

Thanks. That was very informative. Keep it up !

christopherhorton
Автор

if you have problems on the second sql statement (using variables), remove the 'go' from the query

LucasMaster
Автор

Aqil, My dear brother, i am samiul from bangladesh... really helpful your guide line

mdsamiulislam
Автор

Hi sir, Thanks for your video.You made a such a nice video. If you dont mind please make a video on real time example bY using the Execute sql task ..Thanks in advance

rightplacetoeat
Автор

ERROR:
[Execute SQL Task] Error: Executing the query "insert into persons values (?.?.?)" failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


SOLUTION:
I had the same issue and fixed this issue. In the video he actually copy pastes a different Query and you can see it for a short second to be able to copy it. Deleting GO and CREATE TABLE parts of the query wasn't enough because I needed to actually change the GO statement to 'ON [PRIMARY]'
Query below:

IF NOT EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = N'Person')
CREATE TABLE PERSON(
ID INT IDENTITY,
NAME VARCHAR(50),
GENDER VARCHAR(1),
AGE INT)
ON [PRIMARY]
INSERT INTO PERSON VALUES (?, ?, ?)

data
Автор

Hi Aqil, if i want to insert only the name. what format should be used. I created a table with one column (name alone), when i give the below insert under expression, the evaluate expression throws error.
insert into Person values (@[User::Name] )

vycksvl
Автор

Sir after giving the server name in the top for the connection in the below drop down i am not able to find the database name.please help me

SoftwareCouple
Автор

Hi Aqil,
Thanks for videos, i have one doupt.

To find duplicate data

Select name, gender, memberid, , , , count(1 ) from ABC
Group by name, gender, memberid
Having count(1)>1

I need to insert above query duplicate result set in temporary table and mail send to user also copy of duplicate result set . After that If find any duplicate data i need to update . Could you pls let me know how will achieve in ssis package


Thanks in Advance!!

sathiyamoorthi
Автор

Please do comment that expression which you used for dynamic entry

abhi-vtxg
Автор

[Execute SQL Task] Error: Executing the query "create table persons
(id int, name varchar(20), gend..." failed with the following error: "There is already an object named 'persons' in the database.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

sanjeevaranisalluri
Автор

nice video bro can u give me the query to connect multiple Db.

phaninath
Автор

SIr it is giving me this error when we created parameters for Ram person, Execute SQL Task: Executing the query "insert into Person values (?, ?, ?)" failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task. Can u pls tell me the issue?

VishalJaybhaye-kqhh
Автор

Hi all, i got this error : [Execute SQL Task] Error: Executing the query "insert into NPerson values (?, ?, ?)" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
What i can do ?

oshriamir
Автор

Hi Aqil,
I got this error while executing using variable:
"[Execute SQL Task] Error: Executing the query "INSERT INTO PERSONS VALUES(?, ?, ?)" failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."


Please suggest what to do?

Jigyasuh
Автор

Hello sir i am not able to see integreation servuce catalog node in ssms my sql server is 2019

sachinnavik
Автор

Hello Sir,
First Doubt: So through variables in this case each time we can enter only each record from variables into table? or can we enter multiple records at single time using variables?....

Second Doubt:
INSERT INTO PERSONS VALUES ('"+ @[User::Name] +"', '"+ @[User::Gender] +"', '"+ (DT_WSTR, 12)@[User::Age] +"')
In this while using variables to enter the values into table, why we used single quote and double quote both. First single quotes and inside it double quotes and inside variable.... Please explain sir

MVinodKumar-tttu
Автор

Nice Lecture. But when I have tried using parameters. I was getting the following error. "Multi-step OLE DB operation generated errors. Check each OLE DB Status value, if available. No work was done ". Possible reason for failure with query, "Resultset" property is not set correctly. Can you please help.

yuvanak
Автор

Bhaiyya can we use variable object type in expression in ssis?
If yes please tell how to do that

sureshareti
Автор

wow you can insert the sql statements with 5 different ways.

krishnachaitanyareddy