Category "sql"

I have to search for all city name starting with vowel words but array pattern is not working for MySQL

Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates. select distinct(city) from station where c

Select Names of city starting and ending with vowels from STATION table

Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplic

MySQL transaction FOR COMMITING ON TRUE IF

i need to make an sql transaction, that only commits the insert if the one date is greater than the other, and rolls back if else.. this is what i have: START

Power Automate Desktop - Pass User Input as Variable into SQL Query

What is the correct way to take user input in Power Automate Desktop and pass that input as a parameter/variable in an SQL query. For example, if user enters a

How to escape a whole sql string instead of escaping each argument?

I use https://github.com/mysqljs/mysql.git library. I have a mysql db query architecture in which I can not modify the SQL query file one by one to escape each

How to store H2 database file into project directory

When I used H2 database the database files are stored at C:\Users\MyName\TestDataBase.db directory. The H2 path is jdbc:h2:~/TestDataBase. This is default H2 da

Using List inside a postgres Query

i have a dynamic list. list=['a','b','c','d' ..... ] so length may change i want to compare these list values in a query select * from student where name i

Problem with InsertCommand in SqlDataSource. ERROR: System.Data.SqlClient.SqlException: 'You must declare the scalar variable'@EXPEDIENTE'.'

I am a newbie and I have recently started working developing a web application, I do not have much experience so if you are able to solve the problem and explai

Round And Show To 2 Decimal Places? [duplicate]

I have a small question to ask. How to round a numeric field upto 2 decimal places, and also show it with 2 decimal places only For example th

MYSQL: Create Unique ID based on Another Column

If I have the following column in database: Email [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] I would like to ALTER

Append characters to a string in multiple rows in Oracle SQL

I'm trying to update a single column in multiple rows by appending the string '999': UPDATE integration.ol_orders SET order_id = ((SELECT order_id

Correct way to use LIKE '%{$var}%' with prepared statements?

This does not work $sql = 'SELECT * FROM `users` WHERE username LIKE \'%{?}%\' '; Warning: mysqli_stmt::bind_param(): Number of variables doesn't match numbe

MYSQL: Create Unique ID based on Another Column

If I have the following column in database: Email [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] I would like to ALTER

Limit listagg function to first 4000 characters [duplicate]

I have a query that uses the listagg function to get all rows as a comma delimited string to ultimately be shipped to a big text box. I'm gett

How change few columns to another table with key in SSIS?

I have: Collisions{PK_id, cashLoss, deaths, city, state, county} I want: Collisions{PK_id, cashLoss, deaths, #IdLocalization} Localization{#LocalizationID(a

How can I filter in Birt (Parameter) on a computed column?

Is it possible to add a parameter to filter by a computed column and if so how? I have a report which gives the level of a bill of material and this is set as l

Group function is not allowed here

When I run the following query, I get ORA-00934: group function is not allowed here what is the problem ? select c.Numcom,c.Nompr,c.salaire_fix from com

DB2 SQL How do I turn a number into a string then concatenate a percent sign onto it?

I would like to display 71% in my RESULTS field. I have rounded the decimal percentage first (it was 71.04), now I want to turn it into a string so that I can c

Decorator for Sqlite3

I have a simple sqlite3 function from sqlite3 import connect def foo(name): conn = connect("data.db") curs = conn.cursor() curs.execute(f"CREATE T

SQLite (Android) : UPDATE query with ORDER BY

Android, SQLite : I want to insert rows in between other rows in myTable using SQLite in android. For this, I am trying to increment ids of the all rows startin