Solved

SSIS OLEDB source editor

Posted on 2011-03-02
5
1,081 Views
Last Modified: 2012-05-11
IN ssis OLEDB source editor, under sql command text. I have a  T-sql like below. Nothing wriong with sql syntax, but when I click at columns only on my first query column are available, then when I try to produce results again only on my first query results are presented. Any advise to get this work in ssis OLEDB ?

select name,add,phone, Count(*) from tabletest
go
select * from tabletest where date_time='2011-0-01'
0
Comment
Question by:motioneye
  • 2
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 250 total points
ID: 35016524
Hi Motioneye,
not sure if you can have 2 SQL statements as the SQL for the OLEDB source.
It does not really make sense

If you need several SQL statements to arrive your final result set then maybe put the statements in a Stored Procedure and do exec <sp_Name> in the on the OLEDB SQL command entry
0
 

Author Comment

by:motioneye
ID: 35016623
I did try with stored procedures, it still show me same results.. do you have any idea how to work on this ?
0
 
LVL 15

Assisted Solution

by:derekkromm
derekkromm earned 250 total points
ID: 35016811
Like BCUNNEY said, it doesn't make any logical sense.

You can only return a single result set at a time.

The only way something like that would work is if they had the same columns and you unioned the 2 statements together.

If you explain what you're logically trying to do w/ both statements, we may be able to find a workaround for you by re-writing the T-SQL.
0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 35017486
Yes as derek has said, we need to know more about what you are trying to achieve, so the more information you can give about the purpose of what you are trying do in SSIS, the better overall solution and advice we can give you
0
 

Author Closing Comment

by:motioneye
ID: 35018787
Hi,
Just had workaround on it, tq for your guys support
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up 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.

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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 ?
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
Via a live example, show how to shrink a transaction log file down to a reasonable size.

840 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