Solved

oledb source editor provide different result when run in query analyzer

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

743 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

10 Experts available now in Live!

Get 1:1 Help Now