Hi..
I have 2 tables. 1st table with codes and values. 2nd table with codes.
Example of what I am trying to do.
1st table
[BodySys] [PrimCode] [Primval] [SubCode] [SubVal]
BL SCC 2
BL SCC U 1
BL SCC N 1.5
2nd table
[BodySys] [Clin1] [Clin1sub] [SIscore]
BL SCC U ?
ok..i hope u now have a clear idea of my tables.
Now what I need to do is work out the SIscore field.
I see that it says BL in the bodysys, so I lookup BL in 1st table. Found! then I look at Clin1 field and its says SCC(relating to primcode in the 1st table). So now lookup BL and SCC in 1st table. it says BL........SCC.......= 2 (from primval in 1st table).
Now we have 2 as a result, BUT...if we look under Clin1sub it says U. So this means going back to the 1st table and looking for BL......SCC.......U....= 1 (from subVal in 1st table). This = 1.
So this means: 2 + 1 = 3(SIscore field result).
I need help in coding this. Please help, as I am really struck and feel abit lost in the coding area. Do I use SQL or VB and what would be the code for a task like this.
You help is appreicated. Thankyou in advance.
Ruby
I have 2 tables. 1st table with codes and values. 2nd table with codes.
Example of what I am trying to do.
1st table
[BodySys] [PrimCode] [Primval] [SubCode] [SubVal]
BL SCC 2
BL SCC U 1
BL SCC N 1.5
2nd table
[BodySys] [Clin1] [Clin1sub] [SIscore]
BL SCC U ?
ok..i hope u now have a clear idea of my tables.
Now what I need to do is work out the SIscore field.
I see that it says BL in the bodysys, so I lookup BL in 1st table. Found! then I look at Clin1 field and its says SCC(relating to primcode in the 1st table). So now lookup BL and SCC in 1st table. it says BL........SCC.......= 2 (from primval in 1st table).
Now we have 2 as a result, BUT...if we look under Clin1sub it says U. So this means going back to the 1st table and looking for BL......SCC.......U....= 1 (from subVal in 1st table). This = 1.
So this means: 2 + 1 = 3(SIscore field result).
I need help in coding this. Please help, as I am really struck and feel abit lost in the coding area. Do I use SQL or VB and what would be the code for a task like this.
You help is appreicated. Thankyou in advance.
Ruby