Questions tagged as 'sql'

1
answer

User connection location in MySQL or MariaDB

Is it recommended for me to change a user's connection location from the mysql.user table? For example, I create a user 'danilo'@'localhost' but then I want it to connect from any machine, is there another way I can do this with...
asked by 29.07.2018 / 17:43
2
answers

Sort date by month

In the development of a query, I'm having a month-sorting problem. For example, in the chart I appear first April, then January, June, August ... And what I wanted to get was the order of those same months, January 1, February, March ... Que...
asked by 03.08.2018 / 19:47
1
answer

Update of holidays in SQL Server table

I have a SQL Server table called DM_Time. Her fields are: DtRef AnoRef MesRef DiaRef MesExtenso CodDiaSemana SemanaNumero IndFeriado And they already have in it days marked as holidays (in this case, IndFeriado = 'YES'). But what I was want...
asked by 17.08.2018 / 17:07
1
answer

SQL Most recent record FROM second table by Id

I have two tables ( Opportunity and Stage ). I need to get for every Opportunity the table row Stage where StageTypeId is equal to input parameter . Table Opportunity    Id, etc. Table...
asked by 07.08.2018 / 19:31
1
answer

Separate return from a table to a timeline

I'm creating a timeline where there can be more than one user update per day. I need my return sql already compare dates and I can separate $sql = "SELECT * FROM tb_timeline JOIN responsaveis ON id_responsavel = feito_timeline WHERE para_t...
asked by 08.08.2018 / 01:26
1
answer

SQL - Changing Field Names within a Column

Well, I have a question, I have for example a column called "Categories" and within that column I have several fields (categories) and wanted to change the names of those fields. For example "column categories" - and within it I have several...
asked by 06.07.2018 / 01:18
1
answer

Limit the number of rows in the second table?

Hello, good evening! I have two tables (Process and Movements). I need to generate a report with the Process data, along with the most recent progress. The query I wrote is returning me all the steps, causing the process data to be repeated....
asked by 28.06.2018 / 23:06
1
answer

How to encrypt StringConnection for a remote MySql database in C #

I'm developing an application that I want to sell, so I've created a serial verification system that checks if that activation code is already associated with the PC MAC. I do this by connecting to a remote database. If someone has a better and...
asked by 04.07.2018 / 10:29
1
answer

Convert VARCHAR to TIMESTAMP (AWS REDSHIFT / POSTGRESQL)

I have the following problem, in the source I have the data coming as varchar Sample source data in varchar format: 08:15:49 18:16:05 20:01:33 etc ... I need to re-insert this data into a new table so I made an insert with the f...
asked by 04.07.2018 / 23:26
1
answer

Show message if IN record does not exist

Hello, can someone help me with the following type of query in firebird, so I want to put several numbers of cpf in the IN of a query and if the cpf exists in the table show the data, but if it does not exist show a column indicating that does no...
asked by 11.06.2018 / 21:46