Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transformation using CDATE
Message
De
19/09/2000 14:36:06
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
00417891
Message ID:
00418189
Vues:
21
>I assume that any date form determined by ISDATE to be a valid date form should also be transformable using CDATE. The destination SQLServer7 table has a "start_date" field with datetime data type. The source is CSV text with a date form like [01/30/2000 07:17:11]. This date form results from a VFP remote view of an Oracle table, exported to CSV. It is a valid Microsoft datetime while it is in the remote view. ISDATE says it is a valid date form when using the SQL7 Query Analyzer. But when CDATE is used in my DTS transformation, it does not seem to recognize the form as valid. And the Query Analyzer does not recognize CDATE as a valid function.
>


In the query analyzer you can use CONVERT or CAST functions.

>I guess I have the proper syntax. From SQL BOL:
>__________
>Transforming Date Data
>When importing data from a file to an OLE DB destination table, you may need to use the CDATE function to convert date data if the date format is in a text or character field and is not in the format required by OLE DB, which is yyyy-mm-dd hh:mm:ss:sss:
>
>function main()
>
> DTSDestination("Total Sales") = DTSSource("Total Sales ")
> DTSDestination("DestColumnDate") = CDATE(DTSSource("SourceColumnDate"))
>
> Main = DTSTransformStat_OK
>
>end function
>__________
>
>Could my problem be occurring because I'm using ODBC instead of OLE DB?


The required format for the source data is the one you posted above. You are using a different format.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform