Error Handling Of Inner Join 关注

0
Avatar
Legacy Poster

Hi,

 

I have a cvs file and an Excel file, and I am doing an inner join to fetch a value in the Excel file corresponding to one of the field in the cvs file.

 

My problem is that I want to be able to print the label even if the value is not found in the Excel file, ignore the "no record found" error and print a default value. Is that possible?

 

Thank you!

2 评论

0
Avatar
Gene Henson
评论操作 固定链接

By definition, the Inner join will only bring back rows where the data in your join field in each database matches exactly.  In order to get the data that you need, you'll actually need to make an Outer Join, which will allow you to always get records from one table and matching records from the other table whenever they are present.  Unfortunately, BarTender only allows you make "Inner Joins" when using multiple database types (in your case, a Text file and an Excel file). 

 

If there is any way to get your data into multiple tables in a single database (Excel, Access, SQL Server, etc.), then you can configure an Outer join in BarTender to get the desired behavior.

0
Avatar
Legacy Poster
评论操作 固定链接

Thanks for your answer!

I cannot get my data in a single database, is there any other solution? 

Is it possible to do it with some VB scripting?

请先登录再写评论。