Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Monday, February 27, 2012

How can I get the package name within a script?

Greetings,

I need to programmatically grab the name of the executing package so that it can be used in logging. Does someone have a code sample for this?

Thanks!

Use the system variable, PackageName.|||

Thanks.

For those who may benefit from a code sample:

Dim source AsString

Dim vars As Variables

Dts.VariableDispenser.LockOneForRead("System:Stick out tongueackageName", vars)

source = vars("PackageName").Value.ToString()

|||Also the other options (perhaps not for this example) are to use a derived column to add the system variable to the data flow, or in the control flow, using an Execute SQL task, you can map the variable to a parameter in the SQL statement.

Sunday, February 19, 2012

How can I generate insert statements for sample data?

Hi,
I want to post a question but I want to also include a script for you guys
to create the table on your end as well as some sample data.
I used to have a tool that would take the data in a table and generate a
bunch of INSERT statements. I can't seem to locate it. Could someone please
give me a pointer on where I can find that script?
--
Thanks,
SamSam wrote:
> Hi,
> I want to post a question but I want to also include a script for you
> guys to create the table on your end as well as some sample data.
> I used to have a tool that would take the data in a table and
> generate a bunch of INSERT statements. I can't seem to locate it.
> Could someone please give me a pointer on where I can find that
> script?
www.aspfaq.com/5006
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"|||Find my post of yesterday :)
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:DF35D0A0-C291-4B03-9860-37DF09F92846@.microsoft.com...
> Hi,
> I want to post a question but I want to also include a script for you guys
> to create the table on your end as well as some sample data.
> I used to have a tool that would take the data in a table and generate a
> bunch of INSERT statements. I can't seem to locate it. Could someone
> please
> give me a pointer on where I can find that script?
> --
> Thanks,
> Sam|||To generate Insert statements from the existing data Check out
http://vyaskn.tripod.com/code.htm its really good.
Source code:: http://vyaskn.tripod.com/code/generate_inserts.txt
Best Regards
Vadivel
http://vadivel.blogspot.com
http://thinkingms.com/vadivel
"Mark Nijhof" wrote:

> Find my post of yesterday :)
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:DF35D0A0-C291-4B03-9860-37DF09F92846@.microsoft.com...
>
>|||Try www.sqlscripter.com to generate INSERT, UDPATE, Delete data scripts.
"Sam" wrote:

> Hi,
> I want to post a question but I want to also include a script for you guys
> to create the table on your end as well as some sample data.
> I used to have a tool that would take the data in a table and generate a
> bunch of INSERT statements. I can't seem to locate it. Could someone pleas
e
> give me a pointer on where I can find that script?
> --
> Thanks,
> Sam