This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE tabla1 t1 | |
SET t1.valor = (SELECT t2.CODE FROM tabla2 t2 WHERE t1.valor = t2.DESC and t1.fecha=t2.fecha) | |
WHERE t1.filtro='correcto' | |
AND EXISTS (SELECT t2.CODE FROM tabla2 t2 WHERE t1.valor = t2.DESC and t1.fecha=t2.fecha); | |
-- O | |
UPDATE | |
(SELECT t1.valor as OLD, t2.CODE as NEW | |
FROM tabla1 t1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
class TestsFail: XCTestCase { | |
func testGettingJSON() { | |
Request.sharedInstance.getAllData { (error, result) in | |
XCTAssertNil(error) | |
XCTAssertNotNil(result) | |
ex.fulfill() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rand = Int(arc4random_uniform(10)) // numero random en base a 10 | |
let rand2 = Int(arc4random()) // numero random | |
print("numero1: \(rand), numero2: \(rand2)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cadena : String = "Cómo saber cuantos caracteres tiene un String en SWIFT" | |
print(cadena.characters.count) | |
//Output: 54 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timeout 100 | |
KeepAlive On | |
MaxKeepAliveRequests 1000 | |
KeepAliveTimeout 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DECODE (PRICE_EVENT_TYPE, | |
'PC', | |
'Cambios de Precio', | |
'PS', | |
'Inicio de Promocion', | |
'PE', | |
'Fin de Promocion') PRICE_EVENT_TYPE, | |
DECODE (STATUS, | |
'N', | |
'Nuevo / Por Comenzar', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT st.id_flex_structure_code "Chart of Account Code", | |
sg.id_flex_num "Chart of Account Num", | |
sg.segment_name "Segment Name", | |
sg.application_column_name "Column Name", | |
sg.flex_value_set_id "Value Set Id", | |
sg1.application_column_name "Parent Column Name" | |
FROM apps.fnd_id_flex_structures st | |
INNER JOIN | |
apps.fnd_id_flex_segments sg | |
ON st.application_id = sg.application_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT tabla1.columna, tabla2.columna | |
FROM tabla1 | |
[NATURAL JOIN tabla2] -- o | |
[JOIN tabla 2 USING (nombre_columna)] -- o | |
[JOIN tabla2 | |
ON (tabla1.nombre_columna = tabla2.nombre_columna)] -- o | |
[LEFT|RIGHT|FULL OUTER JOIN tabla2 | |
ON (tabla1.nombre_columna = tabla2.nombre_columna)] -- o | |
[CROSS JOIN tabla2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT LEVEL, COD_EMPLEADO, CARGO | |
FROM EMPLEADOS | |
START WITH COD_EMPLEADO = 1 | |
CONNECT BY REPORTA_A = PRIOR COD_EMPLEADO; | |
-- OUTPUT: | |
-- LEVEL COD_EMPLEADO CARGO | |
-- ----------------- ---------------------- -------------------- | |
-- 1 1 CEO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table nums as | |
select level as num from dual | |
connect by level <= 100; | |
-- Table created. | |
select count(1) as cnt from nums; | |
-- CNT | |
-- ------------ |
NewerOlder