Topics | Search Log Out | Register | Edit Profile
Hide Clipart | Banned/Unbanned User Log | Moderator Login History | Thread Delete/Move Log | Last 30 mins | 1 | 2
SQL Xtreme programmers

Chalanachithram.com DB » New TF Industry Related » Archive through September 26, 2015 » SQL Xtreme programmers « Previous Next »
Author Message
 

Abcdefghij
Hero
Username: Abcdefghij

Post Number: 17002
Registered: 02-2007
Posted From: 99.59.193.29

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 09:04 pm:       

driverramudu ok

except is better than not in, not exists paiga "vedava" varchar etc

millions antunnav kabbati not in etc not an ideal
also use nolock
also send checks memu vegas ellali
Post by Knf: bittter annai, welcome RS prakasam varaku madi, Prakasm nunchi UA vaaraku meeedi
http://www.chalanachithram.com/cgi-bin/discus/show.cgi?tpc=115&post=5144373#POST5144373
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14485
Registered: 02-2009
Posted From: 166.170.5.65

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 08:56 pm:       

A2Z bro

Either Minus or Except he cannot use as he is using diff database

Not the regular one like oracle or mssql etc
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14484
Registered: 02-2009
Posted From: 166.170.5.65

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 08:54 pm:       

Gagu

Btw genius is big word as these queries are requirement and it's very veasy

I did write very complex algorithm queries to avoid sequential processing

Using temporal database. That temporal concept is amazing if you start writing
Those queries assertion or periodical validation and processing etc

Thosr gives at most satisfaction remember you are not writing sequential algorithm
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Abcdefghij
Hero
Username: Abcdefghij

Post Number: 17001
Registered: 02-2007
Posted From: 99.59.193.29

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 08:53 pm:       


Gandhiguevara:




not exists, not in performance issue anni anukontunna

try "minus"

it all depends anuko but not in etc not preferred.
Post by Knf: bittter annai, welcome RS prakasam varaku madi, Prakasm nunchi UA vaaraku meeedi
http://www.chalanachithram.com/cgi-bin/discus/show.cgi?tpc=115&post=5144373#POST5144373
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55880
Registered: 10-2009
Posted From: 68.52.124.39

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 08:46 pm:       


Executor:

Final query ikkadettu


select t1.* from tbl t1
where not exists (
select 1 from tbl t2 where t1.id = t2.id and t1.date = t2.date and desc = 'devayya'
)
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14483
Registered: 02-2009
Posted From: 166.170.5.65

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 03:56 pm:       

GaGu
Yep either ID or name

But ID is better execution and performance point of view
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Executor
Junior Artist
Username: Executor

Post Number: 965
Registered: 04-2010
Posted From: 165.206.218.131

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 03:53 pm:       


Gandhiguevara:

sub query like ID = ID kudaa yettali




Final query ikkadettu
 

Sachin
Legend
Username: Sachin

Post Number: 39643
Registered: 04-2008
Posted From: 208.78.147.194

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 03:40 pm:       

gagesh andarinee coemdy sethannad anukuntunnaaa
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55867
Registered: 10-2009
Posted From: 68.52.124.39

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 03:37 pm:       


Executor:


sub query like ID = ID kudaa yettali
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14482
Registered: 02-2009
Posted From: 166.170.14.54

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 03:21 pm:       

Executor

It won't

My next query gives desired result
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Executor
Junior Artist
Username: Executor

Post Number: 964
Registered: 04-2010
Posted From: 165.206.218.131

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, September 25, 2015 - 02:41 pm:       


Gandhiguevara:

Select *
From dbo. Table as T
Where not exists
(
Select top 1 1
From dbo.table as it
Where it.date = t. Date
And it. Desc ='Vedhava'
)




You sure this returns your desired results? It doesn't for me
 

Mental_sachinodu
Hero
Username: Mental_sachinodu

Post Number: 17756
Registered: 10-2008
Posted From: 24.125.46.70

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 11:55 pm:       

 

Triggerblaster
Side Hero
Username: Triggerblaster

Post Number: 4095
Registered: 03-2008
Posted From: 140.98.210.243

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 06:46 pm:       

select * from table where id not in(select id from table where desc='vedhava')

Xtreame Programming??
"Chedda vallani support chese vallu chedda valla kante mundu M gudustaaru", Idi sapam kaadu brahma vakku
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14478
Registered: 02-2009
Posted From: 166.137.246.89

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 03:23 pm:       

Gagu

Better one is my prior post one

As it should run under person name context as well not just alone date context

Just bcos one person is vedahva on a date that does not mean to exclude rest

So better query Is in my prior post that runs under person and date context
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14477
Registered: 02-2009
Posted From: 166.137.246.89

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 03:16 pm:       

Posted on Thursday, September 24, 2015 - 10:45 am:
Gandhiguevara:


Select *
From dbo. Table as T
Where not exists
(
Select top 1 1
From dbo.table as it
Where it.date = t. Date
And it.name = t.name
And it. Desc ='Vedhava'
)
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55794
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 03:16 pm:       


Driverramudu:

Select *
From dbo. Table as T
Where not exists
(
Select top 1 1
From dbo.table as it
Where it.date = t. Date
And it. Desc ='Vedhava'
)


nuvvu genius thammudu...idhe work ayyindhi chivariki
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55792
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 03:14 pm:       


Rediff:

did you try the one from prev post? 3:28 di with <> clause?


select t1.* from tbl t1
where not exists (
select 1 from tbl t2 where t1.id = t2.id and t1.date = t2.date
)



deento vachindhi annaay...
 

Bumper
Side Hero
Username: Bumper

Post Number: 6322
Registered: 07-2014
Posted From: 199.168.151.87

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 03:13 pm:       


Andhrawala:

So basically okkasaari vedhavapani sesthe u want him to be eliminated totally




nly for that day anta, next day nundii malli fresh life
Snakes in Your backyard won't bite only your neighbours.
#Hillary Clinton
 

Rediff
Junior Artist
Username: Rediff

Post Number: 535
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:57 pm:       


Gandhiguevara:

An expression of non-boolean type specified in a context where a condition is expected near ',' anna error vasthondhi




did you try the one from prev post? 3:28 di with <> clause?
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55791
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:46 pm:       


Rediff:

Correction

select * from tbl t1 where (id,dt) not in
(select id, dt from tbl t2 where desc=vedhava group by id, dt)


An expression of non-boolean type specified in a context where a condition is expected near ','


anna error vasthondhi
 

Rediff
Junior Artist
Username: Rediff

Post Number: 534
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:28 pm:       

or even this will work.. if you don't want to deal with "not in" or with "not exists"

select * from tbl t1 join (select id, dt from tbl t2 where desc=vedhava group by id, dt)
join t1.id=t2.id and t1.dt<>t2.dt
 

Rediff
Junior Artist
Username: Rediff

Post Number: 533
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:27 pm:       


Rediff:

on the other hand if you don't want to include records for only days in which an ID has vedhava as desc then select * from tbl t1 join (select id, dt from tbl t2 where desc=vedhava group by id, dt) join t1.id=t2.id and t1.dt=t2.dt




Correction

select * from tbl t1 where (id,dt) not in
(select id, dt from tbl t2 where desc=vedhava group by id, dt)


or you can re-write same with exists clause
 

Rediff
Junior Artist
Username: Rediff

Post Number: 532
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:26 pm:       


Gandhiguevara:

not a given day annayi...okko person ki more than 10 sets vundochu...on different dates...




so basically last time vedhava ayinappatinundi most recent varaku kaavala??
if so
select * from tbl t1 join
(select id, max(dt) as dt from tbl where desc=vedhava group by id) t2
on t1.id=t2.id and t1.dt>t2.dt

------------
on the other hand if you don't want to include records for only days in which an ID has vedhava as desc then

select * from tbl t1 join (select id, dt from tbl t2 where desc=vedhava group by id, dt)
join t1.id=t2.id and t1.dt=t2.dt
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55788
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:21 pm:       


Andhrawala:

So basically okkasaari vedhavapani sesthe u want him to be eliminated totally


only for that day...kinda data lo first 3 records povaali...next 3 records vundaali as they are from some other date

2 Somayya Vedava Blah Blah Blah 1/2/2012
2 Somayya OK Blah Blah Blah 1/2/2012
2 Somayya OK Blah Blah Blah 1/2/2012
2 Somayya PK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
 

Andhrawala
Legend
Username: Andhrawala

Post Number: 43690
Registered: 03-2008
Posted From: 152.51.56.1

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:19 pm:       


Gandhiguevara:

Oka group lo desc 'vedava' ani vunte result set nundi aaa whole group drop cheyyali





So basically okkasaari vedhavapani sesthe u want him to be eliminated totally
No Signature
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55787
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:17 pm:       


Rediff:

Gagu.. do you want to pull records after a given day (day of run or param) and as long as you dont have any vedhavas after tbis date for a given id.


not a given day annayi...okko person ki more than 10 sets vundochu...on different dates...
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55786
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:16 pm:       


Driverramudu:

55769


check my post # 55769

for instance, Somayya ki 2 sets of records vunnayi...1st set on day 1 lo ...vaadu 'vedava' so aaa day somayya set motham ignore cheyyali...2nd day Somayya manchodu...okka 'vedava' pani kudaa cheyyaledhu...so aaa set of 3 records final result set lo vunchaali
 

Rediff
Junior Artist
Username: Rediff

Post Number: 531
Registered: 12-2006
Posted From: 107.77.66.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:15 pm:       

Gagu.. do you want to pull records after a given day (day of run or param) and as long as you dont have any vedhavas after tbis date for a given id.


select * from tbl where date>paramDt and id not in (select distinct id from table where desc=vedhava and date>paramDt)
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14473
Registered: 02-2009
Posted From: 166.137.246.89

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:07 pm:       

GaGu
Can u tell once again ur requirement

Is it mandatory to have 3 instances with diff dates?
Otherwise you should be getting correct result set
Based on my prior query
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55784
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 02:03 pm:       


Driverramudu:

based on my understand on your requirement
let me know below query worked


I tried that....but chaala records (valid) vi result set loki raavatledhu...'not in' for ID work ayyindhi gaani but aaa date kudaa somehow add cheyyali
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14471
Registered: 02-2009
Posted From: 76.95.174.87

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:52 am:       


Gandhiguevara:




based on my understand on your requirement
let me know below query worked
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14468
Registered: 02-2009
Posted From: 76.95.174.87

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:45 am:       


Gandhiguevara:




Select *
From dbo. Table as T
Where not exists
(
Select top 1 1
From dbo.table as it
Where it.date = t. Date
And it. Desc ='Vedhava'
)
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55783
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:36 am:       


Thikka_sankara:


alaa vaaaduthunte 0 results vasthunnaayi...ID not in vaadithe to some extent ok gaani genuine somayya records kudaa pothunnayi....so not just id, date ni kudaa consider cheyyali
 

Thikka_sankara
Megastar
Username: Thikka_sankara

Post Number: 22300
Registered: 02-2012
Posted From: 122.164.199.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:28 am:       


Gandhiguevara:

ivvala maarning client vachi...'orey gootle, somayya 2 va thaareeku edava gaani 3 va thaareeku edava kaadhu...ninna edava pani chesaadu ani ivvala kudaa goda kurchee yesthaavaa...naaku 2nd somayya edava panulu chesaadu kabatti aaa roju rows theesesi next day manchi panulu chesaadu kabatti avi vunchi eduv' annaadu...

Man this is getting complicated you know




This is not complex, infavt simplyfying ur problem...
If I understand right, you have to select all rows without vedhava, Okka instance kooda undakoodadu ante not exist choodali, vedhava leni rows ante straight fwd....
Perhaps nobody has changed the course of history as much as the historians. ~Franklin P. Jones"
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55779
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:26 am:       


Driverramudu:

Why did u skip 3 veeru from result set?


oka day lo 3 panulu chesi daanlo oka pani edava pani aithe vaadu vadhu...anduke vaadu ledu
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14460
Registered: 02-2009
Posted From: 76.95.174.87

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:21 am:       


Gandhiguevara:




Why did u skip 3 veeru from result set?
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55776
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:15 am:       

bump to xtreme programmers...ID tho paatu date kudaa consider cheyyaali...elaa how?
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55773
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 10:00 am:       


Sony:

ABAP lo ayite

Select * from A into itab B where Desc <> 'Vedhava"
If sy-subrc eq 0.

loop at itabB into wa_tabB.
Write/ wa_tabB.
endloop.
endif.


brain lo cells chaala varaku chachipoyaayi bedaru....algo raayi ...even aaa loop yee scenario lo elaa work avuthundhi?
 

Sony
Megastar
Username: Sony

Post Number: 23770
Registered: 12-2006
Posted From: 170.48.19.250

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 09:57 am:       


Gandhiguevara:



ID Name Desc X1 X2 X3 Date
1 Devayya OK Blah Blah Blah 1/1/2012
1 Devayya PK Blah Blah Blah 1/1/2012
1 Devayya SK Blah Blah Blah 1/1/2012
2 Somayya PK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
4 Nani PK Blah Blah Blah 1/5/2012
4 Nani SK Blah Blah Blah 1/5/2012




ABAP lo ayite

Select * from A into itab B where Desc <> 'Vedhava"
If sy-subrc eq 0.

loop at itabB into wa_tabB.
Write/ wa_tabB.
endloop.
endif.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55770
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 09:47 am:       

ivvala maarning client vachi...'orey gootle, somayya 2 va thaareeku edava gaani 3 va thaareeku edava kaadhu...ninna edava pani chesaadu ani ivvala kudaa goda kurchee yesthaavaa...naaku 2nd somayya edava panulu chesaadu kabatti aaa roju rows theesesi next day manchi panulu chesaadu kabatti avi vunchi eduv' annaadu...

Man this is getting complicated you know
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55769
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 09:44 am:       

ID Name Desc X1 X2 X3 Date
1 Devayya OK Blah Blah Blah 1/1/2012
1 Devayya PK Blah Blah Blah 1/1/2012
1 Devayya SK Blah Blah Blah 1/1/2012
2 Somayya Vedava Blah Blah Blah 1/2/2012
2 Somayya OK Blah Blah Blah 1/2/2012
2 Somayya OK Blah Blah Blah 1/2/2012
2 Somayya PK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
3 Veeru OK Blah Blah Blah 1/4/2012
3 Veeru Vedava Blah Blah Blah 1/4/2012
3 Veeru PK Blah Blah Blah 1/4/2012
4 Nani PK Blah Blah Blah 1/5/2012
4 Nani SK Blah Blah Blah 1/5/2012

Result set:

ID Name Desc X1 X2 X3 Date
1 Devayya OK Blah Blah Blah 1/1/2012
1 Devayya PK Blah Blah Blah 1/1/2012
1 Devayya SK Blah Blah Blah 1/1/2012
2 Somayya PK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
2 Somayya OK Blah Blah Blah 1/3/2012
4 Nani PK Blah Blah Blah 1/5/2012
4 Nani SK Blah Blah Blah 1/5/2012
 

Pete_sampras
Hero
Username: Pete_sampras

Post Number: 11611
Registered: 03-2010
Posted From: 203.35.135.171

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, September 24, 2015 - 12:31 am:       


Gandhiguevara:

thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi



 

Abhysg
Megastar
Username: Abhysg

Post Number: 25556
Registered: 08-2008
Posted From: 71.191.209.52

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:57 pm:       


Spy_india:

Design lo space remove chesey..




ee spaces remove cheste GaGu GC ochevaraku akkade settle ayipovachu.. aaapice lo excel batch ki chukkale.. em jarigindi asal.. reports/sql enduku pani seyyatled ani
 

Abhysg
Megastar
Username: Abhysg

Post Number: 25555
Registered: 08-2008
Posted From: 71.191.209.52

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:55 pm:       


Twitter:


sql lo aithe allow seyadhu ela pettaro mari




SQL Server allow chestadi..

you have to use [col name] to address..usually if you create tables from csv, excel files migrating tools use names as they are by default.. manam kelikite tappa
 

Spy_india
Hero
Username: Spy_india

Post Number: 11306
Registered: 02-2008
Posted From: 50.46.248.216

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:31 pm:       


Gandhiguevara:

umn names lo spaces yettaaru



Design lo space remove chesey..

Ante modatlo teliyaka excell files as it is tab delimited ga etti db ki import chesevallam alaane spaces too :D
 

Executor
Junior Artist
Username: Executor

Post Number: 963
Registered: 04-2010
Posted From: 165.206.218.131

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:20 pm:       


Twitter:

sql lo aithe allow seyadhu ela pettaro mari



It will allow. You would have to enclose with square brackets when you refere to it. like [First Name]
 

Chillarodu
Side Hero
Username: Chillarodu

Post Number: 7575
Registered: 03-2008
Posted From: 128.103.224.124

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:09 pm:       

innallu naa resume SQL skills: beginner ani petta.
ippude maarchi expert chesaa :D
 

Chillarodu
Side Hero
Username: Chillarodu

Post Number: 7574
Registered: 03-2008
Posted From: 128.103.224.124

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:08 pm:       


Twitter:

sql lo aithe allow seyadhu ela pettaro mari




"name space"
 

Twitter
Legend
Username: Twitter

Post Number: 40003
Registered: 10-2009
Posted From: 66.194.212.162

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:06 pm:       


Gandhiguevara:

veellemmaa kadupu maada column names lo spaces yettaaru




sql lo aithe allow seyadhu ela pettaro mari
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55749
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:03 pm:       


Driverramudu:

Did u try the query that suggested ?


actually database spark sql....daanlo except ledhu
 

Chillarodu
Side Hero
Username: Chillarodu

Post Number: 7573
Registered: 03-2008
Posted From: 128.103.224.124

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 05:03 pm:       

 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14450
Registered: 02-2009
Posted From: 166.137.246.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:59 pm:       

Gagu

Did u try the query that suggested ?
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55747
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:58 pm:       


Executor:

ee question ni Extreme category lo vesinappude anukunna


abboo inkaa boldu vunnayi...oka jaab aithe ikkada text files lo data vasthe daanni unzip chesi excel lo yetti inko folder lo peduthundhi okaavida...deenemma rojanthaa hadavudi....assal time vundatledhu ani
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55746
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:56 pm:       

pattesaa prize kottesaaa...veellemmaa kadupu maada column names lo spaces yettaaru...evadraa aaa offshore lo bhaskar rao?
 

Executor
Junior Artist
Username: Executor

Post Number: 962
Registered: 04-2010
Posted From: 165.206.218.131

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:54 pm:       


Gandhiguevara:

thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi





ee question ni Extreme category lo vesinappude anukunna
 

Buduguuu
Megastar
Username: Buduguuu

Post Number: 22642
Registered: 01-2012
Posted From: 199.67.140.56

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:51 pm:       


Gandhiguevara:

thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi




 

Rediff
Junior Artist
Username: Rediff

Post Number: 526
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:50 pm:       


Gandhiguevara:

thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi




 

Maverick
Legend
Username: Maverick

Post Number: 58269
Registered: 01-2008
Posted From: 108.171.130.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:47 pm:       


Gandhiguevara:

thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi



Happy Vizag
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55743
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:46 pm:       


Galiseenu:

select * from table where name like 'Devayya%' or name like 'nani%'


thanks annaay...ikkada ilaane chesthunnaaru...so naaku patel bros lo rice dorukuthondhi
 

Maverick
Legend
Username: Maverick

Post Number: 58268
Registered: 01-2008
Posted From: 108.171.130.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:44 pm:       


Galiseenu:

select * from table where name like 'Devayya%' or name like 'nani%'



Happy Vizag
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55742
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:44 pm:       


Spy_india:

BTW naa confidence levels penchingss ni sql threads tooo


eppudannaa class lo first vache vaadithi potee padithe 2nd annaa vasthaaru...36 marks vachi pass ayyevaadni choosi inspire aithe fail avuthaaru
 

Galiseenu
Comedian
Username: Galiseenu

Post Number: 1125
Registered: 07-2009
Posted From: 12.68.145.225

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:39 pm:       

select * from table where name like 'Devayya%' or name like 'nani%'
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14447
Registered: 02-2009
Posted From: 166.137.246.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:36 pm:       

Gagu

Remember these set operators will eliminate duplicates too

So ultimately you will get out out those groups that don't have
Vedhava in desk and rest of them after eliminating duplicates
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Driverramudu
Hero
Username: Driverramudu

Post Number: 14446
Registered: 02-2009
Posted From: 166.137.246.83

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:34 pm:       

Gagu

Here is the query

Select * from dbo.groups
EXCEPT
Select * from dbo.groups where desc like '%vedhava%'

This is much better one instead of using exists or not in

It works as mathematics set theoery
Driving is my PASSION.
Ball or Bimmer does not matter.
 

Twitter
Legend
Username: Twitter

Post Number: 39999
Registered: 10-2009
Posted From: 66.194.212.162

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:33 pm:       

oh vg elagu id undhi kabatti

select * from table1 where id not in(
select id from table1 where desc='vedava'
)

as simble as that
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55741
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:27 pm:       

Spark SQL lo konni variations of SQL pani chesthunnaayi....konni pani cheyyatledhu...so all possible options theeskuni best one implement chedhaari ani...thanks ye
 

Maverick
Legend
Username: Maverick

Post Number: 58267
Registered: 01-2008
Posted From: 108.171.130.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:26 pm:       


Bumper:


ayana volumes teliyavu..not in will be often hit full index scan or table scan..and i gave him algorithm steps..individually anthe
Happy Vizag
 

Rowdy
Legend
Username: Rowdy

Post Number: 35479
Registered: 01-2010
Posted From: 12.155.202.69

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:26 pm:       


Abhysg:

select t1.* from T t1 where not exists (
select 1 from T t2 where t1.ID=t2.ID and t2.Desc <> 'Vedava'
)



thanks ... kinda mass/rediff cheppindi ela work avuddi ane mokalu gokkuntunna
 

Abhysg
Megastar
Username: Abhysg

Post Number: 25552
Registered: 08-2008
Posted From: 71.191.209.52

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:19 pm:       

select t1.* from T t1 where not exists (
select 1 from T t2 where t1.ID=t2.ID and t2.Desc <> 'Vedava'
)
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55740
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:16 pm:       


Abhysg:

SQL Server ayite not in caluse sarigga pani cheyyad.. go with not exists..


how do you mean?
 

Bumper
Side Hero
Username: Bumper

Post Number: 6303
Registered: 07-2014
Posted From: 199.168.151.86

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:13 pm:       


Maverick:

select * all vedhavas temp table1
select * all vedhavas inner join temp table1 to temp table2
select * from main left outer temp table 2, non matches is ur result set






Mass:

select * from gandhi where gandhi_name not in
(select gandhi_name for guevara where gandhi_name ='Vedhava');





evaraina experts na doubt clarify cheandii,, kinda mass unkle simple query tho solve chesina query ni inner join ,outer join vadi enduku complex cheyalii??

is there any benefit like performance ??
Snakes in Your backyard won't bite only your neighbours.
#Hillary Clinton
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55739
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 04:10 pm:       


Sachin:

gagu ennellanunchi sql meeda work setha unnav


2003 nundi real time
 

Sesani
Megastar
Username: Sesani

Post Number: 29782
Registered: 08-2014
Posted From: 170.200.144.20

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:52 pm:       


Gandhiguevara:

Devayya



Gandhiguevara:

Somayya



Gandhiguevara:

Veeru



Gandhiguevara:

Nani


veellu evitlu, based on that answer untadi ani EMC2 seppamannadu
 

Spy_india
Hero
Username: Spy_india

Post Number: 11305
Registered: 02-2008
Posted From: 50.46.248.216

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:44 pm:       

vedhavalandari IDs tisukoni oka temp lo etti aa temp table ids ni eliminate chesey main table nunchi

minimum 100 lines coding.. creating temp table,selecting vedhava ids, mail table lonchi not exists ani comments too oka sproc raasi haadaavudi chesey 1 week pattiddi ani :-)
ee maatram hadavudi cheyakapote temp table lo estunnaaru :D

BTW naa confidence levels penchingss ni sql threads tooo

 

Kaisersooze
Moderator
Username: Kaisersooze

Post Number: 13227
Registered: 04-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:33 pm:       


Gandhiguevara:




20yrs dba exp petukoni ee question eti gagu...since id is common use not exisits on id...
 

Sachin
Legend
Username: Sachin

Post Number: 39625
Registered: 04-2008
Posted From: 208.78.147.194

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:28 pm:       

gagu ennellanunchi sql meeda work setha unnav
 

Abhysg
Megastar
Username: Abhysg

Post Number: 25549
Registered: 08-2008
Posted From: 71.191.209.52

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:26 pm:       


Gandhiguevara:




SQL Server ayite not in caluse sarigga pani cheyyad.. go with not exists..
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55738
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:23 pm:       


Mass:

select * from gandhi where gandhi_name not in
(select gandhi_name for guevara where gandhi_name ='Vedhava');


idhe try chesthe 0 results vachaayi...nenu vedavani kabatti alaa raasanemo anukunnaa...but I will check if the issue is something else
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55737
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:11 pm:       


Rediff:

kikiki.. idi next week assignment anta munde chesestunnaadu GaGu


infact....that is true annay...
 

Maverick
Legend
Username: Maverick

Post Number: 58266
Registered: 01-2008
Posted From: 108.171.130.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:11 pm:       

select * all vedhavas temp table1
select * all vedhavas inner join temp table1 to temp table2
select * from main left outer temp table 2, non matches is ur result set
Happy Vizag
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55736
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:10 pm:       


Rediff:

select * from tbl where id not in (select distinct id from table where desc=vedhava) \


work avudhemo...oka saari test chesi choosthaa...
 

Mass
Moderator
Username: Mass

Post Number: 3164
Registered: 10-2014

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:10 pm:       

Database silksmitha

select * from gandhi where gandhi_name not in
(select gandhi_name for guevara where gandhi_name ='Vedhava');
Catalyst,Aquarian,Rusthum, Brickmansions Abhimanini
 

Rediff
Junior Artist
Username: Rediff

Post Number: 523
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:08 pm:       


Abhysg:

inta hard work chestoo malle vegas trip ki tips adugutunnav soodooo..




kikiki.. idi next week assignment anta munde chesestunnaadu GaGu
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55735
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:08 pm:       


Buduguuu:

2 Somayya Vedava Blah Blah Blah
2 Somayya OK Blah Blah Blah
2 Somayya OK Blah Blah Blah




deenlo oka saari vedava aithe vaadni poorthigaa champeyyaali...not exists only 1st of those 3 ni filter chesthundemo kadhaa
 

Maverick
Legend
Username: Maverick

Post Number: 58265
Registered: 01-2008
Posted From: 108.171.130.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:08 pm:       

identify all vedhavas do a not in on name from the main result set..volume teliyadu..low aite ala proceed aipo
Happy Vizag
 

Abhysg
Megastar
Username: Abhysg

Post Number: 25547
Registered: 08-2008
Posted From: 71.191.209.52

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:08 pm:       



inta hard work chestoo malle vegas trip ki tips adugutunnav soodooo..
 

Rediff
Junior Artist
Username: Rediff

Post Number: 522
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:07 pm:       


Gandhiguevara:

a million rows vunnayi...even not in aithe only aa particular record drop avuthundhi gaani whole group kaadhu kadhaa?





select * from tbl where id not in (select distinct id from table where desc=vedhava) \

this will drop all related id records

koddiga efficient kaavalante exists vaadandi .. 1 mil ki pedda diff vundakapovachi
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55732
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:05 pm:       


Rediff:

chaala pedda data set aa? if simple/small data set not in clause tho logincheyochu kadaa?


a million rows vunnayi...even not in aithe only aa particular record drop avuthundhi gaani whole group kaadhu kadhaa?
 

Buduguuu
Megastar
Username: Buduguuu

Post Number: 22641
Registered: 01-2012
Posted From: 199.67.140.45

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:04 pm:       

not exists vaadite set kada
 

Rediff
Junior Artist
Username: Rediff

Post Number: 520
Registered: 12-2006
Posted From: 204.64.147.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:03 pm:       

chaala pedda data set aa? if simple/small data set not in clause tho logincheyochu kadaa?
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55730
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:02 pm:       

Oka group lo desc 'vedava' ani vunte result set nundi aaa whole group drop cheyyali
 

Gandhiguevara
Legend
Username: Gandhiguevara

Post Number: 55729
Registered: 10-2009
Posted From: 204.61.207.7

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, September 23, 2015 - 03:01 pm:       

ID Name Desc X1 X2 X3
1 Devayya OK Blah Blah Blah
1 Devayya PK Blah Blah Blah
1 Devayya SK Blah Blah Blah
2 Somayya Vedava Blah Blah Blah
2 Somayya OK Blah Blah Blah
2 Somayya OK Blah Blah Blah
3 Veeru OK Blah Blah Blah
3 Veeru Vedava Blah Blah Blah
3 Veeru PK Blah Blah Blah
4 Nani PK Blah Blah Blah
4 Nani SK Blah Blah Blah

Result set:

ID Name Desc X1 X2 X3
1 Devayya OK Blah Blah Blah
1 Devayya PK Blah Blah Blah
1 Devayya SK Blah Blah Blah
4 Nani PK Blah Blah Blah
4 Nani SK Blah Blah Blah

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x8d9260c){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

  A   B   C   D   E   F   G   H   I   J   K   L   M  

N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: