Most voted "sql-insert" questions
INSERT is the ANSI standard SQL command to insert records into the database.
Learn more…213 questions
Sort by count of
-
1
votes1
answer93
viewsInsert does not work
I am trying to create a login log of my page, and store this information in the table stat however I am not succeeding and is not returning any error. I put an IF to signal if the inclusion was…
-
1
votes1
answer36
viewsPostgre Insert null in char(3) does not work
Below the error and the code I’m running Has two fields of this table that are defined as char(3), the field uf and the countryside ufcrm. Does anyone know how I can do this insert? SQL error:…
-
1
votes0
answers35
viewsCopy tables to another bank while maintaining relationships
I’m trying to send some records from one bank (bank A) to another (bank B) that contains the same structure. They are records of 3 tables, 1 table(patient) contains MAIN records and the other 2(file…
-
1
votes0
answers25
viewsProblem with Trigger in select/Insert
Personal I created two entities, where the information of one is manipulated by the other. That is, I own an entity conta and another conta_extrato the balance of the entity account is modified only…
-
1
votes1
answer49
viewsPDO does not return error even in a Try catch block
I was trying to register in a mysql database using PDO. Do not register but even so I did not have an error return despite the block try catch. I later discovered that the error was the column size…
-
1
votes1
answer28
viewsInsert a select in c#
Good night! Personal, I have a select working normally and displaying the result in a datagridviewer all straight though, I need to take the result of this query that is done in the mysql database…
-
0
votes1
answer1722
viewsError Code: 1048, SQL State: 23000 Column 'colegiado_id' cannot be null
Hello, this mistake "[Error Code: 1048, SQL State: 23000] Column 'colegiado_id' cannot be null" happens when I try to run the SQL command below directly in Mysql: start transaction; INSERT INTO…
-
0
votes2
answers479
viewsI cannot insert in related tables
I am in trouble. I normally insert in the table "equipment" of my code and normally populate the mysql BD. However, the table "dell" is empty, even passing the reference of the ID of the table…
-
0
votes1
answer237
viewsDoctrine Insert regarding Many-to-Many unidirectional
I have the following situation: In my Local entity: /** * @ORM\ManyToMany(targetEntity="Contato") * @ORM\JoinTable(name="contato_localidade", * joinColumns={@ORM\JoinColumn(name="localidade_id",…
-
0
votes1
answer620
viewsAdd Letter in a field with 20000 lines
I have a table produto filled with 20000 products and I need to add one o in the first character of the field codigo all-line. How can I do this with Mysql?…
-
0
votes1
answer58
viewsWrite to two or more Mysql tables
Doing this with two or more separate Inserts in the same function is simple, but is there any more correct way that consumes the least amount of resources ? On the platform we are working on, all…
-
0
votes1
answer72
viewsIs it possible to reuse this complex function for multiple registrations at the same time?
On the site I took over from a previous developer, the investor registration is done one by one after a search in the system called CM. The function is called cadastralInvestidor: function…
-
0
votes1
answer73
viewsCodeigniter not registered
I’m trying to enter some data in the database but I can’t. Some problem in the array that Codeigniter returns. Follow the Controller that the form calls: function cadastrar() {…
-
0
votes1
answer4030
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method on a null Object Reference
I’m trying to enter some values in the bank, but you’re always giving exception. My class that inserts in the bank: private String email; private int codigo; private Button btnOkay; private Button…
-
0
votes2
answers240
viewsINSERT CONCATENATE PHP MYSQL
I am wanting that when entering a register in mysql , according to the id already have something predefined example I will insert a post with the category id = 2 , then the name of my post will be…
-
0
votes2
answers216
viewsPerform Insert into in c#List
One could give an example of what an sql Insert would look like in a list in c#?
-
0
votes1
answer26
viewsSend selected value to an Insert.php file
Good afternoon! I wonder if there is a way to perform an Insert in the database from a selection in a Dropdown. This selection would be sent to a file (example) "Insert.php", in which you would…
-
0
votes3
answers406
viewsInsert decimal variable in Firebird
I am making an Insert in Firebird database in a Value field (decimal), but no decimals appear in the table. Code in C# : public decimal ValorUnitario { get; set; } produto.ValorUnitario =…
-
0
votes1
answer300
viewsCalling methods from another class
In case I need to call a method of another class to perform an insertion in the database and I have to pass an object of type Usuario as a parameter Code: protected void onCreate(Bundle…
-
0
votes4
answers364
viewsError saving form data in php
I’m having trouble passing data from an html form to be processed into a. php file No error message.` <html> <head> <title>Cadastro</title> </head> <body>…
-
0
votes1
answer49
viewsInsertion problems in two Mysql PHP tables
I am trying to make an INSERT in two tables, first I need to insert the information of the vehicle in Tablea 'vehicle_registered' and I need to insert the images in the table 'imagens_vehicle'.…
-
0
votes1
answer678
viewsReceive variable value and insert multiple rows into MYSQL
I have the following variable: $ids = "758,749"; Table has columns: id, id_provider, accepted. When running a PHP script, I would like it to do something like this: INSERT INTO tabela (id,…
-
0
votes3
answers170
viewsColumns do not hit insertion
You’re making a mistake Column Count doesn’t match value Count at Row 1…
-
0
votes2
answers974
viewsInsert several Items with the same IDPEDIDO Sql Sever
Hello How can I enter multiple items for a single Primarykey autoincrement ID of there will still be columns of the Idproducts where I want to insert several items for an Id_request as I do this…
-
0
votes2
answers1175
viewsGet Insert ID after pg_query()
I am using php and postgres on a web system, I have a form that I am saving by using the Insert using pg_query, however, I would like to get the id of the new record after inserting, but I am not…
-
0
votes1
answer41
viewsSynchronize Mysql database with XLS
The situation is as follows. I have a MYSQL database and XLS file on an FTP server The code below downloads the XLS to read and update dos in the database from the XLS data. The problem is that it…
-
0
votes0
answers54
viewsInsert data by PHP
After submitting the form I do the following: $n_processo = $_POST['n_processo']; $nome = $_POST['nome']; $dia = $_POST['dia']; $mes=$_POST['mes']; $ano = $_POST['ano']; $data =…
-
0
votes1
answer6413
viewsINSERT and INNER JOIN together in Mysql?
Hello is possible to use the INNER JOIN together with the INSERT? I have a table A with 3 columns X, Y and Z and table B with columns W, X and Y and I need to insert in table A the column W of table…
-
0
votes0
answers32
viewsUncaught Exception 'Pdoexception' with message 'SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined
Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined' in D: htdocs sistemas imobiliaria admin classes imovel.php:603…
-
0
votes1
answer49
viewsInsert into SQL if record does not exist
I have the following PHP function that adds a row to the table: $idmusica = $_GET['idmusica']; $queryvota=(" INSERT INTO euk_sugestoes_votos (idusuario, idmusica) VALUES ($userid, $idmusica) "); The…
-
0
votes1
answer270
viewsForm making empty Insert
Good morning Galera, They could help me identify what is wrong in my form or in the Insert that is saving empty records in the bank. INSERT: Alert( 'Note successfully registered !!…
-
0
votes2
answers53
viewsINSERT times do not insert all data
I have a little problem, $alta = $_GET['alt-a']; $altb = $_GET['alt-b']; $altc = $_GET['alt-c']; $altd = $_GET['alt-d']; $correta = $_GET['correta']; $img = $_SESSION['imagem']; $questao =…
-
0
votes1
answer192
viewsPHP - How to navigate a radios array?
I have the following code: <?php while($row = mysql_fetch_array($alunosTurma)){ ?> <tr> <td><?php echo $row['NM_NIS_ALU']; ?></td> <td><?php echo…
-
0
votes1
answer97
viewsError inserting image into folder
I am inserting an image into the Database. Only the image name is stored in the database, and the image is stored in a folder. $target_dir = "./uploads/"; $target_file = $target_dir .…
-
0
votes1
answer344
viewsInsert multiple columns and tables into a variable in mysql
I am in a simple dilemma (I believe) I have 3 tables in question.. the Associated table and the Request table and the box. The associate fields are: id, ref_by, name .... The fields of the request…
-
0
votes1
answer142
viewsAjax warns success but does not insert data
I already made an Insert without using ajax and it worked normal, when I used ajax and returned success I thought it was all right but when I went to look in the database the data were not there JS…
-
0
votes1
answer159
viewsMake a select in the database and prohibit the insertion of repeated C# SQL Server data
I am new to C# and SQL Server, I need help to build something that for you is simple for sure. In my database has id, name and CPF. The Key is the ID and it goes automatically, but I also didn’t…
-
0
votes1
answer97
viewsProblem performing a Java INSERT language
Hello community people, I’m with a problem that I think should be very easy but as I am beginner to me is not rs, I have a Insert to realize that stays in a class called ClienteDAO follows code…
-
0
votes1
answer102
viewsTo insert a value passed by parameter in the sql query
I am passing two values of an input to the function "Insert", the values then arriving at the function normally, I am printing them to confirm, but still I can not insert the values passed in the…
-
0
votes2
answers142
viewsWord problem using quotes when doing INSERT SQL
I’m having problems when I will perform the Insert in mysql when I have a word that contains ex Quotes (box d'agua) in any input form, when I have the mysql error saved. I have already changed the…
-
0
votes3
answers405
viewsTrigger that inserts automatic value in a record
Good afternoon, guys. How are you? I’m trying to create a Rigger that when performing a partner registration it automatically marks that the partner is a client. In the database, this field is…
-
0
votes0
answers58
viewsJAVA Sqlserverexception: The index is out of range
Good morning, I’m new to JAVA and I’m having trouble maintaining a legacy system... I use the Eclipse IDE and in it the code is OK, without criticism. I’m reading a form on a web system, picking up…
-
0
votes0
answers37
viewsQuery with Arrays not working PHP SQL
To edit a report, I need to take everything and turn it into an Array. I cannot use UPDATE, because the user can add more lines, having q add. Thus, I thought of first deleting the data that…
-
0
votes0
answers27
viewsHow to insert data into a specialized table?
I have two tables, according to the following logical design: Person(CPF, RG, Name, Address, City, State, Birth date) Client(CPF, Telephone) CPF references Person There are other specializations of…
-
0
votes0
answers16
viewsInsert + sign into a table field with PHP
Follow the SQL command of the Insert that I need to insert in the table, the database is Postgres. '''INSERT INTO pneu_templates (ds_template, cd_brand, cd_usercadastro) VALUES (UPPER('test+'), 86,…
-
0
votes0
answers15
viewsTrigger Count Insert and delete
I have a problem in a Rigger that I have here, I want this Rigger after counting and inserting in table x, it deletes the value he searched in table y, can make him count and insert but I’m not able…
-
0
votes2
answers441
viewsUse the result of an array as value of an Insert - PHP
Good night, I’m having a doubt. I am uploading a file and extracting its contents and inserting in my database, but I have a question how to use the array like the value My file consists of a…
-
0
votes1
answer1038
viewsError inserting data into Mysql table
I’m trying to send data to the MySQL , of a restaurant reservation , but it only worked the first time and now when I try to send will no longer. What possible error in my script? File Connection…
-
0
votes0
answers202
viewsHow to WRITE android data to Mysql using webservices (Asynctask)?
I have an android application that has several buttons on different screens, I must join the buttons clicked and send to Mysql. I read about webservices (http://www.androidpro.com.br/webservice/)…
-
0
votes0
answers165
viewsInsert SQL Server Column does not receive value
I’m trying to get the Insert in a simple table, but a field of it, it’s not saving the value I’m passing it, and the weird thing is that all the other columns get it right. Example INSERT…