Questions tagged as 'sql'

1
answer

Compare all the records in table "A" with each record in Table "B"

I am a programmer and rarely use a database, I came across an unusual situation of converting multiple .DBF files and saving everything in the database in their respective tables, however some files surpassed more than 3 million records, as a pr...
asked by 26.10.2015 / 23:52
1
answer

Incorrect syntax near '-' in Insert

I developed an application for registration of Transport Clients linked to an "MDF" database, trying to save to the database gives the error:    "Incorrect syntax near '-'" I have tried everything, changed the codes, changed several thing...
asked by 24.10.2015 / 16:32
1
answer

Error writing database log record

I have a database with MySQL. I am doing the log of this database. Most are working, but I can not get the registry id that has been modified. Example : When changing some data, it should be saved in the log id of the record that was cha...
asked by 06.11.2015 / 12:51
1
answer

I can not give a grant in a schema

I'm working with a SQL Server 2012 database and I'm trying to assign a grant to a schema with the following command: GRANT INSERT ON SCHEMA :: trunk TO trunk And I'm having the following error: Cannot grant, deny, or revoke permissions to...
asked by 23.09.2015 / 19:48
1
answer

Instantiation error for class

Good afternoon, I have looked several times and I do not understand the reason for this error. I need to instantiate the "created variable" that is in the JFrame for the class UserM. It just says that in the line that the "created variable" n...
asked by 04.12.2015 / 18:22
3
answers

SQL Server subquery is always returning null. How to fix.

I have a procedure and a COMMON TABLE EXPRESSION (subquery). This my CTE does a search and offers to my query the result, my query then uses the results of it. In my Address table I have a "Complement" field that allows null values. However w...
asked by 02.12.2015 / 05:05
1
answer

Increase sql performance

I have this function below that executes this SQL, but the execution time of this SQL is too high would I have any way to decrease the execution time? At the time of loading the page takes about 5 seconds to execute the query below. Would you li...
asked by 02.06.2016 / 19:08
1
answer

Update a div with sql data without reloading the page

Hello everyone, I'm doing a site in php, in which there is a button section. When I select a button, it should do a search in the DB and with the result, update a div under the buttons, without reloading the page. It is an e-commerce system,...
asked by 28.10.2015 / 17:49
1
answer

Remove duplicate records from a table

Having the following tables without keys yet defined: Airplane (code_auto, company_code, year, motor_type, type, state) Flight (FlightCode, FlightNumber, flightCode, CompanyCode) In some cases, about 400 records from the airplane table,...
asked by 17.09.2015 / 13:44
1
answer

How to include or remove enter, line break, new line of a string - Postgresql

How to remove or include "line break", "enter", "new line" of a string result in postgres. The result is: comentário Texto do comentário Mais texto And I want to: comentário Texto do comentário - Mais texto Or the other way round  ...
asked by 16.10.2015 / 22:21