943,691 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 548
  • VB.NET RSS
Oct 7th, 2008
0

Starting Trouble!!Please help!!

Expand Post »
Im havin a heck of a problem. I have a database with 800 tables. All the tables are the same with the same fields. Each table is a survey form. My table structure is as follows:

FPC_Code | FPC_Product | Price | oos | osd

the above sturucture is the same for all my tables. Now what i have to do is as follows:

I have one master table Which conatins a range of prices which each product can fall between. FPC_Code being my primary key:

FPC_Code | LowerPrice |upperPrice.

Now i have to compare each product in my master table with all the 800 tables and check whether the price in each table falls with in the 'UpperPrice' and 'Lowerprice' price bracket of the master table. Pls note that each table contains 200 products.


I have an idea how to start it but need a lil jump start.

Any help will be much appreciated.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
isaackhazi is offline Offline
22 posts
since Sep 2008
Oct 7th, 2008
0

Re: Starting Trouble!!Please help!!

What is your idea of how to start?

I guess I would make a loop that loops through the list of each table. At each loop, create a sql statement that joins the current table to the master table on the FPC_Code. Within the query, put in a WHERE statement to compare the Price of the records to the LowerPrice and UpperPrice in the master table.

Let me know if that's enough of a jump start.
Reputation Points: 27
Solved Threads: 29
Posting Whiz
timothybard is offline Offline
317 posts
since Mar 2007
Oct 8th, 2008
0

Re: Starting Trouble!!Please help!!

so your suggesting to use SQl to validate it? My idea was load each table into a dataset->datatable and compare each row with the row object. I dunno whether its the optimum way to do it coz im not too great at SQL.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
isaackhazi is offline Offline
22 posts
since Sep 2008
Oct 8th, 2008
0

Re: Starting Trouble!!Please help!!

I was suggesting using vba to loop through each table and then creating a record set based on the table and master table.
Reputation Points: 27
Solved Threads: 29
Posting Whiz
timothybard is offline Offline
317 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: write on random access file
Next Thread in VB.NET Forum Timeline: General VB Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC