Questions tagged as 'sql'

0
answers

How do I make two references from one table into two tables?

Well, I have 3 tables tbl_users tbl_article tbl_profile I need tbl_usuarios to be related to tbl_artigos and tbl_profiles.  How could it be done? Tbl_users table: +-----------------+--------------+------+-----+---------+---------...
asked by 14.10.2016 / 23:37
0
answers

Trigger to update a field automatically after insert

I have a user table, basically: CREATE TABLE IF NOT EXISTS 'sistema'.'user' ( 'id_user' INT NOT NULL AUTO_INCREMENT COMMENT '', 'hashed_id' VARCHAR(40) NOT NULL COMMENT '', 'nome' VARCHAR(40) NOT NULL COMMENT '', 'cpf' VARCHAR(15) NOT...
asked by 20.09.2016 / 19:28
0
answers

Calculation in Excel and PHP / SQL with different result

I made the calculation of a column in my worksheet and the value is X. However, when I perform the column calculation with SQL using SUM, or even in a loop with PHP, the value is different. The funny thing is that the values between SQL / PHP...
asked by 20.09.2016 / 22:32
2
answers

Query returning error in query between date range

Inquiry: SELECT ROW_NUMBER() OVER(ORDER BY V.DATA ASC) AS ID, V.CHAPA AS CHAPA, F.NOME AS NOME, V.DATA AS DATA, CASE WHEN V.BATIDA IS NULL THEN 0 ELSE V.BATIDA END AS FOLGA FROM ARELBATIDATRANSITOVIEW...
asked by 20.10.2016 / 19:12
1
answer

ComboBox and SQLReader

I have a ComboBox with a list of items that contains names that are generated from my database (I draw the name of the coluna beer that are allocated in the table) : private void Form1_Load(object sender, EventArgs e) { try...
asked by 04.10.2016 / 01:51
0
answers

Problem Connection DB

I am doing a C # system, I connected the database (Access) and the program asked to copy the database to the system folder and everything. The problem is that the application is not saving the data in the system folder bank, I have to direct...
asked by 03.10.2016 / 19:19
0
answers

Search for a MySQL record without using? id = id in the URL

guys, I'm trying not to use the $ _GET [] link, but I can not figure out how to do that. That is, instead of "site.com/?post=nome news" stay "site.com/nome-noticia". I already ran forums and in the Stack also behind a solution, but I did not fin...
asked by 21.10.2016 / 23:49
0
answers

Querying multiple MySQL data

I'm doing a chat and I have the following table in the database: Iwanttolistthelast5conversationsofauser,butthequeryisverycomplex,I'mtryingtoresolvewithsubqueries,butIdidnotcomeupwithanything,itshouldmeetthefollowingrequirements:Theuserinque...
asked by 02.10.2016 / 03:19
1
answer

SQL allocate record (RowLock)

I'm developing an application, and I'm facing a problem about registry competition. What happens is that I have several people who can access the same record, so I needed that when a user clicked edit, I would allocate that record. Finding...
asked by 26.09.2016 / 18:18
1
answer

Check for UK before creating a

I have the following query: alter table FINALIDADE_OPERACAO_MODAL add constraint UK_t127pwh154arjh5whq0g4dlrm unique (NOME); As I create a function that checks if it exists before, and if it does not exist, it creates, and if it al...
asked by 26.09.2016 / 19:19