Questions tagged as 'sql'

1
answer

Parameters in Query

When assembling a Query using AddWithValue. Even if it's right, the return is not as expected. In the example below, the return is Zero var query = "SELECT nome,usuario,email,administrador FROM GSCUsuarios WHERE @parametroWhere = @parametro...
asked by 16.12.2015 / 21:26
1
answer

Read data in a SQL with columns of equal names in different tables

I need to retrieve data from 2 tables. My SQL shown below works perfectly. The problem is that I made a foreach to retrieve the data from the second table by the ID field that is conflicting with the first table since both ha...
asked by 14.11.2015 / 00:53
1
answer

How should data be selected from a table through joins?

By using SELECT to get the data of tabela_A by joining with tabela_B , normally, and assuming it to be the correct form, we use some of the JOIN commands. Ex: SELECT codigo, nome FROM tabela_A a INNER JOIN tabela_B b...
asked by 25.02.2016 / 20:41
1
answer

Problems to enable remote access SQL Server + Android

Good afternoon I made a webservice in asp.net, and I need to access it through an android application. In any normal function, it works normally, but if it is some function that has access to the database, it causes the following error:    A...
asked by 27.01.2016 / 20:07
1
answer

Doubt in SQL Query

Personal I have the following table: --- mensagens id usuario_envia usuario_recebe texto data_envio But I want to list only the "Conversations", for example, I want you to list the messages by grouping them with their respective users who h...
asked by 29.01.2016 / 14:44
1
answer

List friends posts

I have a database with the following structure: Users table: usuario_id Primária int(11) nome varchar(128) nascimento date Friendships table: id_amizade Primária int(11) id_remenente...
asked by 01.01.2016 / 13:22
1
answer

query Sql bringing products that are with zero balance

I have the tables: Produto Departamento ========= ======== Id_Prod id_Departamento Descricao Descricao Produto_Departamento =========...
asked by 13.01.2016 / 18:08
1
answer

Java - Class does not display requested information

Good morning, I need to fix a problem when I request in the "dao.Acess" the get of the Class model.User returns empty = null. When it is called: doLogin (model.Access access) I can see the information through JOptionPane now when I do the...
asked by 02.12.2015 / 12:03
1
answer

MySQL: Pivot (rows for columns) of columns with the result of a query dynamically

I have two sets of tables below: 1: 2: IputaquerythatreturnstheresultsofthetwotablesusingUnion:Selecttbprojeto.projNomeAsProjeto,tbindp.indPNomeAs'Tipo(Ind/Idx)',tbindc.indcValorAsValor,tbproj_cenario.projCenNomeAsCenário,tbidxind_grp.i...
asked by 15.10.2015 / 03:36
2
answers

Join commands in SQL [duplicate]

I have some doubts about the commands inner join , left join , right join and full join , I do not know if it's just the join that makes the joins between the tables, but together it comes with these commands ,...
asked by 03.12.2015 / 12:56