Hi,
You can use the 'isdate' function to check for valid dates
See if code below helps:
DECLARE @DateTable TABLE
(
DateValue char(8)
)
insert into @DateTable(DateValue)
select '20170101'
union
select '2017101'
union
select '20170201'
union
select '20170231'
union
select '20170101'...
Hi,
Is there only a single carriage return per "line"?
I have used the replace before to clean a line break in sql (characters 10 and 13).
select replace(replace([ColumnName],char(10),''),char(13),'') as ColumnNameCleaned
from TableName
Not sure if this will assist you.
Thanks
Michael
Hi,
You can put the data into staging tables then in file one you can take the right 7 characters to match to file 2:
Select right(columnName,7) from tableName
Thanks
Michael
Does your csv have " (double apostrophe) around the fields? If so, set your text qualifier to " (double apostrophe) for your flat file source.
Thanks
Michael
Hi,
This code should do it as per combos first suggestion:
DoCmd.TransferSpreadsheet TransferType:=acExport, SpreadsheetType:=acSpreadsheetTypeExcel9, TableName:="Query1", FileName:="C:\test\template.xls", Range:="exportRange"
Dim XL As Object
Set XL =...
Glad you got it working - as an after thought, was the successful import the same file or a different file? Wondering if it could have been a specific data issue to cause the failure.
Hi,
The way I would do this is I would import the data into a staging table - this table has no constraints etc - i.e. the data gets imported 'as is'. I would then have a separate 'Execute SQL Task' in the package to identify the valid records and insert then insert these valid records into the...
Another option if you don't want to use the Foreach Loop Container is you could have 3 separate Data Flow Tasks in one package - 1 for each file.
Thanks
Michael
Is this something that needs to run on a regular basis or a once off?
In SSIS using the Foreach Loop Container is what can be used to process multiple files. It allows you to grab a file, do something with it, then grab another file and do something with it etc etc.
If you read up on Foreach...
Are you developing on the server itself? Is "D:\Paragon import files\Testing\Todaysfile.csv" the location of the file on the server or is it somewhere else on your network?
Thanks
Michael
Do you have MS Access, I would probably do it there rather than in excel.
I would create a complete list of sequential numbers in a table. i would then import the data from excel into a table. Then I would do an outer join to get the result you need and export back to excel.
Thanks
Michael
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.