Most voted "dql" questions
6 questions
Sort by count of
-
8
votes5
answers6773
viewsSeparate ddd from phone with SQL statement
I have a table with fields DDD and Phone. Some were registered correctly, others the ddd is next to the phone and need to separate. TABLE +--------------------+ | DDD | Telefone |…
-
1
votes1
answer4041
viewsHow to select all tables containing the field with the same name?
I need to search all fields "id_category" in a given database, and bring a list of the tables that contain this field in common, which in this case is the foreign key of the table "sis_category".…
-
1
votes1
answer64
viewsSubquery with the records of a column
I have the following problem... I need to extract the information from a table where it has the following structure: tabela: PROCESSO_VALOR_TIPO Coluna : field_model_ids Dados :…
-
0
votes0
answers109
viewsDoctrine2 + pdo_sqlsrv createQueryBuilder Order By with varchar field does not work
I’m creating a method that takes values for createQueryBuilder() from parameters. I tested in my local database with pdo_mysql driver and it worked perfectly, sorting both by a field of type int…
-
0
votes1
answer38
viewsDQL query using oneToMany in WHERE
This query does not work: public function getByUnidadeAnoSemestre(int $unidadeId, int $ano, int $semestre) : array { $query = $this->em->createQuery( 'SELECT s,u,p FROM ' . Servico::class . '…
-
0
votes1
answer1049
viewsHow to make a "scan" using SQL?
I have the following structure in my database: Table tgffin with the columns: CODNAT, AD_CODNAT_OLD Table tgfnat with the columns: CODNAT, AD_NAT_OLD I want to reclaim the value of tgfnat.CODNAT…