Questions tagged as 'sql'

2
answers

Type misconfiguration error

Trying to write to an SQL table an image, its name and description, and any foreign keys to allow me to subsequently search. On execution I get conversion error from to Int 32 . But all the fields in the table are set correctly. What am...
asked by 22.01.2018 / 17:21
0
answers

implicit conversion (varchar to varbinary) not allowed, use the CONVERT

I'm trying to make a system that gets images and saved them in a specific database, but I can not solve this error (I already applied CONVERT in SQL but it did not solve). (Error Area) //Aqui vai entrar a gravação do db SqlConnection conect =...
asked by 22.01.2018 / 10:56
1
answer

PHP is not returning the query data

Hello, I'm using the following code to return the regions: $query = 'SELECT * FROM Regiao'; $json = array(); $result = mysqli_query ($conn, $query); while($row = mysqli_fetch_array ($result)) { $regiao = array(...
asked by 20.01.2018 / 15:42
1
answer

Error writing to SQL table from WindowsForm

I am trying to write to a table several fields of a Windows Form App. Some of these fields are foreign keys from other tables. If the fields have values, the SQL statement executes but if they do not have values I get a conversion error (Text to...
asked by 20.01.2018 / 20:32
0
answers

Error displaying message in PL-SQL

Code DECLARE BEGIN FOR I IN (SELECT * FROM PRODUTOS_TESTE2) LOOP DBMS_OUTPUT.PUT_LINE(I.codigo|| ' - ' || I.categoria || ' - ' || I.VALOR); END LOOP; END; Error message: Relatório de erros - ORA-06550: line 5, col...
asked by 24.01.2018 / 21:43
0
answers

Error oracle ora-06550 pls-00103:

I have this PL-SQL code: /*1. Criar um bloco PL/SQL anônimo para imprimir a tabuada abaixo:*/ DECLARE VN CONSTANT NUMBER(2) := 5; BEGIN FOR i IN 1..1O LOOP DBMS_OUTPUT.PUT_(VN || ' X ' || i ||'='|| VN*i); END LOOP; END; Er...
asked by 25.01.2018 / 05:32
0
answers

get_where for PDO

I want to change get_where to mysql or PDO, but I do not know! Help ...! public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { if ($table !== '') { $this->from($table); } if ($where...
asked by 18.01.2018 / 22:57
1
answer

Check codes that are not in the database with a query

I know that I can check codes that are in one table and are not in another with the following query : SELECT cod FROM tabela1 WHERE cod NOT IN (SELECT cod FROM tabela2) But how can I check the records that are not in a table but are in a c...
asked by 26.01.2018 / 14:54
1
answer

Function max E Cast JUnta Sql Server 2008 R2

I need to convert a field from Nvarchar to Float in a search, and get the highest value. This function works SELECT MAX(valor) from [Enops].[dbo].[Tbl_Pulsomedia15_Vazao_Eta_B_Bentes] Where valor <> 'processando' and valor <>...
asked by 17.01.2018 / 11:58
0
answers

Compare values of two tables in a Procedure

I have an application that lists in a grid files that are registered in the table    SCF_Process Documentation However, now I need to list only if this file also exists in the table    SCF_ARQUIVO_UPLOAD What the application does i...
asked by 24.01.2018 / 19:29