Knowledgebase

SQL Query help

Posted by davef139, 07-20-2008, 11:12 PM
OK so i've been having some problems. I imported a matrix into my database. its 1000x1000 Im trying to figure out how to do a select statement to get it to return every matrix combo in the for of row, column, result. Its a zip chart so each column is numbered 1-999 and each row is 5-999, each result is a single digit. How can I have it select throught repeatedly? Or is this going to be a bad design itself.

Posted by fx1024, 07-21-2008, 05:15 AM
If you want to know if this is badly designed it's better to tell us what do you want to do. The way you describe it you have to make a table with the following fields: id (medium int unsigned autoincrease) code1 (small int unsigned index) code2 (small int unsigned index) or (an index with both code1,code2) value (tiny int) or (enum 0,1,2,3,4,5,6,7,8,9) you can select any code1 code2 combo you want using a funtion like this

Posted by davef139, 07-21-2008, 10:01 AM
Alright heres what im trying to do I was told having this table with every matrix entry would be a better design instead of looking it up in a huge table. Alright So i have an Excel file that is setup as a matrix that has every zipcode (first 3 digits) on each side, you match them up on the matrix to find the shipping zone which you then can determine the rates.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
RVSkins (Views: 601)
ScarabWeb Review (Views: 607)


Language:

Client Login

Email

Password

Remember Me

Search