Questions tagged as 'sql'

0
answers

Bind condition to a result in SQL

I'm stuck in a query, due to the return condition of the result. The CONF4 field would have to separate the results according to the UF (MS, MT), as in the following example: CONFIG4 MS MT PRODUTO...
asked by 14.12.2018 / 13:49
2
answers

RMySQL - My querys return a list

Hello, I'm working with a database that I usually access with the workbench. To start importing directly into R, I'm using the RMySQL library. I can make the connection and find my tables, but at the time of importing with tbl it returns me a li...
asked by 12.12.2018 / 21:16
3
answers

How to resolve ERROR: HHH000346: Error during managed flush [org.hibernate.exception.SQLGrammarException: could not execute statement]

When I try to run my test class, I get this error below. I do not know what to do anymore, when I comment on the FOLDERAUTOUPDATE attribute of the class ApplicationItv the insertion works in the bank, however I need it. Can anyo...
asked by 10.12.2018 / 11:39
1
answer

Error executing update with subquery

I have the following situation, I need to perform an update on several fields based on the return of a subquery that returns a main code. This subquery is done with join in two tables to get the code. While doing this, I get the following error:...
asked by 11.12.2018 / 19:21
0
answers

Integration between two databases

I have an idea of integrating two databases, at one point I have the PostGresSql with system A and on the other side a Firebird in system B.    For example: I wrote a client on system A and I need to export to   system B. In addition...
asked by 08.12.2018 / 00:29
0
answers

SQL and xp_cmdshell

Good people, I have this little SQL code: DECLARE @StringRTF VARCHAR(MAX), @Posh VARCHAR(8000) SET @StringRTF = (select traduçao from artigos where Cod_Art='01010066') select @StringRTF SET @Posh = 'powershell.exe -ExecutionPolicy ByPass -C...
asked by 07.12.2018 / 16:07
0
answers

How to use bind_param without repeating variables

This code here inserts the parcels of a payment, the m1, m2, m3 and etc are variables that add a month to the current date, for example $m1 = date('Y-m-d',strtotime("+1 month")); $stmt20 = $conexao->prepare(" INSERT INTO esc_...
asked by 07.12.2018 / 15:52
1
answer

Procedure in MySql to clone products, using CURSOR FOR SELECT

I need to clone the data from a table EST_PROD_PRECO_CUSTO_EMPRESA of the company of id x to the same table but of the company with id and. in Pl / Sql I did it that way. DECLARE CURSOR v_precos IS SELECT ID_PRODUTO, PRECO_CUSTO, PRECO_CUST...
asked by 07.12.2018 / 19:29
2
answers

Postgre query error: ERROR: syntax error at or near "WHERE"

I was working with mysql on this project and the query worked normally. At the moment, I'm migrating to postgresql. However, the query stopped working and returns the following error:    ERROR: syntax error at or near "WHERE" My code...
asked by 15.12.2018 / 12:36
2
answers

Update the data associated with a specific name in a Database by PHP and SQL

UPDATE: This question will be long - note that I am very inexperienced in PHP . I have been trying to create a web page that can access a database created in PHPMyAdmin in the last few days, it is currently able to insert data into the databa...
asked by 15.12.2018 / 21:46