Tek-Tips isn't a debugging or coding service. So you're going to have to do some work!
Where do you think you are erasing the previous line in your code?
Your code here draws the new line:
MoveToEx(Canvas.Handle, X, 10, nil);
LineTo(Canvas.Handle, X, Y - 10);
What you need to do is have...
I suggest you add an index to your orders table with something like
ALTER TABLE orders ADD INDEX(surname)
and you should then experience sub second response time (ignoring network delays).
Andrew
Frequently the cause of slow responses from a query such as yours is because of no or an inappropriate index.
Can you show us the output from a 'DESC orders' command please?
Andrew
I think you need to do a self join along the lines of
SELECT a.multiplejob
, a.engineer
, b.multiplejob
, b.engineer
FROM tablename a
JOIN tablename b ON a.customer_street=b.customer_street
AND a.jobdate=b.jobdate
AND a.multiplejob < b.multiplejob...
Sorry, my answer doesn't provide you with what you've asked for!
How about
SELECT GROUP_CONCAT(multiplejob)
, customer_street
, job_date
, COUNT(*) AS jobs
FROM table
GROUP BY customer_street, job_date
HAVING jobs > 1
That will provide a comma separated list of jobs where two...
I would have thought something along these lines would work
[code]
SELECT customer_street
, job_date
, COUNT(*) AS jobs
FROM table
GROUP BY customer_street, job_date
HAVING jobs > 1
[code]
but I haven't tested it so there may be typos ;-)
Andrew
You provided this query
SELECT roomdetail.room_no, room_type, room_bed, room_rate
FROM roomdetail
LEFT JOIN bookingtable ON roomdetail.room_no=bookingtable.room_no
AND DATE(date_fro) >= 'strdtver1'
AND DATE(date_to) <= 'strdtver2'
WHERE...
I am not familiar with SQLyog so I took a quick look at their website. Apparently it comes in three editions: Ultimate, Enterprise and Professional. Which one do you have? I ask that because in the features matrix, the ability to "Import External Data" is not available in the Professional...
Yes, you can provide more information!
Why are you confident that the 20K records were successfully imported into the MySQL DB?
How were they imported?
Show a typical example of one of the records that was imported.
What is the SELECT statement you used?
Why are you confident that the...
Perhaps a simpler function would be
function FirstMondayInYear( datum: TDateTime ): TDateTime;
const
Monday = 2;
begin
result := EncodeDate( YearOf( datum ), 1, 1 ); // Assume 1 Jan of year of supplied date is a Monday.
while DayOfWeek( result ) <> Monday do // While this is not...
post the error message
please
[dazed]
However, you seem to have one more right parenthesis than left parenthesis which is likely to cause problems in anybody's language.
Andrew
This kind of operation is very simple if you use SQL.
Suppose your two databases are called A and B and the two tables you are comparing are called emails then the SQL to do what you want is something like:
UPDATE A.emails, B.emails
SET A.emails.new='X'
WHERE A.emails.Email = B.emails.Email...
It would be helpful if you could specify which version of MySQL you are using, which storage engine and which operating system.
That way someone might be able to reproduce the symptoms of your problem.
I use Full Text searches quite a lot and have not experienced this problem.
Andrew
Which version of Delphi are you using?
Which version of Windows are you using?
I am sure that I read somewhere that Windows XP Home Edition will only support a maximum of 4 computers on a local network. The XP Professional Edition does not have that restriction.
I am interested in which...
Thank you for your speedy response.
I based my program on some sample code I found on the web. Typically, there was no indication of which version of Delphi it was developed with. So
However, as it works perfectly with Delphi 7, your suggestion that it is a Unicode issue seems more...
I wish to transfer a small amount of data from one Win32 exe to another Win32 exe. The code I've written uses TTCPServer and TTCPConnect components. It works when compiled using Delphi 7 but fails when compiled using Delphi 2009. In both cases I've run the programs on Windows XP machines.
To...
I would have thought that using the Format function with a format specifier of %x would be simpler.
For exampleMyHexString := Format( '%x', [ <DBfieldName>.AsByte) ] );
The format specifier can include a width so that if you wanted an 8 character hexadecimal number padded with leading zeros you...
There are several possible solutions to this problem. A couple of suggestions are:
The main point is don't use the backup from another server as this is intended to recover from system/hardware failures and not from users "accidentally" deleting records.
Andrew
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.