Questions tagged as 'sql'

1
answer

MYSQL to POSTGRESQL via SED

I'm looking for a way to migrate my backup from a MySQL database to Postgresql. The simplest way I found was by using sed on top of the backup, but it did not work. It was as follows: 1 - Performing a backup 2 - Running the command s...
asked by 13.10.2016 / 18:39
1
answer

Compare NULL using CASE SQL

I have to retrieve 2 fields in this query (number of projects and the management that performs such a project). This query is going to be used to generate a report in JASPER and it does not display field with NULL value, so I want to for...
asked by 08.05.2017 / 16:14
1
answer

Change date to commercial date (MySQL)

I need to change the Date of my database, considering the Business Date used in the company I work for. Here, a business month is between 26/M-1/AAAA and 25/M/AAAA . Where M-1: last month. For example, today the trade date is...
asked by 04.09.2017 / 21:31
3
answers

Select in each answer different values with the Bank MySql

I would like to know how to select the number of records in a table where only values greater than 6 are selected, but in each result it would be different with the MySql database, for example: Tabela Notas Unidade I | Unidade II | Uni...
asked by 02.09.2017 / 18:34
1
answer

SQL SERVER EXPRESS 2014 ERROR (Microsoft SQL Server, error 1225)

Good morning, fine, guys? Next work with database, and we have some problems with SQL SERVER 2014 x64 in Windows 10. I am doing the installation normally and changing the network configuration, in TCP / IP, to a specific port that we use....
asked by 28.10.2016 / 13:47
1
answer

How to do date search through dateTimePicker?

How do I search through a dateTimePicker (with ValueChanged event) dates entered in a Data Grid View? When you load the year you want all the records for that year to appear, then load the month and show all records for that year in th...
asked by 04.09.2016 / 14:26
1
answer

Difference between List and and Return in Entity

Hello, I have a question when I get the data of a SQL query, there is the possibility of pulling by list and by Entity, what would be the "most correct" or usability of each? public List<Usuario> buscarTodos(Usuario mod){...} public Usua...
asked by 02.08.2016 / 20:58
1
answer

Error when grouping table field

I need to group the data of a SELECT by the a.afo_vch_NmrCtf field, because the data is being returned as follows: When I use GROUP BY the following error is returned: Msg 8120, Level 16, State 1, Line 2 Column 't...
asked by 22.09.2016 / 15:30
1
answer

Function to read file via ODBC

Hello, it must be a very simple problem, but I have already looked a lot and I could not find a solution to my question. My configuration is: R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows...
asked by 11.01.2017 / 13:23
1
answer

How to find a string that varies in position

See below two results returned from a table where I store sqls query execution plan. I use POSTGRESQL I need to capture only the string cost = 399301.55 of the result below. The word cost always comes at the beginning, but it does not always com...
asked by 14.01.2017 / 20:58