SQL help thread   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse TalkArchives - 2006Cricket - Our National PassionArchive through May 04, 2006SQL help thread Previous Next

Author Message
Top of pagePrevious messageNext messageBottom of pageLink to this message

Babu
Desanike Pedda Bewarse
Username: Babu

Post Number: 8437
Registered: 06-2004
Posted From: 65.208.22.25
Posted on Wednesday, May 03, 2006 - 4:38 pm:Edit PostDelete PostView Post/Check IP

seperate secsun better emo deniki
sql section moderators and members elite club lo gosi, hema, nayak ni thoseyyali
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15364
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:35 pm:Edit PostDelete PostView Post/Check IP

ammani kavalsinannu rows vachayi, kani konchem data ni inka polish cheyyali. :-(
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15363
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:32 pm:Edit PostDelete PostView Post/Check IP

eyy denemma vachesindi. kiki. oka logic ni anthaku mundu rasi comment chesanu, adi thesesanu. vachesindi, Thanks nayakudu mama. :-)
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19871
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 4:31 pm:Edit PostDelete PostView Post/Check IP

hemugaa..nayak maama seppindhi correstey... adi sesi soodu
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15362
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:30 pm:Edit PostDelete PostView Post/Check IP

Thanks nayakudu mama. oka concept ardam ayyindi, kaani inka edo thanthundi, repu sotha.

vytwo mama, ayithe jump ayipothunna inka intiki. kiki.

kaani ee thokkalo daniki aadu papam 2 days ichadu. inka avvala. kiki.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3547
Registered: 05-2005
Posted From: 129.188.33.221
Posted on Wednesday, May 03, 2006 - 4:28 pm:Edit PostDelete PostView Post/Check IP

a, b vundi a lo motham ravali anuko left outer join antaru b kali (+) pettali

b lo motham ravali anuko right outer joinantaru a kalli (+) pettali

Top of pagePrevious messageNext messageBottom of pageLink to this message

Vytwo
Vooriki Bewarse
Username: Vytwo

Post Number: 3563
Registered: 01-2005
Posted From: 162.119.64.111
Posted on Wednesday, May 03, 2006 - 4:28 pm:Edit PostDelete PostView Post/Check IP

hemanth mama.
okkasari commit ayyinaka ni mata kuda nuvvu vinakudau mama.

vellipo pokiri ki.
live Life like sinna.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15361
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:28 pm:Edit PostDelete PostView Post/Check IP

