Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
RobinhoQlik
Contributor
Contributor

Convert BOM T-SQL query to QlikView script.

Hi,

I am trying to convert the attached T-SQL script to QlikView script, but it's not working. The T-SQL script is developed to generate a Build of Material (BOM) structure. The @ids is the variable which contains ID's from items so it gives the ID's for which a BOM structure should be calculated. The [dbo].[CCM_BOM] table consists of child and parent numbers:

CHILD_PARTNUMBERPARENT_PARTNUMBER
123789
222789
589123

 

So if I execute the T-SQL Script with the @ids = '789' I get following result: (level 0 because its top level)

ItemPARENT_PARTNUMBERCHILD_PARTNUMBERLvlPARTNUMBER_path
7897891230/789/123
7897892220

/789/222

 

Can you help me converting the script to QlikView script?

Labels (4)
4 Replies
Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post, believe that should help you with things:

https://community.qlik.com/t5/Qlik-Design-Blog/Bill-of-Materials/ba-p/1462792

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
RobinhoQlik
Contributor
Contributor
Author

Hi Brett,

Thanks for the respond, I already looked at it but it will not fullfill my needs. We can have BoM's of more than 50 levels. And parts can be used in multiple BoM's. Levels are not clear, we only have parent child relation.

Regards,

Robbin

Brett_Bleess
Former Employee
Former Employee

I would venture in that case you are likely going to have to start a discussion with your account manager and services to see if they can arrange for one of the consultants to review the use case etc. and see if they can come up with any ideas, I am doubtful Community is going to get you the response you want on this one, as it sounds like this is pretty entailed use case.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
wgonzalez
Partner - Creator
Partner - Creator

Hi Robinho,

Did you find the script needed to explode the BOM?  Can you share it?

Thanks,

Wilfredo