Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets
Bewarse Talk Discussion Board * Archives - 2011 * Cine Talk - Reviews, Gossips, Insider Info etc. * Archive through June 30, 2011 * SQL Help < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15983
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Wednesday, June 29, 2011 - 6:36 pm:    Edit Post Delete Post View Post/Check IP

idi requirement..

table1

columns

header_id, line_id, serial_number
9223 1 1234
9223 1 2345
9223 1 3456

---------------

table 2

columns

header_id line_id deliver_id

9223 1 4
9223 1 4
9223 1 4

-------------

table3

columns

deliver_id serial_number
4 1234
4 2345
4 3456

-------------

table1 and table2 ni join chesthe with header_id and line_id, we get the deliver_id from table2 which is in table3. with that delievry+_id in table3, we get a list of serial_numbers in table3. the serial_numbers for that header_id and line_id from table1, all should be in table3. If any one doesn't exists in table3, then we should not return any rows..else return 1.
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15982
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Wednesday, June 29, 2011 - 6:25 pm:    Edit Post Delete Post View Post/Check IP

bhayya..ippudu Table2 lo koda line_id undi..query ela change avuthundi?
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11759
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 9:11 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

ante codes nakanna 5 years peddodu ga




me and GF are same underage kids on the block MOVIEART--ali
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Codes
Bewarse Legend
Username: Codes

Post Number: 61481
Registered: 05-2006
Posted From: 212.60.115.186

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

Posted on Monday, June 27, 2011 - 9:09 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

5 years peddodu ga




MOVIEART--bemmi.surprise2
I have no budget for other people's faith in humanity.
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15980
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 9:08 am:    Edit Post Delete Post View Post/Check IP


420:

It should .. its a generic SQL , when it cannot find given Serial numbers in table2 .. then the Line_ID will not be part of the result




thanks bhayya..inka naa original tables tho test cheyyali..actual ga vere extra columns koda unnay..nee code ni ardam chesukoni danni map chesukovali naa tables ki..time patidhi kastha..once again thanks bhayya..
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15979
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 9:07 am:    Edit Post Delete Post View Post/Check IP


Prasanth:

aa mukka 5 years back ye maaku telusu ani akkada meaning hemesh




ante codes nakanna 5 years peddodu ga..so time pattindi MOVIEART--bemmi.adi
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11758
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 9:06 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

ippudu different line_id 's has same serial_number then will this work?

means..

line_id 1 has serail numbers 3, 4 and 5

line_id 2 has serial_numbers 4, 5 and 6




It should .. its a generic SQL , when it cannot find given Serial numbers in table2 .. then the Line_ID will not be part of the result
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Codes
Bewarse Legend
Username: Codes

Post Number: 61480
Registered: 05-2006
Posted From: 212.60.115.186

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

Posted on Monday, June 27, 2011 - 9:05 am:    Edit Post Delete Post View Post/Check IP

naku avi modata nunchi attage anipistayi.. andukani..MOVIEART--bemmi.etakaram
I have no budget for other people's faith in humanity.
Top of pagePrevious messageNext messageBottom of page Link to this message

Prasanth
Bewarse Legend
Username: Prasanth

Post Number: 58420
Registered: 03-2004
Posted From: 110.76.160.100

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

Posted on Monday, June 27, 2011 - 9:05 am:    Edit Post Delete Post View Post/Check IP

aa mukka 5 years back ye maaku telusu ani akkada meaning hemesh
Father Jagan
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15978
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 9:04 am:    Edit Post Delete Post View Post/Check IP


Codes:




pessi gadini silly fellow annanu anukunnava MOVIEART--ali
Top of pagePrevious messageNext messageBottom of page Link to this message

Codes
Bewarse Legend
Username: Codes

Post Number: 61479
Registered: 05-2006
Posted From: 212.60.115.186

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

Posted on Monday, June 27, 2011 - 9:03 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

silly ga anipinchindi




CLIPART--lol2
I have no budget for other people's faith in humanity.
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15977
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 9:02 am:    Edit Post Delete Post View Post/Check IP


Prasanth:

MOVIEART--sunil.cry ittaantapudu kashtam avuddanaa ?




adem ledu..silly ga anipinchindi MOVIEART--bemmi.adi
Top of pagePrevious messageNext messageBottom of page Link to this message

Prasanth
Bewarse Legend
Username: Prasanth

Post Number: 58419
Registered: 03-2004
Posted From: 110.76.160.100

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

Posted on Monday, June 27, 2011 - 9:00 am:    Edit Post Delete Post View Post/Check IP

MOVIEART--sunil.cry ittaantapudu kashtam avuddanaa ?


CLIPART--run_dog
Father Jagan
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15976
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 8:59 am:    Edit Post Delete Post View Post/Check IP


Prasanth:




MOVIEART--bemmi.lungi2 nenu inka movie disco lu aapedham anukunna..
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15975
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 8:59 am:    Edit Post Delete Post View Post/Check IP

ippudu different line_id 's has same serial_number then will this work?

means..

line_id 1 has serail numbers 3, 4 and 5

line_id 2 has serial_numbers 4, 5 and 6
Top of pagePrevious messageNext messageBottom of page Link to this message

Prasanth
Bewarse Legend
Username: Prasanth

Post Number: 58418
Registered: 03-2004
Posted From: 110.76.160.100

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

Posted on Monday, June 27, 2011 - 8:58 am:    Edit Post Delete Post View Post/Check IP

MOVIEART--ali.kummavga
Father Jagan
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11757
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 8:57 am:    Edit Post Delete Post View Post/Check IP


Prasanth:

in return, penkul ni mahesh ni comment setthe...uurukovaalanta mari




You timber Depot owner .. MOVIEART--bemmi.angry
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15974
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 8:56 am:    Edit Post Delete Post View Post/Check IP


420:




thanks bhayya..aagu test chestha..
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11756
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 8:54 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

cartesian product di
unte ivvu bhayya





SELECT LINE_ID,SERIAL_NUMBER FROM TABLE1
where
LINE_ID NOT IN (
select DISTINCT LINE_ID from TABLE1 where
(LINE_ID ,SERIAL_NUMBER) NOT IN (
select T1.LINE_ID , T2.SERIAL_NUMBER from
(select DISTINCT LINE_ID FROM TABLE1) T1 ,
(select SERIAL_NUMBER FROM TABLE2) T2 )
)


this is just for my BEmmi bedar ..

MOVIEART--ali
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15973
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 8:46 am:    Edit Post Delete Post View Post/Check IP


420:

this is based on process of ellimination trick .. there is an another trick using cartesian product ..




cartesian product di unte ivvu bhayya MOVIEART--jp.alage
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11755
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 8:41 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

thankesh penkulu bhayya...aagu try chesi chostha..





waake Bedar .. leme know .. it should work for sure ..

MOVIEART--ali
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Prasanth
Bewarse Legend
Username: Prasanth

Post Number: 58403
Registered: 03-2004
Posted From: 110.76.160.100

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

Posted on Monday, June 27, 2011 - 8:21 am:    Edit Post Delete Post View Post/Check IP

\thankesh penkulu bhayya...aagu try chesi chostha..\

in return, penkul ni mahesh ni comment setthe...uurukovaalanta mari.. :-O
Father Jagan
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15972
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 8:20 am:    Edit Post Delete Post View Post/Check IP

thankesh penkulu bhayya...aagu try chesi chostha..
Top of pagePrevious messageNext messageBottom of page Link to this message

Bramhanandam
Pilla Bewarse
Username: Bramhanandam

Post Number: 259
Registered: 06-2011
Posted From: 62.12.14.27

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

Posted on Monday, June 27, 2011 - 8:02 am:    Edit Post Delete Post View Post/Check IP

Ahaa idharu G balisinollu thagulukunnaru gaa....
Top of pagePrevious messageNext messageBottom of page Link to this message

Suyodhana
Yavvanam Kaatesina Bewarse
Username: Suyodhana

Post Number: 1665
Registered: 06-2007
Posted From: 117.195.141.159

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

Posted on Monday, June 27, 2011 - 7:27 am:    Edit Post Delete Post View Post/Check IP

MOVIEART--bemmi.lungi2 idigo nannu age baar cheste naaku manduddi
meesam melesi nannu MOVIEART--blessme
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11753
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 7:24 am:    Edit Post Delete Post View Post/Check IP


