Posts by Motta • 3,568 points
233 posts
-
2
votes1
answer177
viewsQ: Oracle user is a reserved word, can generate problems ?
There may be some problem if an Oracle user (USER) is a reserved word ? In case : MAX
-
2
votes2
answers164
viewsA: What is the best type of column to record amount of time?
The type in question also depends on how this information will be used, if it is tarifaction the best would be to record as integer working in the smallest unit (seconds for example) because in…
-
2
votes2
answers1134
viewsA: Is there a performance gain when using View’s in SQL?
Gain in code reuse and in some cases in performance because the view encapsulated SQL is already compiled.
-
3
votes5
answers37379
viewsA: How to update with Oracle Inner Join
As far as I know it doesn’t, one solution is to mount a cursor ... FOR R IN (SELECT calculo_leituras_ucb.iduc from calculo_leituras_ucb inner join calculo_dados on calculo_leituras_ucb.iduc =…
-
0
votes3
answers1209
viewsA: What is SQL? How to use?
Database Management Systems were created to ensure the persistence, conciseness and integrity of a System Data, solution created around the 1970s and is working well for the information I receive.…
-
6
votes3
answers51716
viewsA: SQL Server - Check duplicate data in two simultaneous fields
Select * From tabela t1 Where exists (select CPF, MAT from Tabela t2 where t2.cpf = t1.cpf and t2.mat = t1.mat group by CPF, MAT having count(*) > 1) Expanding a little the answer above listing…
-
0
votes1
answer92
viewsA: Databases in Oracle
Do not need another Instance in my opinion (it seems to me a BD just for study) just create another USER give the necessary GRANTS and create the tables and other objects. Creation of user (Oracle)…
-
0
votes3
answers8960
viewsA: When is it interesting to denormalize the database?
Another example, that people even disagree as a model, is a market ERP that denormalizes tables because its search engine in the system screens does not allow a search in columns of secondary…
-
3
votes2
answers1124
viewsA: When is it worth paying for Sqlserver or Oracle?
Type of the question difficult to answer but basically depends on how critical is the System, Oracle is currently scalable and the BD can grow. Coupled solutions such as DW, Web etc should also be…
-
3
votes1
answer633
viewsQ: How to collect statistics in Oracle Metadata tables ?
Collecting statistics from User Tables is simple, just use the dbms_utility.analyze_schema, but you can (and can) do this for the Oracle Metadata tables ? This post, was the origin of this doubt.…
-
1
votes3
answers3487
viewsA: What are the ways to measure a programmer’s knowledge?
In addition to certificates of completion of courses, certifications etc a test requesting code examples in an environment without Internet access :) ... But in addition to technical knowledge other…
methodologyanswered Motta 3,568 -
3
votes2
answers2482
viewsA: Modification update between two Oracle tables
The idea is to make a comparison between origin and destination. Case there is a management name at source that does not exist at the destination, compare ids. If Id does not exist, enter the…
-
1
votes1
answer87
viewsQ: How to call the Linux sendemail program from within Oracle
I know that the Oracle has a package for this (UTL_SMTP), but I would like to use the Linux sendmail. Does anyone have any example of code or know where the documentation of Oracle about this ?…
-
2
votes1
answer76
viewsA: Mysql order by field date original value
I believe that qualifying the field works, I have no Mysql and I have no way to test SELECT *,DATE_FORMAT(DATA_VENCIMENTO,'%d/%m/%Y') AS DATA_VENCIMENTO, DATE_FORMAT(DATA_PAGAMENTO,'%d/%m/%Y') AS…
-
1
votes1
answer414
viewsA: About Crystal Reports, Visual Basic 2010 and Mysql
A simple solution I see is to create 5 Formulas for each Tooth and format the rule, the rest is an ugly "copy and paste" f1 f2 f3 f4 f5 In Edit Formula, something like If {Comando.CAMPO} = "1" THEN…
-
2
votes3
answers614
viewsA: Database query in Postgresql
SELECT t3.desc_serv, t3.nm_serv, t1.nm_usu, count(t2.id_atend) TOTAL_ATENDIMENTO FROM usuarios t1 INNER JOIN historico_atendimentos t2 ON t1.id_usu = t2.id_usu INNER JOIN servicos t3 ON t2.id_serv =…
-
2
votes1
answer5107
viewsA: How to average a mysql query result?
select avg(TOTAL_ATENDIMENTO) MEDIA_TOTAL_ATENDIMENTO from ( SELECT t3.desc_serv, t3.nm_serv, t1.nm_usu, count(t2.id_atend) TOTAL_ATENDIMENTO FROM usuarios…
-
1
votes1
answer263
viewsA: Conditional to print in PL/SQL
In Infomaker it is possible to program the property Visible , type : If(calculation = 5 ,1,0) Obs:1=true and 0=False)
-
2
votes2
answers159
viewsA: Regex in Mysql to fetch certain X tempo results
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html A field of type DATE does not record date in any format, save an integer internally, the conversion to "date" at the time of…
-
7
votes1
answer167
viewsA: Full query of data registered in a field
A little vague but something like Select pais,count(*) qtd From tabela Group by pais
-
2
votes3
answers408
viewsA: How to index and update a user comparison system?
For each n users we will have n-1 comparisons, I did not see the "sex" in the tables, an application of this type seems important to me. I would make a table where I would save new users or have had…
-
1
votes1
answer547
viewsA: Is it possible to create a foreign key from another database?
https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html In the basic documentation of Mysql does not provide this syntax database.table, I know that for example Mysql accepts check…
-
2
votes1
answer380
viewsA: How to change the URL in the browser of the Microsiga Totvs app
To change the contents of the smartclient home page, you must create a file named mp.htm in the users' smartclient folder and within this file perform an html programming to call the url the user…
-
1
votes3
answers22309
viewsA: IF condition inside a WHERE - ORACLE PL/SQL
Assemble a group of Ands the Ors ( (IN_CARTAO <> null AND IN_CARTAO <> '' AND IN_CPF <> null AND IN_CPF <> '' AND A.CARTAO = IN_CARTAO AND M.ALT_MEMBER_ID = IN_CPF) OR…
-
0
votes2
answers6065
viewsA: How to add 3 columns of different tables
Use the Function coalesce SELECT SUM(coalesce(rp.par_valor,0)) + ...…
-
0
votes1
answer236
viewsA: Search between dates using two columns
SELECT ID_Contrato_Reserva, DATE_FORMAT(STR_TO_DATE(data_ini,"%d/%m/%Y" ), "%Y/%m/%d") AS dataIni, DATE_FORMAT(STR_TO_DATE(data_Fim,"%d/%m/%Y" ), "%Y/%m/%d") AS dataFim FROM contrato_reserva…
-
4
votes1
answer380
viewsQ: How to change the URL in the browser of the Microsiga Totvs app
The default Microsiga Totvs page has its own default browser, which are the settings to allow the user to change the URL ? Only the default browser homepage of the machine used appears,…
-
0
votes5
answers36671
viewsA: How to get the total character size of an SQL column?
From what I understood the solution is to consult the metadata table and see the definition of the type and size of the field. These tables, of course, change according to the database. For more…
-
-1
votes2
answers2788
viewsA: How to create a report with Crystal Reports parameters?
What data source(s) you are using ? Depending on the Data Source, a Stored Procedure for example, the CR creates the parameters. Otherwise, in a query, just create the parameters (Parameter List)…
-
1
votes1
answer840
viewsA: Calling Function or Procedure Multiple Times
Something like that declare vn_bairro_atu number; vn_bairro_novo number; begin vn_bairro_atu := 2; vn_bairro_novo := 3;-- aqui poderia ser o resultado de um select…
-
4
votes1
answer3314
views -
1
votes5
answers2467
viewsA: Is it feasible to define mandatory fields in the application instead of the database?
When possible I prefer to have the guarantee of constraints in BD, it is not always because there are packages marketed in several Bds and it can be impossible to administer different Bds. I also…
-
1
votes1
answer1549
viewsA: ORA-00942 TABLE DOES NOT EXIST error occurring in System.Data.Oracleclient. VB.NET
Also see if the user who logged in to the BD is the OWNER of the table, not being and not wanting to change the select to something of the type select * from owner.tabela Also see if the login user…