dts help

dts help

Post by mimi » Sun, 12 Nov 2000 04:00:00



I am having this script work, i want it to select LAST_BILL_DAY_OF_MONTH
from  TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "

and then compare it with my variable Lastdate
if it is the same then it's successfull if not it isn't successfull

************************************************************************
Function Main()
'Set ADO connection properties.
     set cmd = CreateObject("ADODB.Connection")
    cmd.provider = "sqloledb"
     cmd.Properties("Data Source").Value = "EAD_SERVER"
     cmd.Properties("Initial Catalog").Value = "ADI_NPDW"
     cmd.Properties("User ID").Value = "sa"
     cmd.Properties("Password").Value = "mimi"
     cmd.open
MYDATE = 10/11/2000
'Declaring Variables

'Check to see if the variable is numeric
        DIM Lastdate
           mydate = Isdate(Lastdate)

'Create the recordset object
           set rsMRBOR = CreateObject("ADODB.Recordset")

 'Open the MRBOR_FACT table

     rsARBOR.Open " TT1_MRBOR_ACCOUNTING_MONTH_YEAR" , cmd, , , adcmdTable
           Lastdate= "select LAST_BILL_DAY_OF_MONTH from
TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "

MSGBOX Lastdate

if  MYDATE  =    Lastdate Then
 Main = DTSTaskExecResult_Success
end if
End Function

 
 
 

dts help

Post by HSali » Sun, 12 Nov 2000 04:00:00


Mimi,
Your posts are difficult to understand sometimes. Try to give us more
information.
your script is nice but what do you want to do with the last date?

From your syntax, it appears that there is a column called
LAST_BILL_DAY_OF_MONTH
and it appears to be a Yes/No type column .

Perhaps it is a bit column and you want to specify 0 or -1 (-1 = true)
or that is actually a date column and you want to programatically determine
if that date in the last date in the month..
What do you want?
Post a table definition and try to define where you are and what you want to
do.

For example what are you doing with it in a DTS package?

OH, and please avoid cross/multi-posting to different newsgroups.  Most of
the regulars prowl the relevant newsgroups and if your post is clear enough,
someonw will respond.


Quote:> I am having this script work, i want it to select c> from

TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "
Quote:

> and then compare it with my variable Lastdate
> if it is the same then it's successfull if not it isn't successfull

> ************************************************************************
> Function Main()
> 'Set ADO connection properties.
>      set cmd = CreateObject("ADODB.Connection")
>     cmd.provider = "sqloledb"
>      cmd.Properties("Data Source").Value = "EAD_SERVER"
>      cmd.Properties("Initial Catalog").Value = "ADI_NPDW"
>      cmd.Properties("User ID").Value = "sa"
>      cmd.Properties("Password").Value = "mimi"
>      cmd.open
> MYDATE = 10/11/2000
> 'Declaring Variables

> 'Check to see if the variable is numeric
>         DIM Lastdate
>            mydate = Isdate(Lastdate)

> 'Create the recordset object
>            set rsMRBOR = CreateObject("ADODB.Recordset")

>  'Open the MRBOR_FACT table

>      rsARBOR.Open " TT1_MRBOR_ACCOUNTING_MONTH_YEAR" , cmd, , , adcmdTable
>            Lastdate= "select LAST_BILL_DAY_OF_MONTH from
> TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "

> MSGBOX Lastdate

> if  MYDATE  =    Lastdate Then
>  Main = DTSTaskExecResult_Success
> end if
> End Function


 
 
 

dts help

Post by BP Margoli » Mon, 13 Nov 2000 14:03:15


mimi,

Please do not post the same question independently to multiple newsgroups.

Please see my reply in .warehousing.

----------------------------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:> I am having this script work, i want it to select LAST_BILL_DAY_OF_MONTH
> from  TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "

> and then compare it with my variable Lastdate
> if it is the same then it's successfull if not it isn't successfull

> ************************************************************************
> Function Main()
> 'Set ADO connection properties.
>      set cmd = CreateObject("ADODB.Connection")
>     cmd.provider = "sqloledb"
>      cmd.Properties("Data Source").Value = "EAD_SERVER"
>      cmd.Properties("Initial Catalog").Value = "ADI_NPDW"
>      cmd.Properties("User ID").Value = "sa"
>      cmd.Properties("Password").Value = "mimi"
>      cmd.open
> MYDATE = 10/11/2000
> 'Declaring Variables

> 'Check to see if the variable is numeric
>         DIM Lastdate
>            mydate = Isdate(Lastdate)

> 'Create the recordset object
>            set rsMRBOR = CreateObject("ADODB.Recordset")

>  'Open the MRBOR_FACT table

>      rsARBOR.Open " TT1_MRBOR_ACCOUNTING_MONTH_YEAR" , cmd, , , adcmdTable
>            Lastdate= "select LAST_BILL_DAY_OF_MONTH from
> TT1_MRBOR_ACCOUNTING_MONTH_YEAR where LAST_BILL_DAY_OF_MONTH = 'Y' "

> MSGBOX Lastdate

> if  MYDATE  =    Lastdate Then
>  Main = DTSTaskExecResult_Success
> end if
> End Function

 
 
 

1. Visual Basic, DTS, and that DTS Help file

I am trying to program a DTS Package with Visual Basic and having a terrible
time with not only the sparse documentation on this subject but lack of
available materials.

Does anyone know where I can find the DTSPkg.hlp Help File?

It is no where on any of the Beta CDs and I need some more insight on how to
more effeciently work the transformations within the Data Pump.

Also, if anyone else is trying to program DTS Packages with VB let me know
and maybe we can collaborate on some issues.

Thanks in advance,

Mark

2. How to migrate cube

3. How to import multiple files with DTS - HELP HELP

4. FW: Problems with ontape

5. ActiveX / DTS help

6. Financial Project Manager

7. DTS Help Needed Here - PLEASE READ!

8. Can I get Cursor result from stored procedure ?

9. DTS Help

10. DTS help Please....

11. DTS Help

12. DTS help required

13. DTS Help is required