• I would like to make a number of recommendations. First of all you should not use really short abbreviations for things. PCKG I assume is Package? Reg_Date...is the RegularDate, RegistrationDate, RegurgitationDate. Your names are all far too generic to be very useful. Status does not give any kind of indication what it means. AccountStatus is a LOT easier to understand.

    In general you seem to want to use natural keys, this is ok but you have some issues with that. Under your current structure a User is unable to change their username. Also, you should not have a column change names between tables. This makes things really painful to work with. Why is IP in the Accounts table? Shouldn't that be in the IPPool table?

    Not really sure what you are trying to accomplish here but the relationships and structures you have established need some work. I would recommend on reading up a bit on referential integrity and normalization.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/