Populate with SQL [XPA 2.5]


Florian Groothuis
 

How can I populate either a combobox or a select task with a SQL-statement?
I have a program that let's the user answer a list of questions. Some answers should be selected from a query from the DB. One simple select program populated by a SQL-statement sent as a parameter would be nice. Preferably without any third party software.

Thans in advance.


Harry Kleinsmit
 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.


Govert Schipper
 

Florian,


You could use the "Data source" property of the combobox to associate a table with the values of the combobox. You can even define a Range of the data fields. Or you could define a separate view and connect that view as a data source.


Govert




Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Florian Groothuis <f.groothuis@...>
Verzonden: dinsdag 13 juni 2017 14:11
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] Populate with SQL [XPA 2.5]
 
How can I populate either a combobox or a select task with a SQL-statement?
I have a program that let's the user answer a list of questions. Some answers should be selected from a query from the DB. One simple select program populated by a SQL-statement sent as a parameter would be nice. Preferably without any third party software.

Thans in advance.


Tim Downie
 

Write the result of sql statement task to a memory table - then use that memory table as the data source on the combo box
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Florian Groothuis <f.groothuis@...>
Sent: Tuesday, 13 June 2017 12:11:29 PM
To: main@magicu-l.groups.io
Subject: [magicu-l] Populate with SQL [XPA 2.5]
 
How can I populate either a combobox or a select task with a SQL-statement?
I have a program that let's the user answer a list of questions. Some answers should be selected from a query from the DB. One simple select program populated by a SQL-statement sent as a parameter would be nice. Preferably without any third party software.

Thans in advance.


Florian Groothuis
 

That won’t work because the requirement statement can’t be captured in the range-option of the DataSource option.

 

Defining a separate view isn’t an option.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Govert Schipper
Verzonden: dinsdag 13 juni 2017 14:57
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Florian,

 

You could use the "Data source" property of the combobox to associate a table with the values of the combobox. You can even define a Range of the data fields. Or you could define a separate view and connect that view as a data source.

 

Govert

 


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Florian Groothuis <f.groothuis@...>
Verzonden: dinsdag 13 juni 2017 14:11
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] Populate with SQL [XPA 2.5]

 

How can I populate either a combobox or a select task with a SQL-statement?
I have a program that let's the user answer a list of questions. Some answers should be selected from a query from the DB. One simple select program populated by a SQL-statement sent as a parameter would be nice. Preferably without any third party software.

Thans in advance.


Florian Groothuis
 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer



Florian Groothuis
 

Ok, fixed it. Output had to be Float8.

 

Thnx!

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Florian Groothuis
Verzonden: dinsdag 13 juni 2017 15:30
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer

 


Tim Downie
 

It will work if you get your sql task right - would be nice if you could just populate combo direct from sql statement.

In sql task type in the sql and press apg ull get the correct virtuals then go in and add link create/write
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Florian Groothuis <f.groothuis@...>
Sent: Tuesday, 13 June 2017 1:30:28 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Populate with SQL [XPA 2.5]
 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer



Florian Groothuis
 

I got it right, see my previous message. And yes, indeed, it would be nice if we could do so.

 

Gr

Florian

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Tim Downie
Verzonden: dinsdag 13 juni 2017 15:44
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

It will work if you get your sql task right - would be nice if you could just populate combo direct from sql statement.

In sql task type in the sql and press apg ull get the correct virtuals then go in and add link create/write


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Florian Groothuis <f.groothuis@...>
Sent: Tuesday, 13 June 2017 1:30:28 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer

 


Harry Kleinsmit
 

Use an 'ORDER BY' in your SQL select ?


On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 
Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer
 

 

 

 

 

 


Florian Groothuis
 

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer

 

 

 

 

 

 

 


Andy Jerison
 

Just don't convert the numeric in the ORDER BY clause. 

On Jun 14, 2017 2:03 AM, "Florian Groothuis" <f.groothuis@...> wrote:

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer

 

 

 

 

 

 

 



Florian Groothuis
 

I have to in order to get the numbers without decimals.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Andy Jerison
Verzonden: woensdag 14 juni 2017 13:37
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Just don't convert the numeric in the ORDER BY clause. 

 

On Jun 14, 2017 2:03 AM, "Florian Groothuis" <f.groothuis@...> wrote:

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer

 

 

 

 

 

 

 

 


Florian Groothuis
 

I have to correct that. I have statements with alphanumeric and numeric results so it was either convert or split up.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Florian Groothuis
Verzonden: donderdag 15 juni 2017 16:12
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

I have to in order to get the numbers without decimals.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Andy Jerison
Verzonden: woensdag 14 juni 2017 13:37
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Just don't convert the numeric in the ORDER BY clause. 

 

On Jun 14, 2017 2:03 AM, "Florian Groothuis" <f.groothuis@...> wrote:

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer

 

 

 

 

 

 

 


Andy Jerison
 

You can sort on a different column than the one you select. Use SQL like this:

SELECT column1,column2,CAST(MyColumn AS CHAR(2))
FROM MyTable
WHERE Something = SomethingElse
ORDER BY MyColumn

On Thu, Jun 15, 2017 at 10:22 AM, Florian Groothuis <f.groothuis@...> wrote:

I have to correct that. I have statements with alphanumeric and numeric results so it was either convert or split up.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914


meilink.eu

Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer


Van: main@magicu-l.groups.io [mailto:main@....io] Namens Florian Groothuis
Verzonden: donderdag 15 juni 2017 16:12


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

I have to in order to get the numbers without decimals.

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens Andy Jerison
Verzonden: woensdag 14 juni 2017 13:37
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Just don't convert the numeric in the ORDER BY clause. 

 

On Jun 14, 2017 2:03 AM, "Florian Groothuis" <f.groothuis@...> wrote:

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

 

Van: main@magicu-l.groups.io [mailto:main@....io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer

 

 

 

 

 

 

 



Florian Groothuis
 

You can’t when you use the distinct function:

 

SELECT distinct Height*1000

From dbo.T_Part

Where PartObsInd=0 and QualityCode = 'K'

 

I could do this:

 

SELECT distinct Height, CAST(Height*1000 as Char(12))

From dbo.T_Part

Where PartObsInd=0 and QualityCode = 'K'

 

But that leaves me with an alpha with decimals.

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Andy Jerison
Verzonden: donderdag 15 juni 2017 18:13
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

You can sort on a different column than the one you select. Use SQL like this:

 

SELECT column1,column2,CAST(MyColumn AS CHAR(2))

FROM MyTable

WHERE Something = SomethingElse

ORDER BY MyColumn

 

On Thu, Jun 15, 2017 at 10:22 AM, Florian Groothuis <f.groothuis@...> wrote:

I have to correct that. I have statements with alphanumeric and numeric results so it was either convert or split up.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK 08009803 • Our general terms and conditions apply • Disclaimer

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Florian Groothuis
Verzonden: donderdag 15 juni 2017 16:12


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

I have to in order to get the numbers without decimals.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Andy Jerison
Verzonden: woensdag 14 juni 2017 13:37
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Just don't convert the numeric in the ORDER BY clause. 

 

On Jun 14, 2017 2:03 AM, "Florian Groothuis" <f.groothuis@...> wrote:

If you use an “order by” on converted numerics you get this 14,40,7,9. Should be 7,9,14,40 as numeric.

 

I solved this issue by making 2 subtasks, numeric and alphanumeric, and sending an additional parameter. Works now.

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 20:06


Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Use an 'ORDER BY' in your SQL select ?

On Tue, Jun 13, 2017 at 06:30 am, Florian Groothuis wrote:

 

This could work except when the results are numeric values. Casting them as alpha-numeric values messes up the ordering, when I use a numeric virtual as output variable I get this:

 

 

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens harry@...
Verzonden: dinsdag 13 juni 2017 14:48
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Populate with SQL [XPA 2.5]

 

Hi Florian,

You could use a direct sql task with the whole sql select as a parameter and build your combobox string from that. You could send this back as the return parameter.

Best regards,
Harry Kleinsmit.

 

Met vriendelijke groet - With kind regards,

Florian Groothuis
Analist/programmeur
+31 (0)6 21927914

 


meilink.eu
Meilink Beheer Borculo B.V. • Kamerlingh Onnesstraat 1
7271 AZ  Borculo • Nederland • +31 (0)545 253525
KvK
08009803 • Our general terms and conditions apply • Disclaimer