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,...
I have a table and need to return the following:
check based on the recipient column, add up the 3 largest amounts of that recipient, bring in the query only if the sum of the 3 largest are > = 1024:
CREATE TABLE TRANSFERS(
SENDER VARCHAR2(...
I'm having problems catching the current time, in case I'm using CURTIME () , I need to fetch the results that the current time is between the time value of the start time and final time , I tried the following ways, however, without success...
Is query set with Where or other sql commands inside loops like Foreach good practice or not recommended at all? Is there a better way to handle the data without having to make so many calls in the database?
I need the select to return all rows that were entered in July 2010, as shown in the example, regardless of the day. How do I return this query?
SELECT * FROM FRCAST
WHERE DATA_ID = TO_CHAR('07-2010', 'mm-yyyy');
I'm using the MySQL language and am trying to group a profession table with GROUP BY through the query below.
SELECT name, occupation FROM OCCUPATIONS GROUP BY occupation;
But I get this error when trying to group the professions....
Good morning,
I created a new table in SQLServer and I'm testing some scripts to popular the table and I came across the following situation, in my tests I'm doing the insert in the table checking the information and if they do not agree I ma...
I have a question. I think it's not very complex, but I could not solve it.
For example, I have this query:
select * from Paciente where ClinicaID = 3
Your result would be these 3 records:
NomePaciente HoraAtendimento Ativo Clinica...
I used the following query to attempt to 'copy' a record
insert into valores select * from valores where id = 1
However, I get the following message:
An explicit value for the identity column in table 'values' can only be specified wh...
Good, I'm trying to put the pictures on the slide, but the apostrophe is breaking, where is the error? edited below the summary after the tests that I did even using the \.
meu codigo atual
echo "<div class='fill' style='background-image:ur...