Posts by Ruberlei Cardoso • 113 points
11 posts
-
3
votes3
answers634
viewsA: Like bringing in salesmen who made and didn’t make sales yesterday?
Yes it is possible, make a UNION the first you already have that are the ones that made sale, already the second do almost same thing, however, no order table. /* FUNCIONARIOS QUE REALIZARAM VENDA…
-
1
votes1
answer256
viewsA: Version error when attaching sql server database
You are probably trying to restore a backup of a higher version on an SQL Server with lower version, for example, your backup is from SQL Server 2014 and you are trying to re-store in SQL Server…
-
1
votes1
answer145
viewsA: Generate XML content HASH in SQL
In that case what you can do is create a CLR and hash via CLR that in the case would be in C#. Take this example…
-
0
votes1
answer89
viewsA: Drop Index with SQL variable
Run as an example below. EXEC SP_EXECUTESQL 'DROP INDEX ' + @indexeee + ' ON pdv.produto.colecao';
-
0
votes3
answers75
viewsA: Doubt with registration grouping
Good night all right ? See how it should be done. I also changed the total stock, as it was done, for each record that returned in select it did select to see the stock, changed to work with a data…
-
1
votes1
answer216
viewsA: Import sql server backup from another server
You are probably trying to restore a backup of a higher version on an SQL Server with lower version, for example, your backup is from SQL Server 2014 and you are trying to re-store in SQL Server…
-
3
votes1
answer548
viewsA: Sql Server Error: is not a recognized Function name
The ORIGINAL_LOGIN() command is as of 2008 as described in the command documentation. Link Same thing for APP_NAME() and PROGRAM_NAME command(). Link An output can be the select below. select spid,…
-
0
votes3
answers1000
viewsA: Select with the last record
Do select as an example below. SELECT IREC.PRO_IN_CODIGO CODIGO, IREC.RCI_RE_VLUNITARIO VALOR_UNITARIO, IREC.RCB_DT_DOCUMENTO FROM MGADM.EST_ITENSRECEB IREC INNER JOIN ( SELECT IREC.PRO_IN_CODIGO,…
-
2
votes1
answer247
viewsA: Import txt file into Postgresql 9.6
In order to get around this situation what you can do is create a precedent, in this process create a temporary table, and import this file into the temporary table, done this, make Insert with…
-
0
votes3
answers62099
viewsA: zero to left (LPAD) in Sql Server
If you want the example below it works very well. select RIGHT('000' + CAST('025' AS VARCHAR(10)),8)
sql-serveranswered Ruberlei Cardoso 113 -
0
votes3
answers4839
viewsA: SQL script to create mask
Look at this link, I believe that this function does exactly what you need. Below is citei function on the link. CREATE FUNCTION fx_FormatUsingMask ( @input nvarchar(1000), @mask nvarchar(1000) )…