Questions tagged as 'sql-select'

1
answer

The multi-part identifier "System.Data.DataRowView" can not be associated

try                 { if (cmbFavorecido.SelectedValue != null ) { txtID.Text = cmbFavorecido.SelectedValue.ToString(); cn = conexao.ConectarSqlServer();...
asked by 25.02.2016 / 12:29
1
answer

Perform a select and return the emails in a list

My question is this: I am studying C# and I am working on a project (study only) of student registration. I made a form to send e-mail if the student misses the school, except that I did not implement the faults column and I am doing the...
asked by 27.02.2016 / 19:06
1
answer

Concatenation of a Select field in the ADDTIME

"SELECT at.codigoTurma, " "ADDTIME(t.horaInicioCurso, '00:01:00'), " "t.toleranciaCurso, " "t.horaFinalCurso " "FROM AlunosTurmas at " "INNER JOIN Turmas t " "ON t.codigoTurma = at.codigoTurma "...
asked by 27.07.2015 / 19:10
2
answers

Error adding value sum into the footer of a gridview

I'm trying to include in the footer of a gridview the sum of two columns, but I'm having trouble creating the method that performs this function. I have already set the ShowFooter property to true , now I have to implement...
asked by 16.06.2014 / 04:54
1
answer

Doubt about insert in bank with foreign key using linq

I have a question, how to insert data into a mysql table, using linq, I have the tables below: I'm using the method below to insert: public void inserirCarteira(float cpf, string codigo, double valor, int quant, double vtotal) {...
asked by 11.06.2014 / 04:12
1
answer

Relate sub query table with main query

SGDB: MySql. PROBLEM: I need to somehow relate the subquery (being table and field highlighted in Functional.codZone1) to the table "Zone", which is in the main query. Is there any way? "ZONE" table: Contains all Zones of the city. Tab...
asked by 15.04.2014 / 17:01
1
answer

Count grouping per week

I have a table in MySQL and am trying to group it by week (may be week of the year) Select count(id),month(data_tarefa), year(data_tarefa) from tarefas group by mes, ano So it works cool, but I would need to group by week, I researched and...
asked by 17.02.2014 / 16:49
0
answers

How to Relate a Table with Another Table where the field to relate is an XML

I'm having a SQL Server database from a system that has been discontinued. In this database, there is a MOVIMENTACAO table and a EQUIPAMENTO table, where you would set a N:N relationship. The problem is that instead of ha...
asked by 27.11.2018 / 14:22
0
answers

Miscellaneous Update's from a select RAND

UPDATE 'tabela' SET 'Relacionar_A' = (SELECT 'Relacionar_A' FROM 'tabela' WHERE 'Relacionar_A'='' ORDER BY RAND() LIMIT 2) I can only do% single , only 1 record from update . What I would like - and that I did not get a look for (pro...
asked by 07.08.2018 / 02:01
0
answers

Is it worth using index for table in MySQL that stores chat messages? [closed]

Friends, I read several posts about using index in MySQL database tables, their advantages and disadvantages, but I still had a question for my situation. Consider over 300,000 registered users and they can talk to each other when one adds th...
asked by 08.06.2018 / 01:55