Questions tagged as 'sql'

1
answer

Add items from table 1 and bring rows indexed by table 2 code

I am very new to SQL and I am creating an application that brings the number of hours contracted, well the part that I have doubts in the query is the index of the lines ... I need the rows to not repeat the code from table 1 and add the item...
asked by 13.10.2014 / 15:57
2
answers

Error converting dates during an insert

I need to load a table in one database with data from another table and another database. It turns out that in the DateTime field is giving a conversion error because the data from the other table is in Varchar. Here's how I did it: use [Rup]...
asked by 15.08.2014 / 13:55
1
answer

Search 3 results from the same table grouped by the same id

I have tbl_ocorrencias that records occurrences of a particular vehicle. That is, the table consists of the following: - tbl_ocorrencias - id_ocorrencia id_viatura data hora In this case, an instance only has one vehicle...
asked by 07.08.2014 / 11:44
1
answer

What is an "active autonomous transaction"?

I'm getting this error:    ORA-06519: active autonomous transaction detected and rolled back   ORA-06512: at "SGR20.CR_PKG", line 289       View program sources of error stack? Before someone asks what the error is giving in an Oracle Pa...
asked by 06.08.2014 / 17:00
1
answer

Searching for the next record and the previous record using two columns for sorting different tables

I have the following database structure: ___ Table: modules___ id int(10) name varchar(50) position int(10) ___ Table: lessons ___ id int(10) module_id int(10) FK position int(10) name varchar(50) Considering that you have the following da...
asked by 22.08.2014 / 00:22
1
answer

select like to return a sting without line break

I'm using the following query: select distinct con_destinatario from tab_conhecimento where con_destinatario like '%CALLE%' order by con_destinatario; and I get several results of this type: A.S. OPORTUNIDADES Y NEGOCIOS S.R.L. CA...
asked by 21.08.2014 / 21:06
1
answer

Sorting in Crystal Report with sub reports

I have in my report 2 subs reports but I want to sort by the field "Student" of the Main Report but I am not getting even though I already bringing the query it ordered with I would like. I tried to sort by Group Section from the Insert...
asked by 31.10.2014 / 12:22
1
answer

Creating 7 selects with PHP and MySQL

I have a database and I want to fetch your content and display it within <select> 's, the initial one I get, I have 7 names in the database and I can display them all in the same select box, what I want now is to have 7 select's eac...
asked by 29.07.2014 / 12:36
1
answer

Map columns of separate tables in a single object and vice versa

   Situation 1 I have the following very simple tables: ....................... And I have the following classes: Client: @Entity public class Cliente implements Serializable { private static final long serialVersionUID = 7...
asked by 03.07.2014 / 21:50
1
answer

View [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]

About VIEW in database ... What is the difference between the three algorithms when creating a VIEW with [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] ? What does each one do?     
asked by 18.09.2014 / 15:18