Active Query Builder support area

Dropbown Box in "Column Name" field

Avatar
  • updated
  • Completed

Is there a way to have either a dropdown box or a combo box in the "Column Name" field?

I am still evaluating and I am not sure I have full access to setting the "Column Name" at all.

Thank you,

Simon

Avatar
Andrey Zavyalov, PM

Hello, Simon.


The "column name" column allows to define aliases of the query output columns. I don't understand why there should be a combo box. Can you explain your idea?


In the trial version random aliases are assigned to query output columns, in the full version user can define own alias for a column or leave this field empty.

Avatar
Simon

In the app we are building the query builder will be used to create SELECT/INTO queries. Only fields in the target table are valid aliases, so it would be very useful to both suggest and limit the choices by using a combo.

Is there a way to do that?

Thank you.

Avatar
Simon

On second thought that might not be what we need. This is type of query I am trying to build:

INSERT INTO Target_Table
(list of target fields)
SELECT
list of source fields and/or more complex SQL
FROM Source_Table

In the MS SQL query builder the fields in "(list of target fields)" are listed under "Append", but I don't see that in the AQB. What would be the best way to compose a query such as the above?

Thank you.

Avatar
Andrey Zavyalov, PM

There's a possibility in some editions of Active Query Builder to add custom columns to the Query Columns Grid. Please tell me what version and edition you are currently evaluating, so I could point you to the right docs/code sample.

Avatar
Simon

Version: 2.10.5.758 and 2.10.9.0

Runtime version: v2.0.50727

I wonder if that would help, though. What I found out after my last post is that INSERT queries do not seem to be supported. For example if I paste this in the editor:

INSERT INTO [Transformed_Data]
(Business_Date)
SELECT GETDATE()
FROM [Source_Data]

When I click refresh, I get:
Invalid SELECT statement. Unexpected token "INTO" at line 1, pos 9.

If this is the case, I don't need to add any columns. I will have to create a straight SELECT statement in which case I could use the dropdown box I originally inquired about.

Sorry for the changes, but I am still trying to understand how AQB works.

Thank you.
Avatar
Andrey Zavyalov, PM

You right, the current version of Active Query Builder doesn't support INSERT statements, but if you use the WinForms edition (I'm still not sure about that), you can create an additional column (if user wants to build an INSERT statement) and turn the SELECT statement into INSERT by getting information from this column.

Avatar
Simon

I think I am OK with just the SELECT, we can work around that.

What would really help is a combo in the "Column Name" field. It sounds like that is not possible at the moment. Can you please confirm?

Avatar
Andrey Zavyalov, PM

In the WinForms Edition you can hide the original "Column name" column and create a new one with a combo box.

Avatar
Simon

What about in the ASP version? That's the one we are using. Thank you.

Avatar
Andrey Zavyalov, PM

Sorry, it is not possible in the ASP.NET version.