Welcome! Log In Create A New Profile

Advanced

[WD23] Query Question

Posted by GuenterP 
GuenterP
[WD23] Query Question
July 29, 2018 07:57AM
Hi, as an example, I have a simple table control here, item# + quantity:

[attachment 2773 Bestellungen.png]

The problem: the combo in column 1 of the table should contain only those item numbers which are not in the table. Is there a query for that?

Of course, currently I'm doing that by code and fill the combo with all of the items which are NOT already in the table (TableSeek ..). Is there a more elegant way by query??



Edited 1 time(s). Last edit at 07/29/2018 07:57AM by GuenterP.
Attachments:
open | download - Bestellungen.png (15.6 KB)
Michael Drechsel
Re: [WD23] Query Question
July 30, 2018 07:15AM
Hi Guenter,

you could create a variable like "Artikel_Liste" and add each GUID (or ID) of the selected product as string with ";" as delimiter.

Then " select all product where ID is not in List "Artikel_liste"
Shijo S Philip
Re: [WD23] Query Question
July 30, 2018 08:03AM
Hi Gunter,

"Good Day"

You can use "Not In" in SQL query.

Create a string and add all current using IDs separated by Comma.

sStr is string = "1,2,3"

Select Artikel from Table_name where ID Not In sStr

Thanks and Regards

Shijo S Philip
https://ssphilip.com/
GuenterP
Re: [WD23] Query Question
July 30, 2018 08:13AM
Hi Michael and Shijo,

thank you, I'll try to get one of your suggestions to run!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: