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…
Tag: sql
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…
SQL SELECT showing records only if the number of records is greater than N
I have a table defined like this (MySQL 5.1): Sample dataset: I need to show records matching a certain criteria (lets suppose lastname = ‘Santucci’ ) only if the number of records is greater than a certain defined limit (lets say 2). I tried in various way without success the most promising form …
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
Can I allow only certain specific strings to be inputted for a table in Oracle 10G?
In this table, I want a constraint such that, name inputted should be only ‘trial’,’experiment’ or ‘test’. Answer You can add the CHECK constraint as follows: If you don’t want the null values in the name then you can also use NOT NULL constraint on the name column. W…
CASE WHEN SQL Query executes condition in else even if first condition is true
I’m trying to check if data exists in a table. First I check whether the table exists then I use a SELECT statement to check whether the table is empty or not I have this query which is not supposed to execute SELECT 1 FROM TableName if OBJECT_ID(‘TableName’) returns NULL but this query goes…
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…
Select a column from table return by function in Oracle
I have a function that returns a table of custom objects. I wish to select a certain column by name from the returned result. The table of objects The function When I call the function this way, I get a result with a single column called SERIAL_NUMBER However, I can’t do something like this Is there a w…