How to Use

A good knowledge of SQL is required to use this software. First thing to do is to add some database connection info. Then you can connect to your database and play around. Command-Return are used to query the text in the current selection or in the current line if no selection. UNIX command tools like "grep" or combination of them like "grep test | wc -l" can be used to filter the query outputs by using Command-Option-Return to run the query.

F5 is used for keyword completion in MacOSX by default, and Escape key is hard-coded in LSQL to do keyword completion too. If you want to change this behavior in MacOSX and use another key like Escape, edit your ~/Library/KeyBindings/DefaultKeyBinding.dict to:

{
    "\UF70B" = "complete:";  /* F8 */
}

"Type head" automatically completes keyword while you are typing. If the completion is correct, use tab key to accept it. You can use Escape key to switch next alternative, or Apple-Escape to show all the alternatives.

Query results can be directly BCP to other databases, and no need to create view as for Sybase own bcp tool. Always make sure that the destination database has 'select into/bulkcopy' on before doing BCP. To BCP a table, use "SELECT * from SourceTable" and choose "Run and BCP to..." from Query menu. To BCP query results, use "SELECT col1, col2, ... from Table1, Table2, ..." so the result columns match your destination table. BCP data can be limited using conditions in SQL queries above.

Query history is listed in the stripped table inside the query window. To close the query history table, you can either use Escape key, or move the mouse to the outside of the window so the query history table fades out.

Monitor function in LSQL works only with ASE, and gives a simple yet powerful tool to check what is going on in your databases. CPU Busy/IO Busy/Idle are in percentage. Connections/Packets Received/Packets Sent/Packet Errors are in number of packets, who size depends how ASE is configured. Most common size is 512. Read/Write/Errors are in pages with most common size 2k.

Tips and Helps

More tips and helps can be found in the sub categories in the menu bar.