Skip to content

Tag: sql

Increasing the number of ids in the TextBox by one

I have a table in my Sql Server and I have a value in this table. Table name = veriler Values name= Project ID int(PRIMARY KEY) I’m doing project automation for electrical engineer’s project. If engineer click the new project button. My program redirect to the Genel.aspx page. When the new project…

SQL – Snowflake Minus Operator

Hi I am running a query to check for any changes in a table between two dates…. The first select statement (where run_time = current_date() return 3,357,210 records. The second select statement (where run_time = current_date()-1 returns 0 records. Using the MINUS operator, I was expecting to see 3,357,2…

Problems passing a Python String to SQL query

I got some issues passing my SQL query made in Python to MS SQL. Were talking about retrieving some code via pyodbc, editing it with regex, and passing it back into a new table of the Database. I also tried some print()-Commands to assure the Code is running in Python and being edited the right way, but I am …

put on duplicate key update in MySQL

let’s say i have 2 tables table shipping id origin order_id createdAt product_id amount 1 1 11 2020-12-22 234 2000 2 1 11 2020-12-22 235 3000 3 1 11 2020-12-22 236 4000 4 2 12 2020-12-22 236 3000 5 2 12 2020-12-22 235 2100 6 3 13 2020-12-22 236 2200 7 3 13 2020-12-22 239 3400 8 4 14 2020-12-22

Sql memory issue

I have created a new postgres server and when I trying to execute this sql command: table1 and table2 contains around 300 000 records I got an error like this: Any ideas ? Regards, Arrmlet Answer Your join conditions are probably not correct. You can calculate how many rows there are by using: My guess is tha…

Syntax performance of INNER JOIN

Is the performance of both these examples the same? Example 1: Example 2: I am using example #2 at the moment since I am joining 15+ tables, each table with many unnecessary columns and many rows (1 million+) Answer Oracle is smart enough and does not take all columns from table 1 and join them with all colum…