insert into select failing and read only tables

2002-04-11 Thread inandjot

SQL SQL SQL SQL

hi,
i have 2 problems here.

1)
i have 2 tables:

currency  rates
+-+  ++
| code char(3)|  | currency char(3)   |
| name varchar(10)|  | rate double|
| bcurrency char(1 )  |  | ryear varchar(4)   |
| |  | rmonth varchar(10) |
+-+  ++

I'm have a form, from which i pick 2 value 2000 and february.
I'm trying to insert fields form currency to rates, matching
particular conditions in order to avoid data duplication.
The rate table basically has the exchange rate for a particular
currency in a particular year and a particular month.
The trio currency,ryear,rmonth SHOULD be unique.

My query is the following:

insert into rates (currency,ryear,rmonth)
select a.code, 2000, february  from currency a, rates b
where a.bcurrency=N and a.codeb.currency and
b.ryear=2000 and b.rmonth=february


The error message i get is: INSERT TABLE 'rates' isn't allowed
in FROM table list.
How can i solve this problem??

PS:This query works well when i don't add the condition after the first
condition in the where clause.


2)
i have a read only table! error message when i try to execute a insert
into ...select
from a program.
How can i check this status of the table??
Is there a command to tell me which table is read only at a particular time?




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MyODBC on win98

2002-04-09 Thread inandjot

hi,
i'd like to know which ODBC driver is most suitable, fast and reliable for
win98.
I tried myodbc 2.50.39, but the dll was faulty, i had to replace it by the
2.50.36(on win2k!).
On win98 now am using the latest 3.51.01, but it has slown down the machine
so much, it's incredible.
So now am using on both OS Mysql 3.23.49 as well as:
-2.50.36 with Borland BDE 3.0 on win2k
-3.51.01 with Borland BDE 3.0 on win98
Can anybody advice me on the best ODBC drivers to use to get the maximum
speed of it.
Thanx




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php