K
kevin.jennings
I'm writing a C# program to read from an Access database table called
LocationDetail. This table is made up of two columns: Location,
DiscDate. It looks like this:
0000001234 122590
0000001234 102207
0000001234 000000
1237847623 102207
1237847623 071395
4545454545 031206
4545454545 000000
and so on...
The first column denotes a location, the second a disconnect date.
If
the date is '000000' that means the location is active. So, that means
that location 0000001234 above is a currently active location with two
previous disconnects.
What I'd like to do is go through this table and only 'fetch' the
locations that do not have a DiscDate of '000000'. In this instance,
looking at the data above, I'd only want location 1237847623 because
it is the only location that doesn't have a DiscDate that is equal to
'000000'. It has two entries and both have a valid disconnect date.
That means that this location is still "inactive" and that's what I
want to find: All inactive locations.
My C# program currently loads the entire LocationDetail table into a
dataset in the program. I'm assuming that I have to use SQL-like
commands to act on this dataset and pull only the locations I require
from it. But, I have no idea how to do that. Can someone show me an
example?
Thanks,
Kevin
LocationDetail. This table is made up of two columns: Location,
DiscDate. It looks like this:
0000001234 122590
0000001234 102207
0000001234 000000
1237847623 102207
1237847623 071395
4545454545 031206
4545454545 000000
and so on...
The first column denotes a location, the second a disconnect date.
If
the date is '000000' that means the location is active. So, that means
that location 0000001234 above is a currently active location with two
previous disconnects.
What I'd like to do is go through this table and only 'fetch' the
locations that do not have a DiscDate of '000000'. In this instance,
looking at the data above, I'd only want location 1237847623 because
it is the only location that doesn't have a DiscDate that is equal to
'000000'. It has two entries and both have a valid disconnect date.
That means that this location is still "inactive" and that's what I
want to find: All inactive locations.
My C# program currently loads the entire LocationDetail table into a
dataset in the program. I'm assuming that I have to use SQL-like
commands to act on this dataset and pull only the locations I require
from it. But, I have no idea how to do that. Can someone show me an
example?
Thanks,
Kevin