Posts by Jander Helius • 41 points
4 posts
-
1
votes3
answers55
viewsQ: I tried a Union consultation but did not get the expected result
I made a query with two selects using union and it has two columns: MOBI and DESMOBI. I need the result to show these two columns. when I run it shows only the column MOBI`. Below follows the query.…
-
1
votes2
answers99
viewsQ: Return values less than 10 from a column with Datediff
I need to return values less than 10 in a column with DATEDIFF and others between 10 and 20 of the same column. Someone can help me? SELECT CONVERT(VARCHAR(10), (MAX(REMESSA.DT_USO_FIM)),105) AS…
-
0
votes1
answer1324
viewsQ: Select the line with the oldest date within this query between the repeated values
select e.nm_equipto as EQUIPAMENTOS ,Max(remessa.dt_uso_inicio) as DATA_REMESSA --,(SELECT MAX(DT_ENTORC_OFICINA) FROM ORCOS)as DATA_ABERTURA ,MIN(dt_entorc_oficina) as DATA_ABERTURA ,o.numero as…
sql-serverasked Jander Helius 41 -
0
votes4
answers3265
viewsQ: Select only 1st row of table
I need to select only row 1 of the table, I’ve used the DISTINCT and it didn’t work follows the Query: select Max(remessa.dt_uso_inicio) as DATA_REMESSA ,min(dt_entorc_oficina)DATA_ABERTURA…