Solved

oledb source editor provide different result when run in query analyzer

Posted on 2011-03-16
4
265 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now