I have three SQL views that are linked to my Access 2007 database. I need to insert three fields into either a query or another table based on a case statement. I am using Excel to accomplish this right now but it is painfully slow.
If someone can help me with the first one, I should be able to replicate the process.
In the first linked table, I have a field Gauge. The field is a text field. I need to create three new fields in the database. DecIn, DecOut and DecAvg. The case statement works like this:
Case 1
If Gauge contains "/" then give me everything left of the "/" in DecIn and change to Integer, everything right of "/" in DecOut and change to Integer and then DecIn+DecOut/2 in DecAvg.
There are several other cases. In Excel I actually create a column called GaugeType to determine which condition I was dealing with. I could do the same thing here if necessary.
I have a few other fields where I will do basically the same thing. One of the fields is going to just link to another table and cross reference the matched field.
I have found 18 different conditions that exist in the field, so the case statement is the only way I know of to accomplish the task. I am hoping that Access can process the information faster than Excel. My goal is to use the table in the same Excel spreadsheet and allow the user to see the information immediately without have to update everything within Excel.
TIA
If someone can help me with the first one, I should be able to replicate the process.
In the first linked table, I have a field Gauge. The field is a text field. I need to create three new fields in the database. DecIn, DecOut and DecAvg. The case statement works like this:
Case 1
If Gauge contains "/" then give me everything left of the "/" in DecIn and change to Integer, everything right of "/" in DecOut and change to Integer and then DecIn+DecOut/2 in DecAvg.
There are several other cases. In Excel I actually create a column called GaugeType to determine which condition I was dealing with. I could do the same thing here if necessary.
I have a few other fields where I will do basically the same thing. One of the fields is going to just link to another table and cross reference the matched field.
I have found 18 different conditions that exist in the field, so the case statement is the only way I know of to accomplish the task. I am hoping that Access can process the information faster than Excel. My goal is to use the table in the same Excel spreadsheet and allow the user to see the information immediately without have to update everything within Excel.
TIA