Dont work brackets in LIKE statement I use MySQL WorkBench, I dont understand why SELECT * from user where name like’B[io]’ dont work. My DataBase: Answer Because MySQL does not support character classes in like expressions. Neither does the SQL standard. Use regular expressions: Incidentally, the…
Tag: sql
ServiceBroker : Stored procedure working as stand-alone but not as trigger
We are trying to launch webservices asynchronously from SQL Server and Service Broker seemed the most interesting choice. For Service Broker itself many different examples can be found online. I managed to have a working example in which I sent several parameters in a message on a queue and have the queue tri…
How to compute running balance from array in ASP.NET MVC controller?
This is my code in controller I want to implement running balance in this array. This query will return Date, debit, credit and balance columns. I have to compute balance on the basis of debit and credit. I want to achieve this: for each row of the array. Hope, you get my point…help me….thanks Ans…
How to insert file upload content to database by sending base64 encoded file content via json?
From my php page I send file upload content as then send this to payload – REST API in python then in my python code I write like this Now I try inserting this to my database using sql where the image column is binary(blob) type but this end in error… Am I doing in right way ? or there
error on MySQL when i add month to the query [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed last year. Improve this question I have a dataset including a endDate and a startDate: endDate startDate…
Hibernate Table or view does not exist Oracle
I Have a problem executing an hibernate query on Oracle: my persistence.xml: my entity class com.entity.User: my java class: but when i execute my code, i obtain: Can you help me to find the error? NOTE: if a use a PreparedStatement with the same connections and query i don’t have any issue, so it is no…
SQL returning 1 single column value on a multiple row
This is my query so far. But what I need is to return one single value of a column like this. But in my query so far, this is the returning output. This my query. How can I get rid of the double values? Answer You can use analytical function as follows: Let’s say the column you highlighted is sol.actual…
Get max of sum during joining two tables
I want to get the subscriber that has maximum value of Bill (Total Bill). I tried using the following script but SQL did not execute successflly. Please help me on what I did wrong on this. I have 2 tables: Subscriber FirstName MIN Ben 258999542 Reed 458524896 Steve 586692155 Clint 1007772121 Frank 1287548752…
Sql join with two tables max and count
i have two tables employee : employee_number employee_name salary divison_id division : division_id division_name How to Show division id, division name, number of employees working in each division that has the highest number of employees. I want to have an outcome like this : Answer
Select and skip rows by date range with checking difference between them
I’m new in Teradata and i have a small sql problem, similar to this one below : source table A: output wanted: Explanation: 1 –> if c is different (between current row and the next one) so dt_f of the current row = dt of the next row – 1 day , the two rows are selected 2–> if mon…