Skip to content

SQL Execute one query of 2 based on condition

I have 2 working query that I need to use to generate a report, I have configured 4 parameters that user can choose and I want that if idarea=0 then first query is executed, else second one. I tried …

Stored procedure with if statement not working

I want to create a stored procedure to check if the product has enough quantity in the purchase_info table. This is my code. But it is not working, the result doesn’t show me the if…else query. Can …

SUMIFS for vb.net

Good day, How can I do like sumifs in sql query in vb.net here is my code. The plan is to take the Sum of column prdInput based on the helper which is txtlot txtPartnumber and txprocess. I managed to get display the first prdinput the query found but I need the the sum of its since I have multiple

Pyodbc and AWS Lambda

I have a fairly simple SQL query that’s taking forever to run in my Lambda function and I don’t know why. I know OR statements can be a killer in SQL, but in my database editor, it runs in about 800ms. Why would it take longer in a Lambda function? I’m using cursor.execute() and passing the …