This file contains hidden or 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 * FROM BFPCYFILES.CUMST c | |
WHERE | |
cuslgt IN (2,4) and | |
cusna1 LIKE '%*%' | |
AND ASCII(TRIM(TRANSLATE( | |
cusna1, | |
' ', -- empty string | |
'*()0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' | |
))) not in (10,64) |
This file contains hidden or 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
MERGE INTO BFPCYFILES.CUMST A | |
USING (SELECT * FROM libjuarui.CUMST_b ) B | |
ON A.CUSCUN = B.CUSCUN | |
WHEN MATCHED | |
THEN | |
UPDATE | |
SET | |
A.CUSNA1 = B.CUSNA1, | |
A.CUSSHN = B.CUSSHN, | |
A.CUSLN1 = B.CUSLN1, |
This file contains hidden or 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
Para recuperar permisos en BD SQL Server | |
OPCIÓN 1: Mediante programa PsExec v2.11 | |
Fuente: https://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/ | |
Problem | |
Starting with SQL Server 2008, the local Administrators group is no longer added by default during SQL Server setup; you even have to use a manual step to add the current user as a local administrator. This means that it is possible, especially if you don't use mixed authentication (or have forgotten the sa password), that you can be completely locked out of your own SQL Server instance. I've seen cases where an employee has moved on, but their Windows account, being the only one with Administrator privileges for SQL Server, had been completely obliterated from the system. Of course that person was the only one who knew the sa password as well, and being a local admin or even a domain admin might not help you. | |
The typical workaround I have seen employed is to restart SQL Server in single user mode. However, this approach requir |
This file contains hidden or 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
selfdocumenting code | |
softcoding anti-pattern | |
magic numbers. | |
hacer un mantenimiento que no se tiene que implica desarrollo y que 95% no se va usar... . | |
cuando es una constante y cuando es código en duro? |
This file contains hidden or 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
http://stackoverflow.com/questions/3468154/what-is-webkit-and-how-is-it-related-to-css |
This file contains hidden or 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 UNIQUE NONCLUSTERED INDEX BFIN_BFBMM01_CLIENTES_CUENTAS_02 | |
ON BFBMM01_CLIENTES_CUENTAS(M01_NRO_CTA_IBS) | |
WHERE M01_NRO_CTA_IBS IS NOT NULL | |
GO |
This file contains hidden or 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
http://stackoverflow.com/questions/8086375/what-character-to-use-to-put-an-item-at-the-end-of-an-alphabetic-list |
This file contains hidden or 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
//e.Row.Attributes.Add("style", "cursor:help;"); | |
//if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowState == DataControlRowState.Alternate) | |
//{ | |
// if (e.Row.RowType == DataControlRowType.DataRow) | |
// { | |
// e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='orange'"); | |
// e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#E56E94'"); | |
// e.Row.BackColor = Color.FromName("#E56E94"); |
This file contains hidden or 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 | |
dm_mid.database_id AS DatabaseID, | |
dm_migs.avg_user_impact*(dm_migs.user_seeks+dm_migs.user_scans) Avg_Estimated_Impact, | |
dm_migs.last_user_seek AS Last_User_Seek, | |
OBJECT_NAME(dm_mid.OBJECT_ID,dm_mid.database_id) AS [TableName], | |
'CREATE INDEX [IX_' + OBJECT_NAME(dm_mid.OBJECT_ID,dm_mid.database_id) + '_' | |
+ REPLACE(REPLACE(REPLACE(ISNULL(dm_mid.equality_columns,''),', ','_'),'[',''),']','') + | |
CASE | |
WHEN dm_mid.equality_columns IS NOT NULL AND dm_mid.inequality_columns IS NOT NULL THEN '_' | |
ELSE '' |
This file contains hidden or 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 PROC BuscaValorEnBBDD | |
( | |
@StrValorBusqueda nvarchar(100) | |
) | |
AS | |
BEGIN | |
CREATE TABLE #Resultado (NombreColumna nvarchar(370), ValorColumna nvarchar(3630)) | |
SET NOCOUNT ON |