PowerToTheBuilder
Helping to put the Power back in PowerBuilder

CrazySQuirreL 4.0.0 now available

May 20, 2008 19:30 by bradwery

The first thing you will notice when you open the application is an updated Object Browser. I still need to add some functionality to it like being able to connect to a datasource and a way to refresh any node in the tree.

The other major enhancement I made was to the SQL Query windows autocomplete feature. I’ve extended it to be a little more flexible. You now have table autocomplete and custom autocomplete lists. To activate the table autocomplete list just type the name of the table owner and enter a period (e.g. select * from dbo. ). If you don’t know the table owner or don’t want to enter it you can just enter a period.

The idea of a custom autocomplete list is new. It gives you the ability to list anything you want. What displays can be a static list of items or the results of an SQL statement. By default, 3 lists are provided with the install: CSQL, DP and DT. CSQL lists all functions you can use in T-SQL. DP lists all datapart items and DT lists all datatypes. Try this:

SELECT csql.

You should see a list of functions appear. Continue typing to filter the list.

All custom lists are maintained in a new window called “My Autocomplete”. You can get to it through the Tools\My Autocomplete menu. If you select “List” for the type you would just enter a list of items in the editor window. If you enter “Command” for the type you specify a select statement. The first column in the select statement will be used for filtering and inserting into the SQL editor window.

Here’s an example of where you can use a custom list:


1. Enter a new item in the My Autocomplete window called country (assuming you have a country lookup table).
2. Change the type to Command.
3. Enter the following SQl (as an example)

      SELECT country_code, country _name
          FROM country _tb

4. In a new SQL Query window type

      SELECT *
         FROM city_tb
         WHERE country _code = country. <at this point you should see a list of all countries in the country_tb table>


Currently rated 4.7 by 3 people

  • Currently 4.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


 

  Country flag





Live preview

September 5. 2008 14:49