Posts by Advaldo Paiva Moreira • 139 points
5 posts
-
3
votes2
answers652
viewsA: I cannot place a subquery inside the IN in the PIVOT
I knew I’d seen something, I just couldn’t remember where. Devmedia has the same example: CREATE PROCEDURE [dbo].[OBTER_COLUNAS_DINAMICAMENTE] AS SET NOCOUNT ON DECLARE @COLUNAS VARCHAR(MAX) SET…
-
3
votes3
answers4590
viewsA: SQL use variable in column name
Via SQL itself, you must use EXEC: declare @sql varchar(max) set @sql = 'SELECT IDLayout, Nome, '+@collum+', TipoProduto FROM ProdutoLayout with(nolock) WHERE (TipoProduto = '+@tipo+') AND…
-
2
votes2
answers2742
viewsA: How to Migrate SQL Server Database to Oracle
There is the Microsoft SQL Server Migration Assistant for Oracle that can help you. It lists the objects that can be migrated natively and possible errors. Some items like encrypted objects it does…
-
1
votes1
answer124
viewsA: Batch calling "dtsx" does not connect to Avaya CMS
Are you running this DTSX per command line in your batch? If yes, pass the login and password parameters to the base. in Dtexec, we have the /U --> User and /P -- Password If it is not that, you…
-
4
votes2
answers6682
viewsA: What would be the way to validate the CPF checker digits in a DB using only a SELECT?
I use the script below in Sqlserver for validation of a CPF. You can create a function and call it select CREATE FUNCTION CPF_VALIDO(@CPF VARCHAR(11)) RETURNS CHAR(1) AS BEGIN DECLARE @INDICE INT,…