So I have a Node.js query that should pass in these three values and update a specific column by a specific amount for a user with a specific id: The ‘sqlStatement’ looks like: As you can see, it should pass in the values such that the SQL statement looks like: I’ve also tried to write sqlSt…
Tag: sql
How is this cardinality being calculated in Explain plan?
I am analyzing the “explanation plan” about the following instruction and Oracle SQL Developer tells me that it has a cardinality of 1513 and cost of 1302. How are these calculations performed? Could be reproduced with an instruction (calculate with a select and obtain de same value)? Answer The c…
DB2 SELECT from UPDATE Options
I am currently trying to do an However, the version of DB2 I have does not appear to support this Is there any alternative to this in DB2 that could be return a desired result? Where in one query we can Update and Return the result? EDIT – The Select statement is supposed to return the values that are t…
vb Directly putting sql data from database into textbox once login is sucessful
I need some help with putting the SQL data from my database directly into Textbox1 (Firstname) and Textbox2 (lastname) once the login is successful. Basically, my code validates the username, password, and email (using the stored password, username, and email from my sql table). Then, its supposed to put the …
SQL Statement with the same multiple subqueries running very slow
I am hoping someone here can help me. I have been given this query that takes a long time to run (over 30 min). I have been trying to rewrite the query but with no luck thus far. I am posting an example of the query so that you can get an idea of what it is I am trying
Revisting ORA-06576: not a valid function or procedure name for simple function call via various database tools
Revisting ORA-06576: not a valid function or procedure name for simple function call via dbeaver database-tool I have seen many posts, but they don’t cover the situation I am experiencing. I am trying to do a simple function call to Oracle SQL via dbeaver: According to the right-click call function obta…
How to optimize datetime comparisons in mysql in where clause
CONTEXT I have a large table full of “documents” that are updated by outside sources. When I notice the updates are more recent than my last touchpoint I need to address these documents. I’m having some serious performance issues though. EXAMPLE CODE gets me back 212,494,397 documents in 1 m…
Using SSIS OR T-SQL Split a column of quoted & unquoted comma separated values into multiple columns
I have comma separated data in a column named C0. The data in C0 looks like this: C0 “Pacey LLC.”,213830ZZ,11/1/2017,11/1/2017,”297,311.74″,”2,371.40″,0.00,”1,325.18″,0.00,42.22,”123,986.56″ Mike The Miker,9814140VCD,12/1/2018,12/1/2018,”3,917,…
SQL retrieval: Empty Dataframe in IDLE or Visual Studio Code but populated Dataframe in Jupyter Notes
I am not a good python coder (beginner) so apologies if the code isn’t up to pythonista’s snuff! Bit of a weird situation and I can not figure this out. I have been wracking my brains trying to fix it out but can’t seem to be able to. I am sure it’s a really simple fix I am overlooking…
Update user id by looking up two other tables
I have a table/sql issue I don’t know how to solve. I need to update/create a table of user ids with order ids. Therefore I have to get a new user_id, by searching for the email in an old list. With the email adress I need to look up the new user id. So the logic is like: order_id ->