Questions tagged as 'oracle'

2
answers

If I declare a variable in a SELECT query, is it mandatory?

My problem is that I will not always receive the variables, so I need a way that does not make them mandatory even by declaring them, for example in the query below: "SELECT * FROM clientes WHERE clientes.nome = :nome"; Var :nome...
asked by 01.07.2017 / 03:42
2
answers

How to make a Select not to display zeroed result?

I have the select below, which always brings me two lines, one with zero and one with value: SELECT COUNT(DISTINCT ROMANEIO) ROMANEIO FROM PCN_ROMANEIO_DISTR_ITEM WHERE USUARIO = 'junior' UNION ALL SELECT COUNT(DISTINCT ROMANEIO) ROMANEIO FROM...
asked by 26.10.2016 / 15:38
4
answers

How to create a Boolean column in Oracle?

As far as I know, Oracle does not provide Boolean valueType . I am working briefly with Oracle and would like to know the best solution to "simulate" a true / false value in the Oracle database? CHAR(1) (Y/N) ? INTEGER (0/1) ?     
asked by 29.02.2016 / 14:11
2
answers

Select all references to the given table (foreign key)

I need a way to select all the foreign key of a particular pk . In other words, I want to get a particular primary key and select all the foreign keys that "point" to it. Preferably I want to get the name of the column that has the k...
asked by 08.10.2015 / 15:51
2
answers

How to use ALIASES in Oracle correctly?

I'm trying to select multiple columns from a single table, and to make it easier to see the data and make it easier to separate the columns, I've decided to use aliases. But the problem is that when I run the query, it returns me the followin...
asked by 06.11.2017 / 20:33
2
answers

Using & in Oracle search

I have a question about the use of & in Oracle. See below my table. Whenreferringtothedescription'EasyBreezyEmailmkt&I',Oracleopensawindowforparameterpassing,asshownbelow. My question, how can I query with & without the b...
asked by 19.07.2017 / 20:38
1
answer

Attempt to read or write to protected memory

I have an application in C# that connects to the Oracle database. For this the application makes use of NHibernate (a very old version) and Castle ActiveRecord . This has always worked, but now when I try to query the database I...
asked by 27.03.2015 / 12:48
3
answers

How to return the last ID of a query

I'm working with an Oracle database I have two tables: Student Table: IDALUNO IDMATRICULA FASE Test Table: IDTESTE IDALUNO IDMATRICULA TESTE STATUS I still have a view that gives me the information of the students View St...
asked by 27.01.2015 / 18:44
2
answers

Subselect in Oracle database

I am trying to compile a query and within one of my joins it is necessary to make a subselect to ensure the integrity of the query as the example below: select t01.teste from teste t01 left join tes_teste_2 t02...
asked by 17.11.2015 / 21:22
2
answers

Left join with + equivalent in POSTGRES

oracle I can give a left join with using (+) ex: select from tabela1 A,tabela2 B where A.id = B.id(+); In the example above, a LEFT JOIN was made because I want to return all the data in table A that does not satisfy the JOIN co...
asked by 03.04.2018 / 16:34