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
$(document).ready(function(){ | |
/** | |
* Setea e inicializa la tabla con datos | |
*/ | |
$("#tbl_ajax").DataTable({ | |
"ajax" : URL_SERVICIO, | |
"columns" : [ | |
{"data" : "col1" }, | |
{"data" : "col2"}, |
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 #tabla_temporal ( | |
id_tabla BIGINT | |
,cd_columna_01 BIGINT | |
,gl_columna_02 | |
) | |
CREATE NONCLUSTERED INDEX idx_tabla_temporal ON #tabla_temporal ([id_tabla]) | |
-- Otras formas de definir indices |
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 USER [USUARIO_OTRO_ESQUEMA] FOR LOGIN [USUARIO_OTRO_ESQUEMA]; | |
GRANT SELECT TO USUARIO_OTRO_ESQUEMA; |
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
-- Lista de tablas | |
SELECT * FROM INFORMATION_SCHEMA.TABLES | |
-- Lista de SP's | |
SELECT * FROM INFORMATION_SCHEMA.routines where routine_type = 'PROCEDURE' | |
-- Lista de tablas con las columnas y sus descripciones | |
SELECT sys.objects.name AS TableName, | |
sys.columns.name AS ColumnName, | |
ep.value AS Description |
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
dir /b /s /a-d >lista_archivos.txt |
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
'fsutil file createnew <NOMBRE_ARCHIVO> <TAMAÑO EN BYTES> | |
'Para el cálculo de bytes https://es.calcuworld.com/informatica/calculadora-de-bytes/ | |
fsutil file createnew archivo_3_megas.pdf 3145728 |
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
IF OBJECT_ID ('spa_XXX_ACT_NOMBRE') IS NOT NULL | |
DROP PROCEDURE spa_XXX_ACT_NOMBRE | |
GO | |
CREATE PROCEDURE spa_XXX_ACT_NOMBRE | |
AS | |
/* | |
!IniHeaderDoc | |
***************************************************************************** | |
!NombreObjeto : spa_XXX_ACT_NOMBRE |
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
/** | |
* Listado de meses en español | |
*/ | |
class Util { | |
/** | |
* Lista de meses | |
*/ | |
public static function Meses () { |
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
-- Obtención de un objeto DATETIME desde una cadena de texto | |
SELECT CAST('20200101' AS DATETIME) AS fecha | |
-- resultado | |
-- 01/01/2020 0:00:00 | |
-- Resta de un mes a la fecha obtenida desde una cadena de texto |
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
-- Lista de claves foraneas, solo información | |
SELECT name AS 'Constraint', | |
OBJECT_NAME(parent_object_id) AS 'Table', | |
OBJECT_NAME(referenced_object_id) AS 'Referenced Table', | |
is_disabled, | |
is_not_trusted | |
FROM sys.foreign_keys; | |