Questions tagged as 'sql'

1
answer

Doubt - Query (Do not bring a certain record)

Good afternoon, people! Next, below is a query where it was to bring all the calls that have the description '' Block Customer - Defaulter '' and with id = 572 (clients blocked), however, in that query there are some clients with already been...
asked by 20.07.2017 / 22:46
2
answers

Ensure random sorting of query result

I have the following query, which I use to verify valid IP's of collectors in the network for distribution of items for separation: Select distinct IP, USUARIO, trunc(DATA) from PCN_ROMANEIO_ACESSO PRA Where pra.STATUS = 'OK' AND trunc(pra....
asked by 21.07.2017 / 14:22
1
answer

SQL query is not grouping

I am new to SQL and I am trying to group the data according to the query below, but it is not grouping. The correct one was to exit, for example select left(P.ProjDesc,6), COUNT(P.ProjID) from Projetos P where P.ProjStatus <> 9...
asked by 20.07.2017 / 16:45
1
answer

View wordpress posts with SQL

I'm doing a static site, where all the files are in PHP, however this site has a blog that must be managed by Wordpress, there you ask me and why not do everything by Wordpress? because it is rsrsr order are orders né. Then I had the idea of...
asked by 17.07.2017 / 22:05
1
answer

How to decrypt records from a SQL column - Query

Good morning! Well, how to decrypt records from a column in an SQL query. The field I want to decrypt is coluna MAX(A.Descricao) [Descrição da Última Providência] . SELECT CONVERT(DATE,T.TarData,103) [Data de Abertura], CONVERT(DA...
asked by 04.07.2017 / 16:50
1
answer

Error creating relationships in MySql using WampServer

I've set up the whole database and now I'm trying to make the relationships, when I click on the primary key (referential) and click on the foreign key, the following error appears: "Error: Relational characteristics are disabled!" HowdoIsolvet...
asked by 04.07.2017 / 15:01
2
answers

Limit Result of Inner Join

I have a problem a few days ago. I have a select that does some inners and should return 3 lines, but one of the inners has several results linked to the result searched; how to limit to this inner get only the first result and select continue t...
asked by 08.08.2017 / 15:25
2
answers

Error when using a final static String to construct a SQL query

Good evening person, I've been searching around and I know what to do to get CRUD organized ... I know that the programmer creates a class with the strings, leaving for example public static final String NAME_TABLE = "nome"; and so on, th...
asked by 20.06.2017 / 06:39
3
answers

Columns do not hit insertion

You're giving an error    Column count does not match value count at row 1     
asked by 20.08.2017 / 21:25
2
answers

Checking column padding with CHECK

I'm creating the DB for my TCC and the table Clients are: create table clients( id serial primary key, name varchar(255), cpf varchar(11), cnpj varchar(14), .... I thought of doing a CHECK limiting the OR fill of the CPF or CNPJ, in case th...
asked by 17.08.2017 / 00:58