Questions tagged as 'sql'

2
answers

How to group dates according to the day of the week

Well, I have a table which has a column of id of user user_id and one with dates. I would like to know how to group and count the dates that are in the formed. Example: 07.06.14 on the respective days of the week and accordi...
asked by 07.06.2014 / 20:24
2
answers

unable to load dbxmss.dll on Delphi XE4

When trying to connect, in a Delphi XE4, a TSQLConection with MSSQL, it asks for username and password. After ok, it appears:    unable to load dbxmss.dll I already searched the computer and there is this dll, nor in the bin folder of del...
asked by 19.04.2014 / 04:44
2
answers

Is it possible to do an INSERT and an UPDATE in the same query in java?

I would like to know if it is possible to make a INSERT and a UPDATE in the same query, that is, in the same operation. I'm using the following to do both. public Connection conn = null; ... conn = DriverManager.getConnection...
asked by 13.01.2017 / 01:16
1
answer

How to convert this date to datetime in oracle?

Correct way to convert date '27/12/2016 16:31:39,137000000' to datetime (timestamp (6)) in oracle? Some frustrated attempts that result in error ORA-01821: formato de data não reconhecido 01821. 00000 - "date format not recognized"...
asked by 12.01.2017 / 17:02
1
answer

Why using a column of a virtual table makes a SQL in Oracle slow

Good. Not wanting to make the subject too "gassy" but just wanted things to investigate in the environment. I have a SQL that uses a virtual table, for a series of reasons that does not come much to the case. Something like: select *...
asked by 18.01.2017 / 01:09
1
answer

How to join two selects of different tables?

I have the following tables: +--------- + +-------------+ | usuario | |usuario_grupo| +----------+ +--------- + +-------------+ | grupo | |usuario_id|----->| membro_id | +----------+ | nome | | grup...
asked by 23.08.2017 / 22:35
1
answer

How to select double contacts from a table

I have 2 tables: Users [id, name, etc ...] Friends [id, idUser, idImigo] In the Friends table, idUser corresponds to the id of the user who has the contact and idAmigo the id of the user who is actually the contact. I wanted to d...
asked by 12.02.2017 / 01:35
2
answers

Suspend Trigger via conditional

I did not find a SQL statenment IF in SQLite and the closest was CASE , which is answering me, however I would like to suspend a trigger with a conditional and I believe it can only be done with IF / p> CREATE TRIGGER... BEG...
asked by 03.04.2018 / 23:08
3
answers

How do I find "holes" in SQL Server tables? [duplicate]

I have a table with a column id (primary key, auto increment of value 1). My application allows rows to be deleted, so the query SELECT id FROM tbl ORDER BY id ASC would be this: id --- 1 2 3 4 5 6 7 ... However, some r...
asked by 04.09.2017 / 19:59
1
answer

Accessing SQL Server 2008 data from MySQL

Does anyone know if I can access data from a SQL Server 2008 database from a MySQL database? It would be something like Linked Server, but otherwise.     
asked by 11.09.2017 / 19:35