ala pettina ravatam ledu mama anni. :-( sare aagu chosthanu.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3546
Registered: 05-2005
Posted From: 129.188.33.221
Posted on Wednesday, May 03, 2006 - 4:27 pm:Edit PostDelete PostView Post/Check IP

Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3545
Registered: 05-2005
Posted From: 129.188.33.221
Posted on Wednesday, May 03, 2006 - 4:27 pm:Edit PostDelete PostView Post/Check IP

a.user_id = b.user_id(+)
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15360
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:26 pm:Edit PostDelete PostView Post/Check IP

thoo. maa pokiri cinema ki ellali. time ayipothundi. :-( manager gadu aa query kosam sothunnadu. :-(
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15359
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 4:25 pm:Edit PostDelete PostView Post/Check IP

vamsam mama, ade rasanu mama.

oka doubt, ipuduu query lo (+) rastharu. adi deniki mama??

ippudu naa question entante A table lo column ni B table loni column tho equal sethunna.

ante a.user_id = b.user_id ani. kaani naaku kavalsina rows entante a table lo undi B table lo lekapoyina ravali, kaani B table lonivi evi ravalante a table lo unnave raavali. ela raayali mama. aa (+) symbol eyyala eto okapakka?? esthuna kani satisfaction ledu. :-(
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19866
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:36 pm:Edit PostDelete PostView Post/Check IP

vamsam maama
Top of pagePrevious messageNext messageBottom of pageLink to this message

Vamsam_fan
Pilla Bewarse
Username: Vamsam_fan

Post Number: 10
Registered: 02-2006
Posted From: 65.121.89.2
Posted on Wednesday, May 03, 2006 - 3:32 pm:Edit PostDelete PostView Post/Check IP

I think you need to use:

WHERE
(
end_date IS NULL
OR
TO_CHAR(end_date, 'yyyy-mm-dd') > TO_CHAR(SYSDATE, 'yyyy-mm-dd')
);

Notice > instead of < in the sample
Top of pagePrevious messageNext messageBottom of pageLink to this message

Vamsam_fan
Pilla Bewarse
Username: Vamsam_fan

Post Number: 9
Registered: 02-2006
Posted From: 65.121.89.2
Posted on Wednesday, May 03, 2006 - 3:27 pm:Edit PostDelete PostView Post/Check IP

trunc(sysdate) would not always work. It may work in some installations depending on how the data format is defined in Oracle.

Because... Whenever you compare dates, you have to make sure that the date is in CCYYMMDD formatto get proper comparision.

Otherwise, comparision goes out of sync.
Nandamuri Naa Daivam...
Top of pagePrevious messageNext messageBottom of pageLink to this message

Vamsam_fan
Pilla Bewarse
Username: Vamsam_fan

Post Number: 8
Registered: 02-2006
Posted From: 65.121.89.2
Posted on Wednesday, May 03, 2006 - 3:23 pm:Edit PostDelete PostView Post/Check IP

WHERE
(
end_date IS NULL
OR
TO_CHAR(end_date, 'yyyy-mm-dd') < TO_CHAR(SYSDATE, 'yyyy-mm-dd')
);
Nandamuri Naa Daivam...
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19865
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:22 pm:Edit PostDelete PostView Post/Check IP

atta raasthey end_date null vi kooda vachesthaayigaa listlo...avi vaddanukuntaa..anduke sysdate-1 ettaa
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3542
Registered: 05-2005
Posted From: 129.188.33.221
Posted on Wednesday, May 03, 2006 - 3:18 pm:Edit PostDelete PostView Post/Check IP

nvl(end_date,sysdate) >= trunc(sysdate) ani rayu
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19864
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:16 pm:Edit PostDelete PostView Post/Check IP

where clause lo end_date null unna columns kavalanukunte emani ivvali mamalu?? or end_date less than sysdate unna columns vadhanukunte emani ivvali??

hemugaa...end_date null ani gaani end_date > sysdate unte athanu active employee aaa...

alaa aithe trunc(nvl(end_date,sysdate-1) >= sysdate

ani raaseyyi...
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19863
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:11 pm:Edit PostDelete PostView Post/Check IP

nee yenks soodaneeki easygaane undigaa...naaku ninna raayamannadhaaniki pack ayyindhi...naalugu subquerylo oka query raayalsochindhi...matter endayya ante malla unnadhi akkada rendu tablesey..okkokka subquery chaatantha thayaarayyindhi..K pagala complications vacchaayi
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15358
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 3:08 pm:Edit PostDelete PostView Post/Check IP

denemma nannu emani rayamannarante, andaru employees ni list cheyyamannaru mama, employee id, username, mail id, site location. active users annamata, terminate ayina vaallu kakunda.

data antha oka table lo ledu. 2 tables lo undi. so rasthe 155 employees vasthunnaru comedyga. kiki. anthamandike oracle access undemo mari. soodali. kani antha thakkuva chance ledu mama.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19862
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:05 pm:Edit PostDelete PostView Post/Check IP

vamsam maama...Oracle SQL gurinchi ikkada disking
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19861
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 3:04 pm:Edit PostDelete PostView Post/Check IP

ninna naaku kooda thappocchindhi maama query..aina sare results pampicchi D'gaa...thappu pattukunte emantaro ento

paiga edo query oka nela kritham modify chesi india pampicchaa productionlo pettamani..aa naa ko's lite theesukunnaru..update seyyaledhu..so one month nunchi daily elley reports anni thappule..endo deenemma jeevitham..dhina dhina gandamla undi..
Top of pagePrevious messageNext messageBottom of pageLink to this message

Vamsam_fan
Pilla Bewarse
Username: Vamsam_fan

Post Number: 6
Registered: 02-2006
Posted From: 65.121.89.2
Posted on Wednesday, May 03, 2006 - 3:04 pm:Edit PostDelete PostView Post/Check IP

It would be nice if we can qualify the question with which database we are talking about.

Please add the database name:

Oracle/DB2/SQLServer/MySQL/PostGres/Teradata/Sybas e/Informix/...
Nandamuri Naa Daivam...
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15357
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:53 pm:Edit PostDelete PostView Post/Check IP

ledu mama, inka vere tables tho kalisina logic edo dobbindi. soothunna.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19859
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 2:48 pm:Edit PostDelete PostView Post/Check IP

hemugaa...nulls unnavalla count D'sindhemo...

Nayak maama..undu try chesthaa nuvvu cheppindhi...emo nenu rendu vaipulaa pedathaanu trunc usualgaa
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3531
Registered: 05-2005
Posted From: 136.182.2.221
Posted on Wednesday, May 03, 2006 - 2:20 pm:Edit PostDelete PostView Post/Check IP

gochi mama rendu vaipula trunc cheyyanakkarla..

oka vela end_date meeda index vundi anuko manam TRUNC(end_date) ante index use kadu..
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15352
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:20 pm:Edit PostDelete PostView Post/Check IP

work avuthunnatte undi mama, kaani chala thakkuva mandi employees vacharu. inka chala req undi andulo, so chodala antha. :-(
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15351
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:19 pm:Edit PostDelete PostView Post/Check IP

kiki ee edava requirement endo sathunna. :-(
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15350
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:17 pm:Edit PostDelete PostView Post/Check IP

ohh vaake nayakudu mama. :-) aagu chosthaa. gochi maam ardam ayyinda??
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19858
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 2:17 pm:Edit PostDelete PostView Post/Check IP

chass...Nayakudidhi correst...requirements chethagaa raasthaava...

where trunc(end_date) >= trunc(sysdate)
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19857
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 2:16 pm:Edit PostDelete PostView Post/Check IP

end_date less than sysdate unna columns vadhanukunte emani ivvali

swarry...just symbol maarchu..

where trunc(end_date) > trunc(sysdate)
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3530
Registered: 05-2005
Posted From: 136.182.2.221
Posted on Wednesday, May 03, 2006 - 2:16 pm:Edit PostDelete PostView Post/Check IP

second di idigo end_date >= trunc(sysdate) anu
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19856
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 2:15 pm:Edit PostDelete PostView Post/Check IP

second dhi ante edhi
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15348
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:14 pm:Edit PostDelete PostView Post/Check IP

gochi mama, nenu annadi vadhanukunte anna 2nd di. daniketta rayatam??
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15347
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:14 pm:Edit PostDelete PostView Post/Check IP

mama, 2nd di pani chesindi. :-) thanks mama.
Top of pagePrevious messageNext messageBottom of pageLink to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 19855
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Wednesday, May 03, 2006 - 2:12 pm:Edit PostDelete PostView Post/Check IP

where clause lo end_date null unna columns kavalanukunte emani ivvali mamalu?? or end_date less than sysdate unna columns vadhanukunte emani ivvali??


rendu separategaa ayithe :

where end_date is null

where end_date < sysdate

(better way is trunc(end_date) < trunc(sysdate)
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3527
Registered: 05-2005
Posted From: 136.182.2.221
Posted on Wednesday, May 03, 2006 - 2:11 pm:Edit PostDelete PostView Post/Check IP

end_date >= trunc(sysdate) anu
Top of pagePrevious messageNext messageBottom of pageLink to this message

Nayakudu
Vooriki Bewarse
Username: Nayakudu

Post Number: 3526
Registered: 05-2005
Posted From: 136.182.2.221
Posted on Wednesday, May 03, 2006 - 2:10 pm:Edit PostDelete PostView Post/Check IP

end_date is null anuko vasthayi NULL s
Top of pagePrevious messageNext messageBottom of pageLink to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 15346
Registered: 03-2004
Posted From: 65.196.167.82
Posted on Wednesday, May 03, 2006 - 2:09 pm:Edit PostDelete PostView Post/Check IP

mamalu, manam ee thread roju kummudam, rojukokati thelsukunna, chala thelsukovachu manam. sare ippudu mundu nenu adugutha annamata.

where clause lo end_date null unna columns kavalanukunte emani ivvali mamalu?? or end_date less than sysdate unna columns vadhanukunte emani ivvali??

gochi ga. raa. nayakudu mama plz.