Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I am getting a strange Load script error while using Include syntex.. but if I just use SQL query instead of include file then it works fine.
About my Application:
This is a staging application only used for creating QVD files
This is how it works..
Products: // Table Name
SQL $(Include=$(vSQLpath)Products.sql) ; // vSQLpath = the location of SQL script folder
STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.
It runs 10 different SQL scripts like this and creates 10 different QVD files.
But this error message only appears in 2 - 3 tables and those scripts is not even complex SQL query.,. it is just selecting 4 columns from one single table in SQL.
I have attached SQL Script and Log file in this post.
Thanks
Are you sure that the Text files only contains ascii character?
Which application do you use to create them?
Regards
Norbert
Have you tried directly instead of include statement... Like
Products: // Table Name
Load *;
SQL SELECT dbo.ReportType.ReportTypeID AS [@ProductId],
dbo.ReportType.Name AS [Product Name],
dbo.ReportType.ServiceType AS [Product Category],
dbo.ReportType.Code AS [Product Code],
dbo.ReportType.ProviderType AS [Division]
FROM dbo.ReportType;
STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.
The text file you include with SQL might be stored in UTF-8 format with a BOM (Byte Order Mark). This could possibly cause this error and it often looks like this. The BOM is two bytes at the beginning of the file which will not be interpreted correctly by software that are not up to date on all variants of text files.
Thanks for reply Settu,
I have tried SQL script instead of the include statement but it is not working on 2 of the tables.
However, those two table queries are working perfectly fine on SQL Server and returning expected result.
Thank you for your advice Petter,
What is a possible solution to overcome this ? I prefer to use include statement because it is easy to version control the source ETL script
Hi Norbet,
SQL scripts are usually saved directly as a .SQL file by using SQL server management studio.
All the other 10 SQL queries were saved using same method and that is why I am confused about why this would show error for only these query!
Hi Lokesh,
Can you post any other SQL script which working?
Hi Settu, Sorry for late reply..
Here is another script.. which is working perfectly fine on SQL Server Management Studio and returning expected result.
SELECT | |||||
FundId, | |||||
FundName | AS [Fund Name], | ||||
FundAdmin | AS [Fund Administrator], | ||||
AdminPhone | AS [Fund Admin Phone], | ||||
AdminFax | AS [Fund Admin Fax] |
FROM dbo.Funds |
Not sure, but have you tried without dbo.ReportType ?
Like
Products: // Table Name
Load *;
SQL SELECT ReportTypeID AS [@ProductId],
Name AS [Product Name],
ServiceType AS [Product Category],
Code AS [Product Code],
ProviderType AS [Division]
FROM dbo.ReportType;
STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.