Suyodhana:

enduku rendu sarlu cheptunna
lisp aa stammering aa




its called shivering with full obedience in front of elders like you.

MOVIEART--ali
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Suyodhana
Yavvanam Kaatesina Bewarse
Username: Suyodhana

Post Number: 1664
Registered: 06-2007
Posted From: 117.195.141.159

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

Posted on Monday, June 27, 2011 - 7:21 am:    Edit Post Delete Post View Post/Check IP

enduku rendu sarlu cheptunna
lisp aa stammering aa
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11752
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 7:06 am:    Edit Post Delete Post View Post/Check IP


Suyodhana:

run cheste 420 return chesindi
nee id cheppataniki inta length aa





Tiger Tiger from Penkonda here .
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Suyodhana
Yavvanam Kaatesina Bewarse
Username: Suyodhana

Post Number: 1659
Registered: 06-2007
Posted From: 117.195.141.159

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

Posted on Monday, June 27, 2011 - 7:01 am:    Edit Post Delete Post View Post/Check IP

run cheste 420 return chesindi
nee id cheppataniki inta length aa
MOVIEART--bemmi.angry1
Top of pagePrevious messageNext messageBottom of page Link to this message

420
Bewarse Legend
Username: 420

Post Number: 11750
Registered: 12-2006
Posted From: 212.159.240.81

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

Posted on Monday, June 27, 2011 - 4:54 am:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

...we need to display table1.line_id, table1.serial_number if and only if all the table1.serial_numbers exists in table2 for a given line_id how to acheive this.




Oki Bemmi Bedar .. I got your drift .. here is the answer .. this is based on process of ellimination trick .. there is an another trick using cartesian product ..

SELECT LINE_ID,SERIAL_NUMBER FROM TABLE1
WHERE LINE_ID NOT IN
(SELECT LINE_ID
FROM ( SELECT LINE_ID, COUNT (LINE_ID)
FROM (SELECT DISTINCT
LINE_ID, SERIAL_NUMBER_FOUND
FROM (SELECT LINE_ID,
SERIAL_NUMBER,
(SELECT COUNT ( * )
FROM Table2 t2
WHERE T2.SERIAL_NUMBER =
T1.SERIAL_NUMBER)
SERIAL_NUMBER_FOUND
FROM Table1 t1))
GROUP BY LINE_ID
HAVING COUNT (LINE_ID) > 1))
Knit India,do not split India !
Top of pagePrevious messageNext messageBottom of page Link to this message

Suyodhana
Yavvanam Kaatesina Bewarse
Username: Suyodhana

Post Number: 1646
Registered: 06-2007
Posted From: 117.195.143.247

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

Posted on Monday, June 27, 2011 - 2:29 am:    Edit Post Delete Post View Post/Check IP

deeni meeda db'ers work cheste bemmam annai doookudu threads meeda work chestadu
tasmaaat jagratta
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15971
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 12:45 am:    Edit Post Delete Post View Post/Check IP

eg:

table1
line_id serial_number
1 2
1 3

Both 2, 3 serial_numbers exists in table2..so we get should get the data as line_id, serial_number with the above rows.

eg:

line_id serial_number
2 4
2 5

and serial_number 5 doesn't exists in table2. then 0 rows should be displayed for the given line_id 2
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15970
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Monday, June 27, 2011 - 12:43 am:    Edit Post Delete Post View Post/Check IP


Penkonda_tiger:




simple ga cheppalante 2 tables unnay..2 tables had the column serial_number..

table1 had the columns line_id, serial_number and table 2 had the column serial_number.

we need to display table1.line_id and table1.serial_number

line_id 1 may have 10 rows with 10 different serail_numbers...we need to display table1.line_id, table1.serial_number if and only if all the table1.serial_numbers exists in table2 for a given line_id how to acheive this.
Top of pagePrevious messageNext messageBottom of page Link to this message

Penkonda_tiger
Mudiripoyina Bewarse
Username: Penkonda_tiger

Post Number: 4972
Registered: 06-2005
Posted From: 82.157.134.169

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

