SQL Lookup table as configuration table for join

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



SQL Lookup table as configuration table for join



I have a data table that looks like this


DEV_SERIAL | PIN_PAD_SERIAL|TERM_PROTOCOL| LOC_SFTWR_VRSN |DEVICE_SUBTYPE
30618334 30618334 0 K0737 0



I have a requirement for a derived column based on conditions for each one of these fields and the business wants to maintain a lookup table with all the conditions so that it can be used as a lookup table to join .
few of the conditions are



first 2 characters of dev_serial =30 and first two character of pin_pad_serial = 30 and term_protocol can be anything ( which means no filter on term protocol) and loc_sftwr_vrsn starts with alphabet or loc_sftwr_vrsn has no filter etc .



i would like to have a generic left join with this lookup table and i am confused how to design this lookup table with all these options.



could someone help me with this please ?
reply if i have not explained this enough and i can share more details .





What have you tried so far? Can you provide expected results? (It would also be helpful to provide more than 1 example).
– Larnu
Aug 10 at 15:36






What is the payload of the lookup table? that is, for each condition, what do you want to look up?
– user1443098
Aug 10 at 15:45









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS