[oracle_br] Patch number - Oracle 12c

2014-04-28 Por tôpico Marcelo Santino
Falae pessoal, tudo certo?

A pergunta é mais por praticidade, pois não achei no metalink e talvez
alguém tenha em mãos.

Quando eu preciso baixar uma instalação (embora mantenha sempre meu próprio
repositório) costumo ir direto pelo metalink, na página do patch aonde
escolhemos a versão do SO e então baixamos pacote por pacote.
Por exemplo, os patchs 10404530 do 11.2.0.3 e 13390677 do 11.2.0.4.

Alguém tem a mesma referência pro 12c?

A diferença de baixar lá pra página de downloads do site é que lá vem
certinho cada parte do pacote (database, grid, client, etc = 1of7, 2of7,
3of7, etc) ai fica muito mais prático.

Alguém teria ai?

PS: não estou falando de PSU, SPU/CPU, etc... to falando da release mesmo...

abs!


*Marcelo Santino*
DBA SQL Server / Oracle
www.bau-de-dev.com 
+55 21 98206-9930

  




RES: [oracle_br] Erro Listener TNS 12541

2014-04-28 Por tôpico Sharif Raduan - Yahoo
RESOLVIDO.

 

Consegui resolver complementando abaixo...

 

SQL> alter system set 
LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=192.42.103.78)(PORT=1521))' 
scope=memory

  2  /

 

System altered.

 

SQL> alter system register

  2  /

 

System altered.

 

SQL>

 

Obrigado,

 

Grande Abraço,

Sharif

 

De: oracle_br@yahoogrupos.com.br [mailto:oracle_br@yahoogrupos.com.br] Em nome 
de Sharif Raduan - Yahoo
Enviada em: segunda-feira, 28 de abril de 2014 21:14
Para: oracle_br@yahoogrupos.com.br
Assunto: RES: [oracle_br] Erro Listener TNS 12541

 

  

Milton, obrigado pela resposta

 

Alterei o listener.ora e o tnsnames.ora

 

[oracle@desenv admin]$ more listener.ora

# listener.ora Network Configuration File: 
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

LISTENER =

  (DESCRIPTION_LIST =

(DESCRIPTION =

  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

)

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

 

[oracle@desenv admin]$ more tnsnames.ora

# tnsnames.ora Network Configuration File: 
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

DBDSV15 =

  (DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

(CONNECT_DATA =

  (SERVER = DEDICATED)

  (SERVICE_NAME = dbdsv15)

)

  )

 

LISTENER_DBDSV15 =

  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

 

 

[oracle@desenv admin]$

 

Após a alteração o listener responde o tnsping porem não tem registro do 
serviço...

 

C:\Users\sharif>tnsping dbdsv15

 

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 28-ABR-2

014 21:02:39

 

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

 

Arquivos de parÔmetros usados:

C:\app\Sharif\product\11.2.0\client_2\network\admin\sqlnet.ora

 

 

Usado o adaptador TNSNAMES para resolver o apelido

Tentativa de contatar (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 192.42.103.78)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DBDSV15)))

 

OK (10 ms)

 

C:\Users\sharif>

 

[oracle@desenv admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 21:16:56

 

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER



Alias LISTENER

Version   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date28-APR-2014 21:13:13

Uptime0 days 0 hr. 3 min. 43 sec

Trace Level   off

Security  ON: Local OS Authentication

SNMP  OFF

Listener Parameter File   
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File 
/u01/app/oracle/diag/tnslsnr/desenv/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.42.103.78)(PORT=1521)))

The listener supports no services

The command completed successfully

[oracle@desenv admin]$

 

Abcs,

Sharif

 

 

De: oracle_br@yahoogrupos.com.br [mailto:oracle_br@yahoogrupos.com.br] Em nome 
de Milton Bastos Henriquis Jr.
Enviada em: segunda-feira, 28 de abril de 2014 20:38
Para: oracle_br@yahoogrupos.com.br
Assunto: Re: [oracle_br] Erro Listener TNS 12541

 

  

Tente alterar teu LISTENER.ORA, nessa linha:

 

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

 

Troque o 127.0.0.1 por   192.42.103.78

 

Depois disso:

 

lsnrctl stop

 

lsnrctl start

 

 

E tente novamente o tnsping do client.

 

2014-04-28 20:15 GMT-03:00 Sharif Raduan - Yahoo :

  

Pessoal, montei um ambiente de teste estou fazendo o impdp porem me deparei com 
esse problema... 

 

No servidor funciona tudo certinho, mas se dou um tnsping da minha estação de 
trabalho  ele dá o erro TNS-12541 não há listener... alguém tem idéia do que 
pode ser ?

 

Aqui informações do servidor...:

 

[oracle@desenv admin]$ uname -a

Linux desenv 3.8.13-26.2.3.el6uek.x86_64 #2 SMP Wed Apr 16 02:51:10 PDT 2014 
x86_64 x86_64 x86_64 GNU/Linux

[oracle@desenv admin]$

 

[oracle@desenv admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 18:53:39

 

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER



Alias LISTENER

Version   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date28-APR-2014 18:39:38

Uptime0 days 0 hr. 14 min. 3 sec

Trace Level   off

Security  ON: Local OS Authenticat

RES: [oracle_br] Erro Listener TNS 12541

2014-04-28 Por tôpico Sharif Raduan - Yahoo
Milton, obrigado pela resposta

 

Alterei o listener.ora e o tnsnames.ora

 

[oracle@desenv admin]$ more listener.ora

# listener.ora Network Configuration File: 
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

LISTENER =

  (DESCRIPTION_LIST =

(DESCRIPTION =

  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

)

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

 

 

[oracle@desenv admin]$ more tnsnames.ora

# tnsnames.ora Network Configuration File: 
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

DBDSV15 =

  (DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

(CONNECT_DATA =

  (SERVER = DEDICATED)

  (SERVICE_NAME = dbdsv15)

)

  )

 

LISTENER_DBDSV15 =

  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

 

 

[oracle@desenv admin]$

 

Após a alteração o listener responde o tnsping porem não tem registro do 
serviço...

 

C:\Users\sharif>tnsping dbdsv15

 

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 28-ABR-2

014 21:02:39

 

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

 

Arquivos de parÔmetros usados:

C:\app\Sharif\product\11.2.0\client_2\network\admin\sqlnet.ora

 

 

Usado o adaptador TNSNAMES para resolver o apelido

Tentativa de contatar (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 192.42.103.78)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DBDSV15)))

 

OK (10 ms)

 

C:\Users\sharif>

 

[oracle@desenv admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 21:16:56

 

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER



Alias LISTENER

Version   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date28-APR-2014 21:13:13

Uptime0 days 0 hr. 3 min. 43 sec

Trace Level   off

Security  ON: Local OS Authentication

SNMP  OFF

Listener Parameter File   
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File 
/u01/app/oracle/diag/tnslsnr/desenv/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.42.103.78)(PORT=1521)))

The listener supports no services

The command completed successfully

[oracle@desenv admin]$

 

Abcs,

Sharif

 

 

De: oracle_br@yahoogrupos.com.br [mailto:oracle_br@yahoogrupos.com.br] Em nome 
de Milton Bastos Henriquis Jr.
Enviada em: segunda-feira, 28 de abril de 2014 20:38
Para: oracle_br@yahoogrupos.com.br
Assunto: Re: [oracle_br] Erro Listener TNS 12541

 

  

Tente alterar teu LISTENER.ORA, nessa linha:

 

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

 

Troque o 127.0.0.1 por   192.42.103.78

 

Depois disso:

 

lsnrctl stop

 

lsnrctl start

 

 

E tente novamente o tnsping do client.

 

2014-04-28 20:15 GMT-03:00 Sharif Raduan - Yahoo :

  

Pessoal, montei um ambiente de teste estou fazendo o impdp porem me deparei com 
esse problema... 

 

No servidor funciona tudo certinho, mas se dou um tnsping da minha estação de 
trabalho  ele dá o erro TNS-12541 não há listener... alguém tem idéia do que 
pode ser ?

 

Aqui informações do servidor...:

 

[oracle@desenv admin]$ uname -a

Linux desenv 3.8.13-26.2.3.el6uek.x86_64 #2 SMP Wed Apr 16 02:51:10 PDT 2014 
x86_64 x86_64 x86_64 GNU/Linux

[oracle@desenv admin]$

 

[oracle@desenv admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 18:53:39

 

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER



Alias LISTENER

Version   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date28-APR-2014 18:39:38

Uptime0 days 0 hr. 14 min. 3 sec

Trace Level   off

Security  ON: Local OS Authentication

SNMP  OFF

Listener Parameter File   
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File 
/u01/app/oracle/diag/tnslsnr/desenv/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Services Summary...

Service "dbdsv15" has 1 instance(s).

  Instance "dbdsv15", status READY, has 1 handler(s) for this service...

Service "dbdsv15XDB" has 1 instance(s).

  Instance "

Re: [oracle_br] Erro Listener TNS 12541

2014-04-28 Por tôpico Milton Bastos Henriquis Jr.
Tente alterar teu LISTENER.ORA, nessa linha:

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))


Troque o 127.0.0.1 por 192.42.103.78


Depois disso:


lsnrctl stop


lsnrctl start



E tente novamente o tnsping do client.


2014-04-28 20:15 GMT-03:00 Sharif Raduan - Yahoo :

>
>
> Pessoal, montei um ambiente de teste estou fazendo o impdp porem me
> deparei com esse problema...
>
>
>
> No servidor funciona tudo certinho, mas se dou um tnsping da minha estação
> de trabalho  ele dá o erro TNS-12541 não há listener... alguém tem idéia do
> que pode ser ?
>
>
>
> Aqui informações do servidor...:
>
>
>
> [oracle@desenv admin]$ uname -a
>
> Linux desenv 3.8.13-26.2.3.el6uek.x86_64 #2 SMP Wed Apr 16 02:51:10 PDT
> 2014 x86_64 x86_64 x86_64 GNU/Linux
>
> [oracle@desenv admin]$
>
>
>
> [oracle@desenv admin]$ lsnrctl status
>
>
>
> LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 18:53:39
>
>
>
> Copyright (c) 1991, 2013, Oracle.  All rights reserved.
>
>
>
> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
>
> STATUS of the LISTENER
>
> 
>
> Alias LISTENER
>
> Version   TNSLSNR for Linux: Version 11.2.0.4.0 -
> Production
>
> Start Date28-APR-2014 18:39:38
>
> Uptime0 days 0 hr. 14 min. 3 sec
>
> Trace Level   off
>
> Security  ON: Local OS Authentication
>
> SNMP  OFF
>
> Listener Parameter File
> /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
>
> Listener Log File
> /u01/app/oracle/diag/tnslsnr/desenv/listener/alert/log.xml
>
> Listening Endpoints Summary...
>
>   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
>
>   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
>
> Services Summary...
>
> Service "dbdsv15" has 1 instance(s).
>
>   Instance "dbdsv15", status READY, has 1 handler(s) for this service...
>
> Service "dbdsv15XDB" has 1 instance(s).
>
>   Instance "dbdsv15", status READY, has 1 handler(s) for this service...
>
> The command completed successfully
>
> [oracle@desenv admin]$ tnsping dbdsv15 2
>
>
>
> TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014
> 18:53:47
>
>
>
> Copyright (c) 1997, 2013, Oracle.  All rights reserved.
>
>
>
> Used parameter files:
>
> /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
>
>
>
>
>
> Used TNSNAMES adapter to resolve the alias
>
> Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
> localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
> = dbdsv15)))
>
> OK (10 msec)
>
> OK (0 msec)
>
>
>
> [oracle@desenv admin]$ ifconfig eth0
>
> eth0  Link encap:Ethernet  Endereço de HW D4:3D:7E:E7:88:B6
>
>   inet end.: 192.42.103.78  Bcast:192.42.103.255
> Masc:255.255.255.0
>
>   endereço inet6: fe80::d63d:7eff:fee7:88b6/64 Escopo:Link
>
>   UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
>
>   RX packets:44124 errors:0 dropped:637 overruns:0 frame:0
>
>   TX packets:2364 errors:0 dropped:0 overruns:0 carrier:0
>
>   colisões:0 txqueuelen:1000
>
>   RX bytes:3271014 (3.1 MiB)  TX bytes:385080 (376.0 KiB)
>
>
>
> [oracle@desenv admin]$
>
>
>
> Informações da minha estação...:
>
>
>
> Tnsnames.ora
>
>
>
> DBDSV15 =
>
>   (DESCRIPTION =
>
> (ADDRESS_LIST =
>
>   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))
>
> )
>
> (CONNECT_DATA =
>
>   (SERVICE_NAME = DBDSV15)
>
> )
>
>   )
>
>
>
>
>
> Grande Abraço,
>
> Sharif Raduan
>
>  
>


