Questions tagged as 'sql-insert'

2
answers

SQL Insert with line break

With this SQL command I enter some data in the table, the problem is, in the system the field "ROUTES_PROCESSUAIS.OBSERVACAO" is with line breaks and at save time via SQL the line break is lost. Would you like to make this SQL insert...
asked by 26.04.2018 / 15:20
1
answer

Apostrophe causing error when inserting data in MySQL

I am a beginner in PHP and I am creating a personal project to consolidate my knowledge until I came across a problem, when entering a name that has an apostrophe this apostrophe causes INSERT INTO not to execute causing the data are not...
asked by 09.03.2015 / 17:24
1
answer

Problems sending FILE to Database

I'm having a problem sending FILE data to DB. With the help of @zuul I came to this problem. <?php require("conectar.php"); //chama o arquivo de conexão ao BD if (isset($_POST['Nome'])) { $Nome = $_POST['Nome']; } $Morada = $_POST['M...
asked by 28.02.2014 / 12:18
2
answers

Error with insert in SQL Server: The conversion of a varchar data type to a datetime resulted in an out-of-range value

Next I have to do a search and implement a query in the database using Merge and I have to do this using one of the scripts used in class. The problem is that when I run the script it gives the following error in insert and the...
asked by 20.11.2017 / 17:31
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

Add tag in all repetitions of a given word

See the code below: <style type="text/css"> .format{ color: red; font-style: italic; } </style> <div> <p>texto texto texto 'palavra-chave'. texto 'palavra-chave', texto texto.<p> <...
asked by 23.12.2014 / 19:34
1
answer

Bypassing the primary key duplication error

Hello, I have the following script, .sql, to create a table and also create a trigger. SET client_encoding TO 'LATIN1'; CREATE OR REPLACE FUNCTION before_insert() RETURNS trigger AS ' DECLARE n integer; BEGIN IF tg_op = ''INSERT'...
asked by 19.01.2018 / 18:41
2
answers

Set default SQL Server column value

I would like to know how to set an insert pattern in a column in SQL. Example: CREATE TABLE XPTO( ID INT IDENTITY(1,1), NOME VARCHAR(100) NOT NULL, ATIVO CHAR(1) NOT NULL) In this case, I want to limit the ACTIVE fie...
asked by 15.03.2017 / 17:14
2
answers

Insert in mysql with strtoupper is not accepting numbers and letters

I'm doing the following insert: <?php include "conexao.php"; $v_tipo = $_POST ["tipo"]; $v_funcao = $_POST ["funcao"]; $v_numero = $_POST ["numero"]; $v_responsavel = strtoupper($_POST['responsavel']); $v_tag...
asked by 10.05.2016 / 17:02
2
answers

Format date (from a txt file) to Insert in MySql

Follow the code: //informações necessarias para inserir no DB. coo := copy(lTemp,53,6); ccf := copy(lTemp,47,6); ecf := copy(lTemp,4,20); //Data sendo formatada para ser inserida...
asked by 15.05.2014 / 20:23