Questions tagged as 'sql'

0
answers

How to create 15-minute SQL interval? [closed]

I have a timestamp field and need to create a 15-minute interval. How in Sql should I do this? Data = YYYY/MM/DD HH:MM:SS The purpose is to analyze where I need the quantity of products sold every 15 minutes the day before.     
asked by 29.09.2016 / 21:11
1
answer

Add the same column by different criteria?

I'm trying to create a report using ReportViewer that makes a SUM in the same column by different criteria. My query works fine in PHPMyAdmin but in QueryBuilder the ReportViewer does not work and returns an error. How to solve...
asked by 29.09.2016 / 06:10
1
answer

Remove a foreign key from a server in production?

I have a cad_address table with my users' address record. I also have another request table mov_order that has a foreign key address_id for the address table, responsible for the relationship. The problem is that when the...
asked by 15.09.2016 / 00:50
4
answers

Select with several Left Joins Sql Server

I have taken an example of a people register with the following structure: I'mtryingtomakeaSELECTintblPessoawithJOINwiththeintentionthatselectreturnsthedataofthetableinwhichtheIdexists,selectselect:selecttblPessoaJuridica.Nomeas[NomePJ],tblPess...
asked by 26.01.2017 / 21:28
1
answer

Join for linq c #

I have the following query in SQl Sevrer SELECT PT.id, P.nome AS Codigo, PT.topologiaid, TE.id AS TipoEntidadeId FROM [dbo].[propriedade] P INNER JOIN [dbo].[propriedadetopologia] PT ON P.id...
asked by 07.12.2018 / 22:13
0
answers

Efficient search with phrase and keywords

I'm using the following syntax in SQL for searches: SELECT * FROM exemplo WHERE MATCH(title,content,tag) AGAINST(?) Regarding LIKE I had a better result, but it's still not 100%. For testing purposes, I have a title-only record with the...
asked by 23.07.2016 / 01:32
0
answers

Transform Pivot Column

I'mtryingtoturnthecolumn"prtnum" yellow inline, I'm trying to use the PIVOT but I can not already tried it in some ways and it's not right: Select Distinct (ORD_LINE.ordnum), ORD_LINE.prtnum, Sum (ORD_LINE.ordqty) From ORD_LINE Where...
asked by 18.07.2016 / 18:35
1
answer

no such table: tbcarro

Following some examples, I'm in doubt about the following error: 11-24 20:49:14.803 18215-18215/tiburski.rg.cadastrocarro E/SQLiteDatabase: Error inserting nome=ggggg modelo=ggggg placa=hhhh android.database.sqlite.SQLiteException: no such tab...
asked by 25.11.2016 / 00:05
1
answer

SQL in DB MySQL

I have the following situation, a register with 5 fields being them: Type1, Type2, Type3, Type4 and value The 4 type fields are combos fields, where you can select the all option, or any other option. To exemplify: <select class="form...
asked by 27.10.2016 / 03:51
1
answer

How to group multiple records in a single row

I have a query where I need the values from other related tables to be grouped into a single column. For this I use a for, however, the lines come duplicated. I would need the result to bring only the full line, in example line 6. Does...
asked by 09.05.2016 / 22:35