Posts by Krismorte • 635 points
32 posts
-
1
votes2
answers106
viewsA: AWS lambda - cannot connect to RDS database, only locally
I implemented some lambda connecting on the RDS used the serverless framework That’s what it’s all about. To be able to connect in RDS your lamnda has to have access to VPC, the subnet that the bank…
-
1
votes1
answer311
viewsA: Reason for delay of process and configuration of Hibernate (persistence)
In production the recommendation is not to use these lines below, use only for test purposes otherwise every time the service is started will be analyzed changes in your template, and the scripts…
-
0
votes1
answer131
viewsA: Update mysql problem
Right at the beginning of the update replace update contas for update c After the from you set alises for the tables and when you try to perform the update directly in the table the update gets lost…
-
0
votes2
answers266
viewsA: Select returning dates in the object other than what is registered in the Mysql database
replaces that line: res.getDate(2).toLocalDate() for: res.getDate(2).toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); https://stackoverflow.com/a/21242111/4722804…
-
1
votes0
answers32
viewsQ: How to model system actions/processes
I will try to explain what I have in hand and what my doubt. I am modeling a system that will control all the contracts of the company I have already started to identify the objects of this system…
-
0
votes1
answer557
viewsQ: Problems with CDI + Weld in Wildfly
I’m trying to create a EntityManagerProducer and it seems in the examples found on the internet something very simple, but it is not being. So I conclude that I am doing something wrong follows my…
-
0
votes2
answers112
viewsA: Strange Behavior in Entityframework with Storedprocedure?
I tried in several ways to use the trial according to the code informed by me in the query and by Virgilio. I ended up converting the query to Linq to SQL public IEnumerable…
-
0
votes1
answer69
viewsA: How to make a remote Sql server configuration?
When you install SQL Server next to the database the SQL Server Configuration Manager in it are the installed services relating to the bank. With the right button you need to enable the TCP/IP…
sql-serveranswered Krismorte 635 -
0
votes2
answers273
viewsA: Condition in the trial
In this case I only see the possibility of using a case in the Where clause this is my version see if it satisfies you Alter PROCEDURE BCT_SP_PESSOA_BUSCAR_POR_GERENTE @ID_GERENTE VARCHAR(50)…
-
1
votes2
answers112
viewsQ: Strange Behavior in Entityframework with Storedprocedure?
I’m conducting a search through StoredProcedures in the EntityFramework and the field of Data this presenting error conversion to type String. Method public IEnumerable…
-
1
votes0
answers64
viewsQ: Modify <Li> tag symbol in PDF generated through iText
Kind of confusing title, but the problem is somewhat simple. I am generating a PDF through iText and I am using HTML for being simpler. I am performing the example below the only problem is that I…
-
0
votes2
answers87
viewsA: Database objects as Stored Procedure parameters
SQL Server does not concatenate commands only values, so you can pass values for a command to be mounted and run, Example: @COLUNA nvarchar(30), @VARIAVEL nvarchar(50) declare @CMD varchar(4000) set…
-
3
votes0
answers522
viewsQ: Problems with Cellular Electronic Account Files(Febraban)
It is not enough to be neither a technical doubt, but if someone has some light of the layout used by the VIVO Company in the archives. On the website of Febraban itself has a layout, but it is not…
-
1
votes1
answer163
viewsA: SQL server error
Error occurs because inside the V400UNOP there is a Outer Join And SQL does not allow chaining Join with a view with Outer Join The stretch is this on the clavicle where (script with SQL 2000…
sql-serveranswered Krismorte 635 -
2
votes3
answers516
viewsA: Error in POSTGRESQL Database Creation
Follows his converted scritp, but in an ill-accustomed no :D CREATE DATABASE pesadaum; CREATE TABLE "user"( user_id serial NOT NULL , email varchar(255) NOT NULL, heavy_pass varchar(255) NOT NULL,…
-
1
votes1
answer1147
viewsA: Index making sql query too slow
As it was not informed the whole script of creating the tables I will leave for recommendations in the index creations and the query. Regarding the field of Data: The functions used in under the…
-
1
votes3
answers688
viewsA: Select with various Procedures
You can’t do it select with procedures. What you can do is the opposite or replace the procedures with Function
sql-serveranswered Krismorte 635 -
2
votes1
answer392
viewsQ: How to model Product/Stock?
I started a modeling for Products thinking of the same as: Purchased for Resell Produced for Sale Perishable or not So far so good, but when I started thinking about stock control based on this…
-
4
votes2
answers2263
viewsQ: Modeling for comprehensive entity registration
I am creating a registration modeling in the most comprehensive way possible. Entities are Person, Natural Person, Legal Entity, Supplier and Customer Below the entity person. I add the person the…
-
1
votes1
answer324
viewsA: Make Trigger run update after Procedure has been run
Because the update is not performed within the process? Trigger is a reaction to a DDL or DML command.
-
0
votes1
answer83
viewsA: Return Date data according to month
Your question is not clear, so I will answer for what I understand. When you want to know the amount of data for a specific Month select count(1) from horarioverificacao where EXTRACT(MONTH FROM…
-
0
votes3
answers3825
viewsA: Format date in SQL SERVER
This code below is fully functional. Note that the Convert is for varchar, but the type Datetime receives varchar values without problems. select convert(varchar,getdate(),121) Another thing you can…
-
5
votes4
answers3043
viewsA: What are temporary tables for?
Temporary tables are tables that only exist for a certain period of time. I am talking here about SQL Server. So there is not quite a comparison with the normal tables of the database. Temporary…
-
4
votes3
answers3103
viewsA: How to perform UPDATE with ORDER BY on sql server?
Based on your comment William you can force an update based on an ordered query, but for that you will need to use a cursor. The curosr will slow down your update. Your script will look something…
-
1
votes2
answers160
viewsA: Problems finding table in sql
You probably created the table in your user’s context Do the following check //esse é o padrão Select * from banco.dbo.tabela //Sua tabela esta assim provavelmente Select * from…
sql-serveranswered Krismorte 635 -
2
votes1
answer236
viewsA: Set specific ports for each database in Sqlserver
You cannot access Database by Port specifies. You can access Instances. Instance is the installation of SQL Server itself and you can have more than one on the same machine. When there are multiple…
sql-serveranswered Krismorte 635 -
1
votes1
answer58
viewsA: SQL Server Transaction Replication - Primary Key
Assuming you are using an Identity as key. My solution for you is to create a column (if it doesn’t exist) that indicates which branch is saving data and change its table so that this column is also…
-
0
votes2
answers2254
viewsA: Is it possible to know where an sql execution originated in SQL SERVER?
SQL Server does not provide solution for this. There is Trace, but it only saves the information when requested. The best way to audit data change in your database is via Trigger.
-
2
votes1
answer376
viewsA: How to adapt Hibernate to the DAO standard?
The DAO Standard is nothing more than isolating all database access in a single layer. In java we use packages to isolate access. JDBC is nothing more than the API provided by JAVA that allows you…
-
3
votes1
answer122
viewsA: How to use a variable across the scope of batch SQL
Every time you call the GO the variables are discarded. Then remove the GO of the script
sql-serveranswered Krismorte 635 -
2
votes1
answer146
viewsA: Merge between multiple Databases
Your idea is interesting, but the ideal would be that the local service base attached for reading. Your system must be prepared to read locally and save in the matrix. In that case I would advise a…
-
1
votes5
answers7513
viewsA: Reduce Log File Size
It’s been a while since I developed this script to decrease database log. Denrto the cursor has a line for each version. The 2008 version also works for 2012 declare @cmd nvarchar(4000) declare @bd…