Showing posts with label output. Show all posts
Showing posts with label output. Show all posts

Thursday, March 29, 2012

Creating an asynchrous output

Are there any good examples creating an asychronous output. I need to be able to output the values from the input as well as adding 7 new columns to each row.

http://msdn2.microsoft.com/en-us/library/ms136133.aspx

The answers are available, you just need to search for them. I found the link above by typing "asynchronous component code ssis" into Google.

-Jamie

|||

Also, be aware that just because you need to add columns to a row does not mean that you need to use an async output. You need to use an async output only if you need to hold onto data longer that the ProcessInput call or if you need to generate more rows going out than coming in. Generally, if one of those 2 conditions don't apply then you can use a sync output, which I would highly recommend because it is significantly simpler.

HTH,

Matt

|||

Matt David wrote:

Also, be aware that just because you need to add columns to a row does not mean that you need to use an async output. You need to use an async output only if you need to hold onto data longer that the ProcessInput call or if you need to generate more rows going out than coming in. Generally, if one of those 2 conditions don't apply then you can use a sync output, which I would highly recommend because it is significantly simpler.

HTH,

Matt

And it executes quicker!

Wednesday, March 21, 2012

Creating a store procedure with output parameter

Hi all,
Could someone give me an example on how to create and execute the store procedure with using output parameter?
In normal, I create the store procedure without using output parameter, and I did it as follow:
CREATE PROC NewEmployee
(ID int(9), Name Varchar (30), hiredate DateTime, etc...)
AS
BEGIN
//my code
END
GO
When i executed it, I would said: Execute NewEmployee 123456789, 'peter mailler', getDate(), etc...
For output parameter:
CREATE PROC NewEmployee
(ID int(9), Name Varchar (30), hiredate DateTime,@.message Varchar(40) out)
AS
BEGIN
insert into Employee .....
//if error encountered
set@.message = "Insertion failure"
END
GO
Exec NewEmployee 123456789, 'peter mailler', getDate(),do I need to input something for the output parameter here?

Anyone could give me an example on how to handle the output parameter within the store procedure coz I am not sure how to handle it?
Many thanks.



Hi,

when calling EXEC newEmployee... you need ti declarare a parameter, assign it to the call and then you'd get the output value from it.

DECLARE @.msg nvarchar(40);
Exec NewEmployee 123456789, 'peter mailler', getDate(),@.msg;

-- Here you could access @.msg to get what was outputted

Monday, March 19, 2012

Creating a PowerPoint Slide/PPT from Reporting Services Output

Hello,
I am trying to copy the rendered output from Reporting Services to create a
PowerPoint presentation. I understand that it is not possible to directly
render to a PPT and I am able to do so by saving the output IMAGE stream to a
file, and then loading PPT sildes from that file. However, my server will
have numerous hits and this is a very costly operation (in terms of disk
usage and performance). Is there any way or 3rd party tool by which I can
convert the Reporting Services output to a PPT without using an intermediate
file?
Thanks,
Ajay.It would take a lot of coding, but you could write a custom rendering
extension. PowerPoint is easy to automate; its object model is quite
straightforward. But from what I hear, custom rendering extensions are very
very (very very?) difficult to write! Your idea of saving to an image and
loading the image is probably the shortest path to a PPT solution.
Alternatively, you may be able to write or find a third-party solution that
will take HTML output and convert it to PPT. Either way, you're probably
either going to do some streaming or intermediate file handling.
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Ata" <ajay.abraham@.wipro.com> wrote in message
news:55EEA9F0-3618-4F3A-9BF8-3AD1C50EC89C@.microsoft.com...
> Hello,
> I am trying to copy the rendered output from Reporting Services to create
> a
> PowerPoint presentation. I understand that it is not possible to directly
> render to a PPT and I am able to do so by saving the output IMAGE stream
> to a
> file, and then loading PPT sildes from that file. However, my server will
> have numerous hits and this is a very costly operation (in terms of disk
> usage and performance). Is there any way or 3rd party tool by which I can
> convert the Reporting Services output to a PPT without using an
> intermediate
> file?
> Thanks,
> Ajay.|||I just finished doing a ppt presentation using print screen to capture the
window. Then I used the cropping and drawing tools within powerpoint to clip
out areas I wished to focus on, or render the whole window if that's what I
wanted. It was a simple process. You many want something different, but
there's a lot to be said for easy.
"Ata" wrote:
> Hello,
> I am trying to copy the rendered output from Reporting Services to create a
> PowerPoint presentation. I understand that it is not possible to directly
> render to a PPT and I am able to do so by saving the output IMAGE stream to a
> file, and then loading PPT sildes from that file. However, my server will
> have numerous hits and this is a very costly operation (in terms of disk
> usage and performance). Is there any way or 3rd party tool by which I can
> convert the Reporting Services output to a PPT without using an intermediate
> file?
> Thanks,
> Ajay.|||I'm working on copying the RS output image stream to the clipboard and from
there to PPT. However, there are some format-related issues as the RS output
is binary data but PPT expects a bit more sophistication I guess. Thanks for
the information.
Regards,
Ajay.
"Jeff A. Stucker" wrote:
> It would take a lot of coding, but you could write a custom rendering
> extension. PowerPoint is easy to automate; its object model is quite
> straightforward. But from what I hear, custom rendering extensions are very
> very (very very?) difficult to write! Your idea of saving to an image and
> loading the image is probably the shortest path to a PPT solution.
> Alternatively, you may be able to write or find a third-party solution that
> will take HTML output and convert it to PPT. Either way, you're probably
> either going to do some streaming or intermediate file handling.
> --
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com|||Sorry! I'm not sure I understood you properly. Are you using the Print Screen
key on the keyboard or doing this programmatically in some way?
"CGW" wrote:
> I just finished doing a ppt presentation using print screen to capture the
> window. Then I used the cropping and drawing tools within powerpoint to clip
> out areas I wished to focus on, or render the whole window if that's what I
> wanted. It was a simple process. You many want something different, but
> there's a lot to be said for easy.

Thursday, March 8, 2012

Creating a heirarchical output from SQL statement

This may be a basic question, but defining anything other than a cursor
is preffered.

I have, as an example, 2 tables. One with customer data (addresses,
phones, etc), the other is a listing of all 50 states (a cross reference
for short state alias to long state name, i.e. FL - Florida, etc...).

I want to sort the out put by state long name, and show each customer in
the state ... BUT ...
the output needs to be like so:

Florida
ABC,Inc Address1 City, State Zip, other Info
Dummy Corp Address1 City, State Zip, other Info
...
Georgia
XYZ, Inc Address1 City, State Zip, other Info
...
etc ...

This is a basic heirarchical listing. Can this be done with a single
T-SQL statement or are cursors needed?

Thanks in advance.

"Excellence is achieved through 1% inspiration and 99% perspiration." A.
Einstein

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!>> the output needs to be like so: ... <<

That is a report; SQL is not a report writer; you need to do this in
the front end with a report writer. This is the whole idea of
client/server architecture.

Creating a group at run-time

I have a request for a report to allow the user to render the output grouped
by start of last name (A's, B's, C's, etc) and have each group print on its
own page. This action would be controlled from a report parameter ideally
and the user would be able to toggle from normal output to this grouped
style. Creating a new group on the first character of the last name and
setting Page Break after was easy. The problem that I am having is how to
enforce the toggling of styles. The Visibility property of the group doesn't
appear to do what I want. Can groups be created at run-time? What is the
best way to achieve what I am after?
ThanksPlease check this article about dynamically changing groupings in a report:
http://blogs.msdn.com/chrishays/archive/2004/07/15/184646.aspx
In your particular situation, you would want to group on the first character
of the last name or group on a constant value in the other case (read step 3
in the article carefully).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:C3BEEC01-9974-49B6-A2C8-94084374CBC5@.microsoft.com...
> I have a request for a report to allow the user to render the output
grouped
> by start of last name (A's, B's, C's, etc) and have each group print on
its
> own page. This action would be controlled from a report parameter ideally
> and the user would be able to toggle from normal output to this grouped
> style. Creating a new group on the first character of the last name and
> setting Page Break after was easy. The problem that I am having is how to
> enforce the toggling of styles. The Visibility property of the group
doesn't
> appear to do what I want. Can groups be created at run-time? What is the
> best way to achieve what I am after?
> Thanks

Friday, February 17, 2012

Create XML tags from data in a 'FOR XML' query?

I am writing a long stored procedure to produce an XML output from a
relational database. For the most part (with help from these forums), it's
going well.
New question: I have a table we'll call 'Facets'. A simplified subset of
its columns include
facet_guid
facet_id
facet_type
facet_value
Is there a way to configure the query to create a set of elements from this
table using "facet_id" as the element name and "facet_value" as the value of
the element?
If not, I'm faced with the prospect of creating a function to pivot the
table, which would cause further problems in that I have a lower-level table
that I need to associate with each facet (via sub-query) using the facet_gui
d.
Any assistance would be appreciated. Thanks!Hello Grelan,
The best way to do this would be build up the command as a string (in T-SQL
or otherwise), the use sp_executesql to get the job done. Where you'll first
run into problems is that column names can't be resolved from a variable.
Thanks,
Kent Tegels
http://staff.develop.com/ktegels/

Create XML tags from data in a 'FOR XML' query?

I am writing a long stored procedure to produce an XML output from a
relational database. For the most part (with help from these forums), it's
going well.
New question: I have a table we'll call 'Facets'. A simplified subset of
its columns include
facet_guid
facet_id
facet_type
facet_value
Is there a way to configure the query to create a set of elements from this
table using "facet_id" as the element name and "facet_value" as the value of
the element?
If not, I'm faced with the prospect of creating a function to pivot the
table, which would cause further problems in that I have a lower-level table
that I need to associate with each facet (via sub-query) using the facet_guid.
Any assistance would be appreciated. Thanks!
Hello Grelan,
The best way to do this would be build up the command as a string (in T-SQL
or otherwise), the use sp_executesql to get the job done. Where you'll first
run into problems is that column names can't be resolved from a variable.
Thanks,
Kent Tegels
http://staff.develop.com/ktegels/