Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. towerbase

    Line drawing

    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...
  2. towerbase

    Slow Return from table

    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
  3. towerbase

    Slow Return from table

    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
  4. towerbase

    Return only duplicate records

    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...
  5. towerbase

    Return only duplicate records

    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...
  6. towerbase

    Return only duplicate records

    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
  7. towerbase

    SQL Query returns records which is not required

    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...
  8. towerbase

    cant SELECT after large import

    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...
  9. towerbase

    cant SELECT after large import

    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...
  10. towerbase

    SYSDATE Year

    Assuming you are using MySQL and not some other DBMS then something like this should work: Effdt <> CONCAT( YEAR( NOW() ), '01-01' ) Andrew
  11. towerbase

    IF Then problem

    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...
  12. towerbase

    Store Procedure IF query

    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
  13. towerbase

    ADOTable Edit - Post problem

    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...
  14. towerbase

    Case Insensitive Full Text Search

    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
  15. towerbase

    Another subnet

    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...
  16. towerbase

    Delphi 2009: TTCPServer and TTCPConnect

    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...
  17. towerbase

    Delphi 2009: TTCPServer and TTCPConnect

    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...
  18. towerbase

    Help needed converting ftBytes to string

    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...
  19. towerbase

    match part of a string

    Googling brought up the answer for me at http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html Andrew
  20. towerbase

    row copy from 1 db to another

    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

Part and Inventory Search

Back
Top