Hello I have one procedure like my problem is that P_SICIL or P_EXISTS can be too long so all length can be more then 4000 characters. when I call procedure it gives below error ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 14103, maximum: 4000) if I dont use to_char for clob…
T-SQL: removing Time and Preceding characters from nvarchar column
I have a comments column in a SQL Server database table of type nvarchar and typically contains text along the lines of: I am trying to find a way in the select statement to remove the character pattern of ‘#:#:# AM/PM’ and everything preceding it leaving me with “Blah Blah…” In …
Creating Flutter Web Server that connects to an SQL server
I want to create a Flutter web server that has an SQL connection. Just like in PHP we can connect to the SQL server like this: // Connecting to DB $conn = new mysqli($servername, $username, $password, …
How to get just one result when using MAX and GROUP BY
I would love some help on this query: select * from STORAGE_MOVEMENT where object_id = 43500 and current_location != 6411 and object_class = ‘SAMPLE’ Here’s what I get: I’m trying to fetch only …
SQL query to get data without hours in timestamp column
I have written a code and sql query to get data from database: I get this dataframe: I want to write another query to get data only for 2019-05-29: but it brings me an error: How could i do that? How could i get rid of hours in timestamp column in my sql query? Desired result is: Answer toDate(timestamp) SELE…
Error in SSMS when running query from SQL On-Demand endpoint
I am attempting to pull in data from a CSV file that is stored in an Azure Blob container and when I try to query the file I get an error of File ‘https://.blob.core.windows.net/&…
Sql assign unique key to groups having particular pattern
Hi I was trying to group data based on a particular pattern. I have a table with two column as below, I need to generate a key column that increment only after rollingsum equals 0 is encountered.As given below I am using postgres, I tried to increment variable in case statement as below But I am getting an er…
MySQL: Join three tables, comparing two values
First of all, I’m an amateur on SQL. Here it is the example. From this three tables I would like to know who are the teachers that make more money than Mike Table1: Table2: Table3: So far I’ve made this: And I don’t know how to keep going because when I run it, an error appears. My expected …
How to update rows with new values for groups found and make this as fast as posible?
I have a table which have these fields: id, client_id, visit_id, number_of_visit. This table can have from 30k to 100+k rows of data. The primary key is client_id and visit_id. (I cannot have a row with these two values being the same, but meanwhile client_id can appear more than 1 time having different visit…
SQL delete except select result
I have these 3 tables, and i want to delete from all records except some already used request Registry Record Request and i use this query which brings me all the rows i want to delete. How to use delete in this case? Answer