I have three Database tables (views, actually) Members, Claims, and Rewards.
Rewards carries a reference to members.
Claims carries a reference to Members as well.
Claims and rewards have a complicated relationship. Not all rewards are a result of claims, and a single claim may result in more than one reward. In the underlying database there are intermediary transactional tables that define the relationship between claims and rewards. (it requires that I traverse two intermediary tables to get from claim to reward)
I've created a view which by convention I've called Claims__Rewards. Effectively, this view takes the place of a bridge table, so each record in the view contains a reference to a claim, and a reward.
When I attempt to load these 4 views into QlickView, the script runs successfully, but after loading all of the records, it tells me that the script failed, without any further verbose description of the problem. Stepping through the code yields no errors until after the last line of the script, where I get the same failure message.
By way of debugging, I added a reference on the bridge table to the members table, to see what would happen. When I load all of these tables into QlickView, I get no errors at all, and all of the tables are linked (looking at the table linking view, I see that the application has created some additional bridge tables of its own to rationalize the relationship) However, the functionality I want (which is to identify a specific claim, and be able to see only the rewards that resulted from it) doesn't work. Instead, by selecting a specific claim record, I see all rewards for that user. (which makes sense based on the table structure I'm seeing).
I can certainly include the script I'm working with, if that's helpful, but I think that the problem is logical, rather than syntactical.
From the incomplete information you provided (the data model doesn't match the script), you got at least one loop here. notice MEMBERID in MEMBER, USER_CLAIMS, and USER_REWARD, and at the same time USER_CLAIMS and USER_REWARD connected by the last SELECT in your script (not in the data model). Usually you don't have the result that the reload collapses, but it may happen.
I'd recommend to review the data model, probbaly join some logical tables to avoid the loops.
I see you got it already while I was looking into the script...
You don't have to break it into two aplications, although you can if it's your preference. The common approach is to join or concatenate transactions table. For example, consider concatenating USER_CLAIMS and USER_REWARD into one table. See if it fits your business needs.
Hi Oleg, I'm afraid that I can't post the QVW. Even my development environment's data is sensitive, and I'm only just learning the product, so I'm not exaclty sure how I'd create a dummy. It's very possible that I'm either not doing something correctly, or missing some elementary step. I've run into the same problem in a number of places now with my data, with the same failure behavior, where the script completes, and then bails afterwards.
You can scramble the data (see document properties). In this particular case, what is needed is the script. If you cannot share the actaul script, create a similar one, it may be good enough.
The script I can share.
As I said, the script executes all the way through debug, without failing until I close the debug window.
This is the script from my 'quick' sample which fails in the same way.
//ommited connect to, standard OLE DB connection to Oracle.
SQL SELECT AGREEDTOTERMS,
to_date(substr(registrationdate,1,8), 'yyyymmdd') RegistrationDate,
SQL SELECT CLAIMID,
V_ID as UserClaimID
WHERE V_ID is not null;
SQL SELECT EARNEDDATE REWARD_EARN_DATE,
V_ID as UserRewardID,
MESSAGEMERGEVALUE as claimNumber
WHERE V_ID is not null;
Fry wrote:Even my development environment's data is sensitive
See this wiki page for tips on uploading sensitive data:
Thanks for the info! But I'm afraid the QVW wouldn't be a lot of use because the data isn't actually in it. It fails before the data gets loaded. I did post the script above.