Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Invalid character value for cast specification

$
0
0

Hi Experts,

Im developing a package with an OLE DB Source query below:

SELECT     r.OrganizationUnit, r.Position, CONVERT(varchar(10), r.StartDate, 10) AS StartDate, CONVERT(varchar(10), r.EndDate, 10) AS EndDate, r.Person, r.Factor,
                       r.ReasonCode, r.[Mass hire project], r.LeaveType, r.Cust_IsLeave, r.[Leave Balance], r.Duration, r.Department, r.[Cost center], r.Purpose,
                      r.[Purpose Option 1], r.[Purpose Option 2], r.[Purpose Option 3], r.ApprovedDisEmbark, r.ApprovedEmbark
FROM         tblResult AS r INNER JOIN
                      tblVessel AS v ON r.OrganizationUnit = v.OrganizationUnit
WHERE     (r.StartDate = ?) AND (r.EndDate = ?) AND (v.Vessel = ?) AND (r.ApprovedEmbark = 'Approved') AND (r.ApprovedDisEmbark = 'Approved')
ORDER BY r.Person DESC

I have three variables named startdate, enddate and vessel (string type), their values in BIDS are 0. when I ran the package, in BIDS, i encountered the error

An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Invalid character value for cast specification".

 The pacakge simply extracts data from an SQL Table, based on the query above, then dumps the data  to an excel sheet.

Thanks,

Richie Neil


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>