Starting Trouble!!Please help!!

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 22
Reputation: isaackhazi is an unknown quantity at this point 
Solved Threads: 0
isaackhazi isaackhazi is offline Offline
Newbie Poster

Starting Trouble!!Please help!!

 
0
  #1
Oct 7th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 306
Reputation: timothybard is an unknown quantity at this point 
Solved Threads: 26
timothybard's Avatar
timothybard timothybard is offline Offline
Posting Whiz

Re: Starting Trouble!!Please help!!

 
0
  #2
Oct 7th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 22
Reputation: isaackhazi is an unknown quantity at this point 
Solved Threads: 0
isaackhazi isaackhazi is offline Offline
Newbie Poster

Re: Starting Trouble!!Please help!!

 
0
  #3
Oct 8th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 306
Reputation: timothybard is an unknown quantity at this point 
Solved Threads: 26
timothybard's Avatar
timothybard timothybard is offline Offline
Posting Whiz

Re: Starting Trouble!!Please help!!

 
0
  #4
Oct 8th, 2008
I was suggesting using vba to loop through each table and then creating a record set based on the table and master table.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC