Skip to main content
Question

Hello, can i check a MSQL database and get a boolean variable? or something like this like 1 or 0 / true / false thank u for u help


Hello, can i check a MSQL database and get a boolean variable? or something like this like 1 or 0 / true / false thank u for u help

4 replies

Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • January 31, 2022

Hi @Nils Pottbäcker​ ,

 

Can you give me bit more details?


  • Author
  • Cadet | Tier 2
  • 9 replies
  • January 31, 2022

I have a bot that gets a PDF and an order number via email and the PDF has to be attached to an order in a program using the order number.

 

Therefore I would like to query my MSQL database from this program whether this order already exists.

 

Can you understand that?

 


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • January 31, 2022

Yes you can Query the result from the DB and using Loop command you can check for the required value and convert to the required format.


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • January 31, 2022

Hi @Nils Pottbäcker​ ,

 

You can use the Database Action Package to connect with MS SQL and using a Where clause, check whether the item exists or not, i.e., check if the datatable queried back is empty or not:

 

imageimageSELECT * FROM [TableName]

WHERE [PURCHASE_ORDER] = $nPurchaseOrder.Number:toString$imageimageIs this what you were looking for?

 

Kind Regards,

Ashwin A.K

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings