dbTalk Databases Forums  

Simple Question

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Simple Question in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roy @ Work
 
Posts: n/a

Default Simple Question - 08-14-2004 , 04:30 PM






Ok, I have a DTS package. Within that package I want to create
a vbscript object that shoots up a message box with the total number
of records in a given table. I must be missing something, because I
can't figure out how to set a "select count(*) from testtable" sql statement
equal to a vbscript variable (which I would then place within a msgbox
function, i.e., "msgbox(x)"). Make sense?

Any help is appreciated, thanks.

-Roy



Reply With Quote
  #2  
Old   
Roy @ Work
 
Posts: n/a

Default Re: Simple Question - 08-15-2004 , 05:36 AM






See, I knew it'd be simple.
Thanks!

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
OK

Using SQL Server 2000

Use an ExecuteSQL task and do

SELECT Count(*) as Amount from MyTable

now hit the Parameters button and assign "Amount" to a Global variable

Now in your Active Script task do you MsgBox thing

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Roy @ Work" <spam (AT) blah (DOT) com> wrote in message
news:2ocnenF96oj2U1 (AT) uni-berlin (DOT) de...
Ok, I have a DTS package. Within that package I want to create
a vbscript object that shoots up a message box with the total number
of records in a given table. I must be missing something, because I
can't figure out how to set a "select count(*) from testtable" sql
statement
equal to a vbscript variable (which I would then place within a msgbox
function, i.e., "msgbox(x)"). Make sense?

Any help is appreciated, thanks.

-Roy







Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Simple Question - 08-16-2004 , 11:50 PM



OK

Using SQL Server 2000

Use an ExecuteSQL task and do

SELECT Count(*) as Amount from MyTable

now hit the Parameters button and assign "Amount" to a Global variable

Now in your Active Script task do you MsgBox thing

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Roy @ Work" <spam (AT) blah (DOT) com> wrote

Quote:
Ok, I have a DTS package. Within that package I want to create
a vbscript object that shoots up a message box with the total number
of records in a given table. I must be missing something, because I
can't figure out how to set a "select count(*) from testtable" sql
statement
equal to a vbscript variable (which I would then place within a msgbox
function, i.e., "msgbox(x)"). Make sense?

Any help is appreciated, thanks.

-Roy





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.