Solved

oledb source editor provide different result when run in query analyzer

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

856 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