Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling specific data from a database field... 1

Status
Not open for further replies.

LeahLady79

Programmer
Jan 27, 2003
9
US
Hello all,

Here is my dilemma. I have to write a program to access data and run reports. The data is being held in Paradox tables that are generated by a seperate program. This program is not designed to access the information that one of our clients now wants (they want to know which sales reps created which presentations in which months and for how much)... and it is not feasible for us to incorporate this new feature to the software package (all about the $$$, I think).

SO, normally this wouldn't be a problem... BUT, since the program wasn't designed to call up the sales rep information, the primary key (which should have been either an auto number or a composite key) is one field that combines sales rep's user name and a date/time stamp.

In order for my program to run the reports that the client is requesting, I need to lose the date/time stamp so that I can group sales information by sales reps.

So, any ideas how I can do this??

Thanks!
 
sounds like you have to sequentially process this information. You could try some advanced SQL to only pull back based on the first part of the field but I doubt if the paradox driver would support it.
 
The SQL LIKE operatior may help.

"SELECT * from ThisTable WHERE PKField LIKE '" & repname & "%'"

The % is a wildcard operator in SQL
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
johnwm,

Quick question on your proposed solution... Can I do that using another field set up with user names? I believe that I could create a new table to hold the user data that the client could enter. In theory, I will not know all the user names and it is not feasible for me to program in each name (some clients have 100+ users on the system). The end-result of this plan is to have this program packaged and installed on the client's network and I will only run tech-support and set up new accounts.

Thanks!
~Leah
 
Yep, just loop through the recordset returned from the username table, using that answer in the previous post's query.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Johnwm...

You are a GENUIS! Thanks much, much, much!

~Leah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top