Thanks, that's interesting. Actually the uc.ID column is still type tinyint
as it holds only one number, but are you saying if I change this to varchar
my query will work e.g. 15 = 15:17 would work?
What is the type of the 'uc.ID' column? If it's varchar, your match
will work fine. If it's an integer type, you are going to have a
problem because you have bt.category_ID holding things which can't be
represented as integers and will therefore never match. IF both
column type are being changed here, your query will work fine as is.
- michael dykman
On 6/14/07, Edward Quick <[EMAIL PROTECTED]> wrote:
Hi,
I have the following mySQL query in my script which has been working fine
but due to a recent change, I had to modify one of the columns,
bt.category_ID. This used to be defined as tinyint(3) but I've changed
that
now to varchar(20) as it needs to hold values such as 15, or 74:79 or
43:56:113
In light of that, could anyone tell me what I need to change in my SQL to
get it working please?
Presuambly uc.ID=bt.category_ID won't work anymore.
INSERT IGNORE $visitstable (url_scheme_ID, url_server_ID, url_path_ID,
url_query_ID, url_category_ID)
SELECT DISTINCT usc.ID, us.ID, up.ID, uq.ID,
uc.ID
FROM bulk_table bt
INNER JOIN url_servers us ON us.server=bt.server
INNER JOIN $pathstable up ON up.path=bt.path
INNER JOIN url_schemes usc ON
usc.ID=bt.scheme_ID
INNER JOIN $queriestable uq ON uq.query=bt.query
INNER JOIN url_categories uc ON
uc.ID=bt.category_ID;
Many thanks,
Ed.
_________________________________________________________________
Win tickets to the sold out Live Earth concert!
http://liveearth.uk.msn.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
- michael dykman
- [EMAIL PROTECTED]
- All models are wrong. Some models are useful.
_________________________________________________________________
Win tickets to the sold out Live Earth concert! http://liveearth.uk.msn.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]