[oracle_br] Erro Listener TNS 12541

2014-04-28 Por tôpico Sharif Raduan - Yahoo
Pessoal, montei um ambiente de teste estou fazendo o impdp porem me deparei
com esse problema... 

 

No servidor funciona tudo certinho, mas se dou um tnsping da minha estação
de trabalho  ele dá o erro TNS-12541 não há listener... alguém tem idéia do
que pode ser ?

 

Aqui informações do servidor...:

 

[oracle@desenv admin]$ uname -a

Linux desenv 3.8.13-26.2.3.el6uek.x86_64 #2 SMP Wed Apr 16 02:51:10 PDT 2014
x86_64 x86_64 x86_64 GNU/Linux

[oracle@desenv admin]$

 

[oracle@desenv admin]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014 18:53:39

 

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER



Alias LISTENER

Version   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date28-APR-2014 18:39:38

Uptime0 days 0 hr. 14 min. 3 sec

Trace Level   off

Security  ON: Local OS Authentication

SNMP  OFF

Listener Parameter File
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File
/u01/app/oracle/diag/tnslsnr/desenv/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Services Summary...

Service "dbdsv15" has 1 instance(s).

  Instance "dbdsv15", status READY, has 1 handler(s) for this service...

Service "dbdsv15XDB" has 1 instance(s).

  Instance "dbdsv15", status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@desenv admin]$ tnsping dbdsv15 2

 

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 28-APR-2014
18:53:47

 

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

 

Used parameter files:

/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora

 

 

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME
= dbdsv15)))

OK (10 msec)

OK (0 msec)

 

[oracle@desenv admin]$ ifconfig eth0

eth0  Link encap:Ethernet  Endereço de HW D4:3D:7E:E7:88:B6

  inet end.: 192.42.103.78  Bcast:192.42.103.255  Masc:255.255.255.0

  endereço inet6: fe80::d63d:7eff:fee7:88b6/64 Escopo:Link

  UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1

  RX packets:44124 errors:0 dropped:637 overruns:0 frame:0

  TX packets:2364 errors:0 dropped:0 overruns:0 carrier:0

  colisões:0 txqueuelen:1000

  RX bytes:3271014 (3.1 MiB)  TX bytes:385080 (376.0 KiB)

 

[oracle@desenv admin]$

 

Informações da minha estação...:

 

Tnsnames.ora

 

DBDSV15 =

  (DESCRIPTION =

(ADDRESS_LIST =

  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.42.103.78)(PORT = 1521))

)

(CONNECT_DATA =

  (SERVICE_NAME = DBDSV15)

)

  )

 

 

Grande Abraço,

Sharif Raduan



Re: [oracle_br] Dúvida consulta, como fazer?

2014-04-28 Por tôpico Saulo Brito
É Milton, simples e fácil e eu quebrando a cabeça.

Era só inverter mesmo.


Obrigado!


Em 28 de abril de 2014 18:36, Milton Bastos Henriquis Jr. <
miltonbas...@gmail.com> escreveu:

