none
creating a view based on a delimiter

    Question

  • Is there a way in SQL to create a view that can separate a column by a Delimiter.

                  The issue I have run into is that I have a non-relational database, that I need to setup relations for to run reports (re-design isn't really an option).  So if I have the following below:

    Table 1: has an Letter column and multiple other columns that I don't need.

    Table 2: has an Id column and a column that can contain 0 to many Letters separated by ;'s and multiple other columns that I don't need.

    View: must at a minimum have 1 of each of the Id's. [] is the table and () is 1 item and a "," separates columns.

    Table 1: [ (A) (B) (C) ]

    Table 2: [ (1, A;B) (2, A;C) (3, C) (4,) ]

    View: [ (1,A) (1,B) (2,A) (2,C) (3,C) (4,) ]

    Wednesday, February 26, 2014 7:33 PM

All replies