Questions tagged as 'sql'

1
answer

SQLServer in repositories

I have to send a project of an application through a GitHub repository, I was able to make the application work perfectly front-end, back-end and LOCAL database, my doubt is: How can I export SQLServer to a repository? Or do I have to put it o...
asked by 15.10.2017 / 05:21
3
answers

Statement Where comparing variable Date (date type) with current date

Hello. I am using Oracle SQL and need a query that returns values where the date is equal to the current date. Does Oracle have any reserved word for current date in the system? My code: insert into monitoracao(idseq, idsess, inst_name, ela...
asked by 29.09.2017 / 16:38
1
answer

How to perform restore of only 1 specific table in SQL Server 2012

Good afternoon! I have a following situation: I have a database backup and the server has already created a database with this base called test, however, I need to migrate a specific table that is in this test base to another database called...
asked by 04.09.2017 / 21:43
1
answer

SQL queries - two tables (excel spreadsheets) consolidated [closed]

Hello. I have a question, which I think is simple for the veterans of the forum. I do not have much SQL notion, but I need to integrate two files into excel One stock and one sales There are two different xls. Both have a BD (tab) called "Gen...
asked by 31.08.2017 / 21:08
2
answers

Difficulty in creating sum column in mysql

I am doing a commission report, but a question arose, I want to bring some totals at the end of the report, for example the gross value of all commissions, which would be vl_comis - desc_comis . Anyway, how do I create a column called t...
asked by 20.09.2017 / 19:02
1
answer

Division of tables with Count and Sum

I'm working on a query where I have some sums and counts, and in some places I need to divide it into a table that I added or counted, for example: COUNT(M.ID_MAILING), SUM(CASE WHEN SS.IS_APPROACH = 1 THEN 1 ELSE 0 END) I need to divide th...
asked by 18.08.2017 / 12:48
2
answers

How to bring two columns with different results

I want to put together a view of the total Assets and Closed projects. I have a projetos table with the fields nome , descricao , ativo (can be S or N) SELECT COUNT(*) as Total FROM projetos WHERE ativo = 'S'...
asked by 09.08.2017 / 19:09
1
answer

Filter data by period

I'm having problems mounting an sql to my system. I have a anuencias table with a status column. I want to list data where in status contain words "signature", "ready for sending" and "cartorio" but that these data are of a...
asked by 09.08.2017 / 20:58
1
answer

How to put two records from one table in another as a single in select MySql Bank

How to put two records from one table in another as a single MySql select bank? SELECT TURMA.turma_id, TURMA.turma_nome, PROF.prof_name from turma TURMA LEFT JOIN professor_materia PROF_MAT ON TURMA.turma_id=PROF_MAT.prom_mat LEFT JOIN profe...
asked by 02.09.2017 / 21:44
2
answers

Group [group by] SQL Firebird

I would like to know if there's any way I can do a query where I can bring fields that are not in my group by . I have the following code: select sum(TAB_FATURAMENTO.vl_item),CLIENTE.insc_cnpj from TAB_FATURAMENTO inner join (IMP_PROC...
asked by 07.08.2017 / 17:09