>
>
> Não sei se entendi direito se for o que estou pensando:
>
> Select *
> from tabela
> where valor_data >= data_inicial
> and valor_data <= data_final
>
>
> Ou seja... vc está passando pra query uma data de entrada (valor_data)
> e vc quer que retorne todos registros em que essa data de entrada esteja
> entre a data inicial e final.
>
> Se for só isso, simples, é o SQL acima.
>
>
>
> Em 28 de abril de 2014 18:27, Saulo Brito escreveu:
>
>
>>
>> Alguém pode dar uma luz em como fazer uma consulta?
>>
>> Tenho registros numa tabela que possui n campos, entre eles existem 2 do
>> tipo data, esses campos são data inicio e data fim.
>>
>> Tenho também um valor de uma data qualquer.
>>
>> Gostaria de fazer o seguinte: Obter somente aqueles registros que estão
>> dentro do range de data inicio e data fim.
>>
>> Ou seja:
>>
>> tabela:
>>
>> DATA_INICI DATA_FINAL
>> 1 23/03/2014 28/03/2014
>> 1 25/03/2014 26/03/2014
>>
>> meu valor: 25/03/2014
>>
>> É meio que o between inverso. Sei que tenho que fazer com Connect by
>> level, + como? Não entendo direito como esse treco funciona e nem quando
>> utiliza-lo, queria aprender sobre ele também se alguém tiver alguma
>> referência ficaria agradecido.
>>
>> Desculpem a pergunta de noob.
>>
>> Obrigado,
>> Saulo Brito
>>
>>
>  
>


Re: [oracle_br] Dúvida consulta, como fazer?

2014-04-28 Por tôpico Milton Bastos Henriquis Jr.
Não sei se entendi direito se for o que estou pensando:

Select *
from tabela
where valor_data >= data_inicial
and valor_data <= data_final


Ou seja... vc está passando pra query uma data de entrada (valor_data)
e vc quer que retorne todos registros em que essa data de entrada esteja
entre a data inicial e final.

Se for só isso, simples, é o SQL acima.



Em 28 de abril de 2014 18:27, Saulo Brito escreveu:

>
>
> Alguém pode dar uma luz em como fazer uma consulta?
>
> Tenho registros numa tabela que possui n campos, entre eles existem 2 do
> tipo data, esses campos são data inicio e data fim.
>
> Tenho também um valor de uma data qualquer.
>
> Gostaria de fazer o seguinte: Obter somente aqueles registros que estão
> dentro do range de data inicio e data fim.
>
> Ou seja:
>
> tabela:
>
> DATA_INICI DATA_FINAL
> 1 23/03/2014 28/03/2014
> 1 25/03/2014 26/03/2014
>
> meu valor: 25/03/2014
>
> É meio que o between inverso. Sei que tenho que fazer com Connect by
> level, + como? Não entendo direito como esse treco funciona e nem quando
> utiliza-lo, queria aprender sobre ele também se alguém tiver alguma
> referência ficaria agradecido.
>
> Desculpem a pergunta de noob.
>
> Obrigado,
> Saulo Brito
>
>  
>


[oracle_br] Dúvida consulta, como fazer?

2014-04-28 Por tôpico Saulo Brito
Alguém pode dar uma luz em como fazer uma consulta?

Tenho registros numa tabela que possui n campos, entre eles existem 2 do
tipo data, esses campos são data inicio e data fim.

Tenho também um valor de uma data qualquer.

Gostaria de fazer o seguinte: Obter somente aqueles registros que estão
dentro do range de data inicio e data fim.

Ou seja:

tabela:

DATA_INICI DATA_FINAL
1 23/03/2014 28/03/2014
1 25/03/2014 26/03/2014

meu valor: 25/03/2014

É meio que o between inverso. Sei que tenho que fazer com Connect by level,
+ como? Não entendo direito como esse treco funciona e nem quando
utiliza-lo, queria aprender sobre ele também se alguém tiver alguma
referência ficaria agradecido.

Desculpem a pergunta de noob.

Obrigado,
Saulo Brito