Questions tagged as 'sql'

2
answers

Related Tables: What is it? How is it? What's the use? What justifies its use? [closed]

I would like a better explanation of this strategy (if so called) and what makes its use justified since I see some trading systems using it. Complementing the question: Well, I had never seen it myself either, I had only heard of it (if I...
asked by 21.10.2016 / 05:25
1
answer

Doubt SQL tables

In 1: 1 relationships I have done otherwise than just today I noticed, in that I transform that 1: 1 to 1: N, where in the table that has N, the primary key is the same as the 1, so it's like 1: 1, but I do not know if this method can generate e...
asked by 24.05.2016 / 12:40
2
answers

SQL Select Where

Personal help please, I need to make a select in a table that contains ID, VALUE, DATE, NAME. The result has to bring only the lines where the date was the largest one. Example: ID VALOR DATA NOME 1 100 22/05/2...
asked by 22.05.2016 / 19:37
1
answer

Inconvergence of consolidated results x by interval

I am doing a query for a 10-minute interval between dates, the problem is that when I give an between to count all the results it returns a value and when I divide those values by interval and somo at the end it always gives a result total great...
asked by 21.11.2016 / 19:43
1
answer

Query with two tables

I'm in a project, I have the client and work table. A job has a customer. I have already listed the tables, but I need to do a select that from the client id in the work table, return the client name. I have to make a query to display in my c...
asked by 16.05.2016 / 18:18
1
answer

Send AJAX to a table

I have a database page inserted in a table: <div class="procurar"> <input type="text" id="search" onkeypress="mandar()"><i class="fa fa-search" aria-hidden="true"></i> </div> <div class="historico"> &l...
asked by 03.05.2016 / 18:07
2
answers

Count Script - SQLServer

I have the Telefone table, which records the phones you called. I need to make a script that shows the 'quantity' of the phones they called. if a phone calls more than once does not count. I need to do it via Microsoft SQL SERVER Manageme...
asked by 02.05.2016 / 14:13
1
answer

How to display a result using 2 selects

I have two tables, Products and Orders. I need to create a combobox for products and when the user chooses a product, the page has to display all requests related to the product, if I choose another product have to change the requests....
asked by 14.06.2016 / 17:48
2
answers

Check for index?

Is there any way to use a Script that checks whether an index already exists in a table? I have the following script that generates an index in a table: CREATE NONCLUSTERED INDEX [meu_indice] ON [dbo].[MinhaTabela] ( [Id] ASC, [Chave_Id...
asked by 26.08.2016 / 14:36
1
answer

Query in SQL Server

When doing the following query select * FROM conta It brings up the columns, with id_fornecedor coming from the fornecedor table id | id_fornecedor | conta_status 1 | 1 | S I'd like to bring the name...
asked by 25.05.2016 / 13:55