We have the culture to only make logical exclusions in the application, maintaining 2 fields where 1 is the deletion date and another one that receives 'S' or 'N'.
When we perform searches for undeleted records, we do something like:
select...
How can I make a dynamic update to all database tables for a specific column common to all my tables?
I'm thinking of using the catalog table to raise the database objects but how can I build the dynamic update for each table that the select...
I have two columns of type datetime . I have tried in many ways to get the difference between them, but the number of days always goes incorrect.
Example:
Data1: 2018-01-17 17:00:00
Data2: 2018-01-18 10:00:00
Resultado obtido: 01 17...
I have a table called Estoque , where it has the columns NOME_PRODUTO , DATA , among others.
The idea is that when I make a SELECT Using the date as a parameter, all the products that were in stock on that day are return...
In another question I asked I had found a solution but the sort order works only if the ID's are growing:
USE TESTE
GO
WITH Niveis AS (
-- Membro âncora
SELECT Id, IdPai, convert(varchar(1000), Nome) as Nome,...
I would like to pass a list of parameters to a procedure, how to do this process?
I did some research and found that it is possible to create a TABLE TYPE and use it in the procedure parameters, but I could not use it, for example.
CREATE T...
I need to import data that is in an Access database via code to Sql Server.
My software that is made in C # for many years has been integrated into an Access database. From now on we are migrating to Sql Server and the intention is that in the u...
I'm doing replaces of some texts (Mask) of a field of a temporary table. I'm replacing where text is searched for by a field from other tables.
Example:
SELECT TOP 1000 * INTO #TEMP_COMPL_L FROM TB_CONTRATO WHERE IDCAR_CON = 1
ALTER TABLE #...
I'm partitioning a table in my database, I created the function partition and the scheme partition. But when I go to the Create partition Wizard the Radiobutton Existing partition function is disabled even with function created. It's the sam...