Questions tagged as 'sql'

2
answers

Save without accents and uppercase SQL Server

I am creating a database, where I need to save all varchar fields in uppercase. Searching the internet, I found the following collate that would work, but it still keeps saving with accents and in uppercase and lowercase. Here's the example: C...
asked by 03.10.2016 / 19:10
1
answer

Sql Server Stored Procedures [closed]

I'm starting to develop an application, basically it's a business management control. The application will issue NFC-e, NFe, will control inventory, financial and etc., the database will be hosted on Azure. I started by modeling the database and...
asked by 30.09.2016 / 15:34
1
answer

SELECT Union ALL Dismiss Arguments

I have this query that adds two results to different tables. SELECT sum(g) saldo_anterior from ( SELECT SUM(valor_pg) g FROM ctrl_deposito WHERE MONTH(data_pg) < 11 and YEAR(data_pg) <= 2016 or YEAR(...
asked by 17.07.2017 / 14:13
2
answers

'Sum if' in MySql workbench

I have a MySql database. No_Pedido|Valor|Cortesia 123|1000|Sim 123|500|Nao 124|200|Nao 124|500|Nao I need to make a select that returns the sum of the value per request that is not polite, would be sumif .. Select needs to loo...
asked by 08.11.2016 / 20:04
1
answer

Format date in INSERT and UPDATE Mysql PHP

Well, I have a data grid with a date, but I have to use a JQuery mask : $(document).ready(function(){ $('.date').mask('00.00.0000'); }); But when I make an INSERT, for example, the date 19.11.2016 becomes 21.11.2019. This same case h...
asked by 19.11.2016 / 21:17
2
answers

How to compare set of numbers with another set?

How to mount query to compare whether one set A of numbers is equal to the other, of B, with the same numbers of set A, and so on. Example:    Table data id conjunto numero ordem 1 1 1 1 2 1 12...
asked by 18.02.2016 / 20:10
2
answers

Primary key in the associative table (Many for many)

Good evening. I have the following question in the N relationship for N. The foreign keys become a composite primary key of the associative table. Correct? Does this ensure that there is no repetition between tuples? Because I think even i...
asked by 07.01.2017 / 00:12
1
answer

How to add the numbers of a column in the bank that has the same id and that repeats itself?

I have a table named venda_itens which has venda_id , item_id and item_quantidade . I'd like to bring back the item name with the total number of items sold, and the quantity of total items inner join...
asked by 01.11.2017 / 00:00
1
answer

Do real-time bank search

How can I do it in PHP so that when the user types in the search field it will already appear the records of the database. For example, supposing that it is a city register, the user type "Field", the records "Campo Grande, Campo Largo, Campo...
asked by 24.10.2017 / 18:05
1
answer

Error parameter 5

When I try to change the record already done, it sends the No value specified for parameter 5 . The code: private void alterar() { String sql = "UPDATE tbusuarios SET usuario = ?, telefone = ?, login = ?, senha = ?, perfil =...
asked by 07.02.2017 / 00:13