Solved

oledb source editor provide different result when run in query analyzer

Posted on 2011-03-16
4
271 Views
Last Modified: 2016-10-04
I have some confusion. I have a package in ssis which use to select data, this query when I execute in ssis, it provide me with different results as compare when I run in sql mgmt studio. I do not understands what is the different here when using ssis ( oledb source ) against query mgmt studio
0
Comment
Question by:motioneye
  • 2
4 Comments
 
LVL 4

Expert Comment

by:qasim_md
ID: 35146881
This question is on a very high level, but gives a clear picture of what is the problem.:::

The solution might be to Check the Data types you have declared in the SSIS for the resultant rows and fix it as per the source data types...

did that help ???? let me know
0
 

Author Comment

by:motioneye
ID: 35146937
Hi,
The sql is very simple. when using BIDS it return different results compare I'm using ssms. There is no data type declared in oledb source, only pure T-sql


/* Logins selection */
select  Cast(1 as int) As groupid, name, count(*) as count, 'categoryid1 and TestID1' as GroupName  from Testtable2
where categoryid = 1 and TestID = 1 AND name <> ''
AND
TestID <> '7' AND
TestID <> '8' AND
TestID <> '9'
group by name --order by count(*) desc
Union all
/* Logins failed Selection */
select Cast(2 as int) As groupid, name, count(*) as count , 'categoryid2 and TestID6' as GroupName  from Testtable2
where ((categoryid = 2 and TestID = 6) and name <> '')
AND
TestID <> '7' AND
TestID <> '8' AND
TestID <> '9')
group by name
order by groupid asc, count desc
0
 
LVL 1

Accepted Solution

by:
hammam_diab earned 500 total points
ID: 35147341
same query on the same database should produce the same result. I assume that results are more when you run the query from the sql management studio? are you using any filters in your ssis package?
0
 

Author Comment

by:motioneye
ID: 35148274
Yes,
The result are more when I run in ssms, when it run in BIDS, so many data missing, this really make me confuse as for my thoughts both should deliver same performance, no tjis package have no any advance filter or setting, just solely use for selecting records. what we have only one oledb source to flat file destination that all
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Job Hung 17 35
query analyser in sql server 2016 express edition 2 24
SQL Throw Error 7 30
How come this XML node is not read? 3 25
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question