-
Populating Matrix Table
Hi,
I need to populate a table with a matrix of Y and N values.
i.e.
TABLE A
(COL1 CHAR(1),
COL2 CHAR(1),
COL3 CHAR(1),
COL4 CHAR(1)
)
The values would be
COL1 COL2 COL3 COL4
row 1 Y Y Y Y
row 2 N Y Y Y
row 3 N N Y Y
....
The idea is that there would be a row for each possible combination of Y and N values.
Does anyone have some suggestions on how I would populate this via a SQL Stored Procedure?
Thanks
-
You can use a loop to go through 1 to 16, get 4 bit binary value of the number and parse each bit for Y and N. Then insert into table.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|