how to rewrite this query without using temporary table

2004-04-15 Thread lorenzo.kh
Hi, I have 2 tables.patientrecall_table and appointment_table.The patientrecall_table used to store what is the nextrecall date for the patient while the appointment_tablewill store all the appointments made.Now, I'd like to get through this:"Patients Due for Recall, but No Scheduled

show processlist

2002-09-12 Thread lorenzo.kh
Hi, I am developing a web-based application using java + tomcat + mysql in Win 2000. When the application is running,I try to view the processlist in MS-DOS using the commad show processlist. mysql show processlist; +--+--+-++-+

myisamchk: Can't unlock file (Errcode: 11)

2002-08-09 Thread lorenzo.kh
Hi, I am using mysql 4.0.0-aplha on win 2000 professional. I install mysql in c:\mysql. I write a script ( customerscript.txt) and i save this script in c:\mysql\bin. The contents of customerscript.txt I will paste at the bottom of this mail. Then,I run my script at the command prompt.

Table Locking + Timeout

2002-07-29 Thread lorenzo.kh
Hi, I have a question regard the table locking. Let say there is a table ,mytablename type=MyISAM in my database. And lets say there are 2 users who are currently log in. First user locks a table write: mysql lock tables mytablename write; Query OK, 0 rows affected (0.00 sec) Then,second user

How to get the message that a table is currently locked?

2002-07-22 Thread lorenzo.kh
Hi, Assuming that there are 2 users for MYSQL. First user issues 'lock tables customer_table write'; Second user wish to view the customer info using the command 'select * from customer_table'; This select query will be pending untill the first user issues the 'unlock tables' command. I am

mysql + win 2000 + command prompt

2002-06-27 Thread lorenzo.kh
hi, I had installed mysql 4.0 in win 2000. I used Command Prompt to connect to mysql and do all the sql query there. It is often/normal that we can make mistake in the typing. When i encounter this typing error,the mysql just like 'hang' it there. In order to solve this,the only way i know is

sql query(group by + order by)

2002-06-10 Thread lorenzo.kh
Hi, I got a table named patient_treatment_history Below is some of the records inside the table. patient_id,treatment_date,charges 1014,2002-01-28,20 1001,2002-02-02,100 1026,2002-04-08,74 1001,2002-04-15,85 1014,2002-05-05,50 1030,2002-05-16,125 1030,2002-06-18,180 1001,2002-06-25,125 I try

select * into outfile

2002-04-07 Thread lorenzo.kh
Hi, i am using mysql 4.0.0 version -alpha in windows 2000. i'd like to export the mysql table data to excel format. So,i use the outfile method. mysqlselect * into outfile 'backup.xls' from tablename; When i open 'backup.xls' in microsoft excel,i can view all the data ,but i can't view the field