I've looking into PIVOT and UNPIVOT which I don't believe will work, and utilizing an OUTER APPLY may work, but hamfisted attempts have not yet been successful. The database I'm working on is stupid, pointless, frivolous, and mostly just a learning
tool for me to figure a few things out, while having fun with one of my video games. So, to get the embarrassing aspects out of the way, the database is a Move/Combo list for characters in Mortal Kombat 4. (yes, i know, don't ask).
I lined it up as several list tables (basically what i call tables that rarely if ever change, but are used as parent tables in FK relationships. A good example is lst_Buttons. THis is the list of U,D,F,B,HP,HK with a description, Abbreviation
and PK ID integer. Once the buttons are added to this table, they are never messed with again, but having them in a table makes it easier to link them into the junction table of tbl_Moves and lst_Buttons, called tbl_MoveKeys. So, like a basic move
is Jump Kick,thus tbl_Moves has ID: 1, Move: 'Jump Kick'. tbl_MoveKeys has MoveID 1, ButtonID 1, MoveID 1, ButtonID 6, and thus a silly little formatting function returning an NVARCHAR for a computed column in tbl_Moves is Command: U+HK.
I then have several other table like Locations, Weapons, Combos, and Characters. Now, understandin
View Complete Post