I have a question about how to ask a question to the database.
Suppose I have two tables with slightly different structures
Table1
id tipoA data
0 A '21/12/14'
Table2
id tipoB data
1 B...
I have this query:
select
Q.id,Q.questao,
D.disciplina,
S.serie,
S.ensino
from questoes as Q
left join capitulos_questoes as CQ
on CQ.questoes_id = Q.id
left join modulos_questoes as MQ
on MQ.questoes_id = Q.id
left join banco_discip...
I have always worked with ASP connections using ADODB and navigating the logs that the query returned to me was not a problem since they were:
<%
rs.movenext //anda para proxima linha do retorno da query
rs.moveprevious //anda para linha an...
Recently I did tests on a database with a query using two clauses where AND. I noticed that there was a significant difference using clause A before B and vice versa.
Intuitively, it would be faster to use FIRST the more restrictive criterion...
I have a query that brings me the first 3 letters of the name of a month with the last two digits of the year for example: JAN.16 in my combobox it brings me months independent for example: JAN.16 FEV.16 ... and on and on.
I wanted the combob...
How can I check if a field of type ntext is null or empty in where ?
I have the following select
SELECT Subject, Notes from DocumentNotes
where Notes is null or Notes = ' '
but when compared it returns the following error...
I'm having problems with listing and searching table data with more than 200,000 records.
I read in searches, that for the search system, the ideal would be to do indexes of the type "fulltext" in the fields where it will be will have a searc...
I work with some huge tables in a system I've developed. These tables are constantly being updated and sometimes the query becomes slow. Some of them have more than 100,000 lines.
I would like to know how often I should run the optimization c...
I would like to know if there is any way to make a select using a where for a field with a parameter other than < > , with two or more items.
To facilitate following example:
select * from TAB_DESPESAS where cd_ite...
I have 2 select which are basically identical, changing only 1 table. I'm trying to put the 2 in a single select, but I'm not getting it.
Follow the select:
SELECT DISTINCT
a.id,
a.unidade,
a.posicao,...