Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

applymap file reference

I have the following code:

repcode.PNG

and when it runs, I get the following error message:

rep.png

Why is ApplyMap inserting the local disk\folder reference (R:\VC\) before the file reference? All the other references to

Webadmin.dbo.xxxx work fine. I even tried loading the entire Rep file (select * from Webadmin.dbo.Rep) in front of the

ApplyMap statement, and that worked fine. It's only in the ApplyMap that the reference is getting changed.

Any ideas why? Thanks, Kevin.

6 Replies
sunny_talwar

may be you need SQL Select * from in there like other tables.

RepMap:

Mapping

LOAD Rep_UID,

RPC_NAME;

SQL Select *

FROM Webadmin.dbo.Rep;

Not applicable
Author

Hi Sunny,

Thanks, but according to Henric's documentation and the HELP file, that's not needed.

Don't join - use Applymap instead

sunny_talwar

I don't see any mention of not needing to use SQL Select *?

Not applicable
Author

According to both sources, the syntax is

Mapping ( loadstatement |selectstatement )

Examples:

Mapping LOAD * FROM x.csv

If I have the LOAD statement (which I do), I don't need a SELECT statement as well.

sunny_talwar

Is Webadmin.dbo.Rep a Excel file? or something from a database?

Not applicable
Author

Webadmin is a database. Hence the file spec: webadmin.dbo.Rep

I have used ApplyMap before and never had this issue.