Posts by Jose Rocha • 73 points
6 posts
-
0
votes3
answers162
viewsA: Create tables randomly
You can split using the NTILE function, example: DECLARE @Count int ,@MaxRowsPerTable int = 5 SELECT @Count = COUNT() FROM dbo.Pessoas /* Número máximo de tabelas que serão criadas */ SET…
-
0
votes2
answers1731
viewsA: I can’t restore my backup
Pnet, for the first screen, the error informs that your exclusive access attempt was not possible. This happens, when there are one or more sessions open, in the bank that you try to overwrite. A…
-
2
votes2
answers815
viewsA: Can a worse cost query be a better performance query?
The Estimated Subtreecost is individual and exists for each operator created in the execution plan, so the increase in the estimate of this specific operator does not mean a heavier query, but only…
-
1
votes1
answer728
viewsA: Select column type that comes in a SELECT
You can use the metadata table SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS, but you won’t be able to relate to your table. There are two alternatives to this. In the first, it will be necessary…
-
1
votes2
answers723
viewsA: SQL SERVER and Active Directory integration
It is not possible, because AD uses a base of its own, so the information is concentrated on this basis. However, it is possible to do the opposite. Just create an application adapt your…
-
0
votes5
answers36671
viewsA: How to get the total character size of an SQL column?
Taking advantage of the cue, DATALENGTH has varied behaviors, depending on the type of data you use, example: DECLARE @exemploChar char(30) SET @exemploChar = 'stack' SELECT DATALENGTH(@exemploChar)…