I have a table called cadcha (call register) in the database where all the calls made by the employees of a certain company are stored.
cadcha
--------------------------------------------------
nreg |telefone |telpretot |ramaldest...
Hello, could anyone tell me if there is any significant performance difference in the two ways of doing INNER JOIN below?
Way 1:
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name=table2.column_name;
Way 2:
SELEC...
I have the following SQL:
SELECT id_grade
,MAX(data_lancamento)
FROM faturamento_produtos
WHERE data_lancamento < '01-01-2010'
GROUP BY id_grade
Where it does the search only for what was released before 2010.
I have another...
I have a Decode in my select like so:
.....
DECODE(MAT.IND_TIPO_MAT_MED,
'1', 'BRASINDICE',
'2', 'SIMPRO',
'9', 'TABELAPROPRIA') TIPOTABELA,
.....
I need to pass these values on the where clause, sinc...
I put a query where I bring some information, of which the last column returns positive, negative and zero values.
I do not want to display the rows with negative values, but I'm not sure how to do that.
This is Query
SELECT C.SG_CONCESS...
Now, I'm querying two tables with INNER JOIN like this:
if (! $db->Query("select * from cad_produto inner join cad_variacoes on cad_variacoes.id_produto = cad_produto.id"))
$db->Kill();
while (! $db->EndOfSeek()) {
$row...
I have installed SQL Server 2014. When I start PowerShell on Windows Server 2008 R2 and do the "sqlps" command to test, this error occurs which shows in the image below ...
On another computer, with windows 7 and the same version of SQL Serve...
I have a clients table containing CLIENT_ID, CLIENT_NAME, and another table containing CLIENT_APROVED.
The approval table is populated with SOME clients of the clients table but only the NAMES of the clients. I wanted to replace the name with...
I'm trying to put together a SQL to display the results of a School Report Card. In the notes table I have the data as follows.
Table Notes
MATERIA | NOTA | PERIODO
PORTUGUES | 5.0 | 1Bim
PORTUGUES | 10.0 | 2Bim
PORTUGUES |...
I have a sql query where it brings the total of a value entered into a date, however I want to show in the result the dates that generated zero, even though it does not contain information in the database, I always search in a period and the day...