Posted on Sunday, June 26, 2011 - 11:34 pm:    Edit Post Delete Post View Post/Check IP

MOVIEART--bemmi.adi


Question understand beat me tight ..
kanapade nijam: Good manners , kanapadanidhi: abusive language
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15969
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Sunday, June 26, 2011 - 7:23 pm:    Edit Post Delete Post View Post/Check IP

thanks stewie..aagu chostha :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Stewie
Pilla Bewarse
Username: Stewie

Post Number: 180
Registered: 03-2011
Posted From: 24.147.86.254

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

Posted on Sunday, June 26, 2011 - 7:14 pm:    Edit Post Delete Post View Post/Check IP

idemmana try cheyyi ..

ante basically both tables match chesi count choostam..

select line_id , count(distinct serial_number) cnt from c ,
(select count(a.serial_number) cnt from (select distinct serial_number from t1) a, (select distinct serial_number from t2) b
where a.serial_number = b.serial_number
and t1.line_id = c.line_id
)d
where c.cnt = d.cnt
group by line_id
Top of pagePrevious messageNext messageBottom of page Link to this message

Stewie
Pilla Bewarse
Username: Stewie

Post Number: 179
Registered: 03-2011
Posted From: 24.147.86.254

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

Posted on Sunday, June 26, 2011 - 7:08 pm:    Edit Post Delete Post View Post/Check IP

Same ilantide appudeppudo evaro adigaru .. DB lo

appudu ochindi answer last ki.. can we research ?
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15968
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Sunday, June 26, 2011 - 5:41 pm:    Edit Post Delete Post View Post/Check IP

endadi ardam kaala..aagu try chestha ardam chesukovataniki
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 73575
Registered: 07-2004
Posted From: 148.168.40.4

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

Posted on Sunday, June 26, 2011 - 4:58 pm:    Edit Post Delete Post View Post/Check IP

SELECT a.CreationDate, CASE WHEN a.Value = 1 THEN b.Name ELSE c.Name END
FROM tableA a
LEFT JOIN tableB b ON b.Id = a.Value AND a.Value = 1
LEFT JOIN tableC c ON c.Id = a.Value AND a.Value <> 1

eee typelo edanna try cheyyi hemesh...
bongulo signature...manaki avasaramaaa CLIPART--eyebrow_raised_in_disbelief
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15967
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Sunday, June 26, 2011 - 4:29 pm:    Edit Post Delete Post View Post/Check IP


Gochi:




appudu false annattu...2nd post lo cheppinattu..nenu table3 tho table1 vi validate chesthunna..adi eppudu ravali ante table1 lo unna serial numbers anni table2 lo undali lekapothe total validation returns 0 rows..
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 73574
Registered: 07-2004
Posted From: 70.44.12.183

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

Posted on Sunday, June 26, 2011 - 4:27 pm:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:

Now I need to have a validation that if table 1 line_id 1's seril_numbers are not in table 2 then return now rows..if all the serial_numbers exists for line_id then return 1




idartham kaaledhi...table 1 lo undi table 2 lo lekapothe em cheyyaali...? anni unte em cheyyaali...
bongulo signature...manaki avasaramaaa CLIPART--eyebrow_raised_in_disbelief
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15966
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Sunday, June 26, 2011 - 4:10 pm:    Edit Post Delete Post View Post/Check IP

select ..
from table3, table1
where table3.columnx = table1.coumny
and exists (select 1 from table2
where XYZ)

What should be that XYZ..return 1 only when all the serial_numbers for line_id 1 in table2)
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Bewarse Legend
Username: Ravanabrahma

Post Number: 15965
Registered: 06-2004
Posted From: 98.151.191.253

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

Posted on Sunday, June 26, 2011 - 4:05 pm:    Edit Post Delete Post View Post/Check IP

I have two tables..

I have 3 rows in table 1 and has column serial_number

Table 2 is list of all the serial numbers.

Table1

columns data

line_id Serail_number
1 123
1 234
1 345

Table 2

column data

serial_number

123
234
345
456
567
678
789
890


etc

Now I need to have a validation that if table 1 line_id 1's seril_numbers are not in table 2 then return now rows..if all the serial_numbers exists for line_id then return 1..how to do this validation?

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration