Solved

oledb source editor provide different result when run in query analyzer

Posted on 2011-03-16
4
276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

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.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

705 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