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 - 2013 * Cine Talk - Reviews, Gossips, Insider Info etc. * Archive through April 12, 2013 * SQL Question < Previous Next >

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

Brad
Celebrity Bewarse
Username: Brad

Post Number: 29024
Registered: 03-2004
Posted From: 112.79.47.103

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

Posted on Friday, April 12, 2013 - 12:37 am:    Edit Post Delete Post Print Post

Btw intha complex sette repu code review lo fail avuddi.. Make it simple yaaa...
Top of pagePrevious messageNext messageBottom of page Link to this message

Brad
Celebrity Bewarse
Username: Brad

Post Number: 29023
Registered: 03-2004
Posted From: 112.79.47.103

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

Posted on Friday, April 12, 2013 - 12:36 am:    Edit Post Delete Post Print Post

MOVIEART--ali.etakaram
Top of pagePrevious messageNext messageBottom of page Link to this message

Symbol_of_king
Kurra Bewarse
Username: Symbol_of_king

Post Number: 2115
Registered: 12-2005
Posted From: 72.209.237.32

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

Posted on Friday, April 12, 2013 - 12:02 am:    Edit Post Delete Post Print Post

cursor c1 is
select table_name from demo_tbl_list
where table_name in (
select a.table_name
from dba_tab_cols a,
demo_tbl_list b
where a.table_name = b.table_name);

cursor table_data(i_table_name varchar2) is
select column_name from dba_tab_cols where table_name=i_table_name;

file_location varchar2(100) := '\tmp';
file_name varchar2(40);

begin

for r1 in c1
loop
l_query:='Select ';
for r_column in table_data(r1.table_name)
l_query:=l_query||r_column||',';
end loop
l_query:=rtrim(l_query,',')||' from '||r1.table_name;
execute_immediate 'l_query';
end loop;
end;
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22486
Registered: 03-2004
Posted From: 148.87.67.212

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

Posted on Thursday, April 11, 2013 - 5:35 pm:    Edit Post Delete Post Print Post

sql function lu antha ga telisthe enduku aaguthaanu ippatidaka. nee laga theddu esi malli answer nene raasevadini gaMOVIEART--bemmi.aggipulla
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22485
Registered: 03-2004
Posted From: 148.87.67.212

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

Posted on Thursday, April 11, 2013 - 5:33 pm:    Edit Post Delete Post Print Post


Ravanabrahma:


soostha ayithe. thanks raa
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23096
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 5:32 pm:    Edit Post Delete Post Print Post

kaani column names prathi danaiki marathay ga..inka vere approach undi untadi.
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23095
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 5:31 pm:    Edit Post Delete Post Print Post

similar to this rayochemo chodu.


declare

cursor c1 is
select table_name from demo_tbl_list
where table_name in (
select a.table_name
from dba_tab_cols a,
demo_tbl_list b
where a.table_name = b.table_name);

cursor table_data(table_name varchar2) is
select * from table_name;

file_location varchar2(100) := '\tmp';
file_name varchar2(40);

begin

for r1 in c1
loop

for r_date in table_data(r1.table_name)
loop

l_data := r_data.column || r_data.column...;

UTL_FILE.PUT_LINE(l_file_type, p_msg);


end loop;





end loop;


end;
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22484
Registered: 03-2004
Posted From: 148.87.67.212

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

Posted on Thursday, April 11, 2013 - 5:30 pm:    Edit Post Delete Post Print Post


Ravanabrahma:

nuvvu ichina query ni oka cursor lo pettu. aa cursor ni loop chestha aa cursor lo prathi record ki oka table name vasthadi ga..danni select * from cursor.tablename ani vachina data ni xls file ko dentloko rastha undu. aa xls file name ni aa tablename gaane raayi. ee xls files anni nee unix directory lo padela raayochu script.




idhi try seyochu. nuvvochi cursors raasi pettu raaMOVIEART--kota.kick
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23094
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 5:16 pm:    Edit Post Delete Post Print Post

single query lo ela display chesthav assala different table column values ni? adem requirement ehe assala...

nuvvu ichina query ni oka cursor lo pettu. aa cursor ni loop chestha aa cursor lo prathi record ki oka table name vasthadi ga..danni select * from cursor.tablename ani vachina data ni xls file ko dentloko rastha undu. aa xls file name ni aa tablename gaane raayi. ee xls files anni nee unix directory lo padela raayochu script.
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22483
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:45 pm:    Edit Post Delete Post Print Post


Gochi:

mottham database anthaa devulaadi aa value em table lo em column lo undho seppaalanta


MOVIEART--bemmi.lol1
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 80393
Registered: 07-2004
Posted From: 24.229.136.147

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

Posted on Thursday, April 11, 2013 - 4:43 pm:    Edit Post Delete Post Print Post


Bignole:

Nuvvokkadive naa badha ardham sesukunnav Gwoss baa




mana dada kooda baaga artham sesukuntaadu...oka 2 months back similar query adigaadu theddesi....asalu table name,column name tho kooda parimithi lekundaa query lo oka value pass chesthe mottham database anthaa devulaadi aa value em table lo em column lo undho seppaalanta

MOVIEART--bemmi.rolu
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22482
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:41 pm:    Edit Post Delete Post Print Post


Gochi:


atta aithe oka one year ayyaaka occhi kanapadu biggesh...aa time ki emanna complete seyyaneeki try sesthaa..




Ante naatu paddathullo okko table lo naaku kavalsina rows ni distinct sesi raasukovassu kani emanna scripting egaspert lu salaha septharemo aniMOVIEART--venky
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22481
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:40 pm:    Edit Post Delete Post Print Post

Nuvvokkadive naa badha ardham sesukunnav Gwoss baaMOVIEART--mummy
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 80392
Registered: 07-2004
Posted From: 24.229.136.147

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

Posted on Thursday, April 11, 2013 - 4:40 pm:    Edit Post Delete Post Print Post


Bignole:




atta aithe oka one year ayyaaka occhi kanapadu biggesh...aa time ki emanna complete seyyaneeki try sesthaa....

MOVIEART--kapaul
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22480
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:39 pm:    Edit Post Delete Post Print Post


Gochi:

aa columns lo unna data loni distinct values aa..


MOVIEART--bemmi.siggu
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 80390
Registered: 07-2004
Posted From: 24.229.136.147

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

Posted on Thursday, April 11, 2013 - 4:35 pm:    Edit Post Delete Post Print Post


Bignole:

Naaku aa pethi table lo vunna columns yokka distinct values kavalenu




columns lo distinct values ante aa columns lo unna data loni distinct values aa....leka just column names aaa

MOVIEART--bemmi.sarle
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22479
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:30 pm:    Edit Post Delete Post Print Post

select table_name from demo_tbl_list
where table_name in (
select a.table_name
from dba_tab_cols a,
demo_tbl_list b
where a.table_name = b.table_name);

deentlonchi vache results okkoti okko table annamata. Naaku aa pethi table lo vunna columns yokka distinct values kavalenu
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22478
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:28 pm:    Edit Post Delete Post Print Post

Trouble trouble davilog laga

table lo tables and columns. Malli aa list lo vunna tables loni columns yokka values (individual tables ni query sesinattu)MOVIEART--ali.lol
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Dobbey
Mudiripoyina Bewarse
Username: Dobbey

Post Number: 16667
Registered: 12-2009
Posted From: 167.206.229.129

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

Posted on Thursday, April 11, 2013 - 4:26 pm:    Edit Post Delete Post Print Post

idem yokka thokkoo...emi ardham kaala MOVIEART--kapaul
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22477
Registered: 03-2004
Posted From: 148.87.67.210

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

Posted on Thursday, April 11, 2013 - 4:25 pm:    Edit Post Delete Post Print Post


Gochi:


Appudu rentilo common ga vunna tables and columns vasthaayi

naaku kavalsindhi aa tables lo vunna tables yokka individual column valuesMOVIEART--ali
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 80389
Registered: 07-2004
Posted From: 24.229.136.147

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

Posted on Thursday, April 11, 2013 - 4:18 pm:    Edit Post Delete Post Print Post


Bignole:




select * from dba_table_cols
where table_name in (
select a.table_name
from dba_table_cols a,
demo_tbl_list b
where a.table_name = b.table_name)
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22476
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:34 pm:    Edit Post Delete Post Print Post

dba_table_cols : deentlo database lo vunde table names and column names vunnayi

demo_tbl_list: deentlo pai list lo nundi maa project ki kavalsina table names vunnayi

Naaku kavalsindhi each of the tables listed in Table 2 loni columns ki values
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22475
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:31 pm:    Edit Post Delete Post Print Post


Dobbey:

anthega table_name,column_name display avuthundigaa.. mundu distinct pettandi...




Avunayya. kaani naaku kavalsindhi aaa tables loni column valuesMOVIEART--bemmi.angry
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22474
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:30 pm:    Edit Post Delete Post Print Post

Detailed ga:

Table A: dba_tab_col - deentlo table names and column names vunnayi

table 2: maa custom table. We have set of table names only (subset of table names from table A)

ee rentini join sesi maa custom table B loni tables names and respective column names(idhi kooda maa custom ee...Ones with only date tye) techaa

naaku kavalsindhi enti ante:

ee result set nundi I need distinct values of these columns that have been fetched

Maree confusing ga seppana? MOVIEART--bemmi.adi
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Dobbey
Mudiripoyina Bewarse
Username: Dobbey

Post Number: 16665
Registered: 12-2009
Posted From: 167.206.229.129

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

Posted on Thursday, April 11, 2013 - 3:26 pm:    Edit Post Delete Post Print Post

anthega table_name,column_name display avuthundigaa.. mundu distinct pettandi...
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22473
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:26 pm:    Edit Post Delete Post Print Post


Ravanabrahma:

aa tables loni aa columns ki values kavala?


MOVIEART--venky.ya

In the same query or as script
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Symbol_of_king
Kurra Bewarse
Username: Symbol_of_king

Post Number: 2114
Registered: 12-2005
Posted From: 75.93.59.207

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

Posted on Thursday, April 11, 2013 - 3:25 pm:    Edit Post Delete Post Print Post

select distinct tableB.columnname
from tableA, tableB
where tableA.tablename = tableB.tablename
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22472
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:25 pm:    Edit Post Delete Post Print Post

Table A: dba_tab_col - oka 1200 vuntaayi
Table B: oka 400 tables plus each table ki 3 esuko columns

so nenu join sesi tables and columns list techaanu that are of type date

Tarvatha step ki help kavali. Scripting seyyaledhu nen effud:

so ee fetch ayina tables yokka colmuns vunnayi kadha. Aa acolumn values from the respective tables kavali (distinct values)
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23093
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 3:24 pm:    Edit Post Delete Post Print Post


Bignole:

Join ayifoyindhi raa tarvatha steppu




neeku column names kavala leka aa tables loni aa columns ki values kavala?
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22471
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:23 pm:    Edit Post Delete Post Print Post


Ravanabrahma:

select table2.colum1, table2.column2
from table1, table2
where table1.tablename = table2.tablename




Join ayifoyindhi raa tarvatha steppuMOVIEART--bemmi.aggipulla
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23091
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 3:21 pm:    Edit Post Delete Post Print Post

each table ki ennesi columns unnay biggesh?

assume you have 3 common tables in both the tables. so 3 tables lo each table lo 10 columns unte nuvvu aa 3 tables distinct values display cheyyala
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 23090
Registered: 06-2004
Posted From: 99.67.74.174

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

Posted on Thursday, April 11, 2013 - 3:19 pm:    Edit Post Delete Post Print Post

select table2.colum1, table2.column2
from table1, table2
where table1.tablename = table2.tablename
Top of pagePrevious messageNext messageBottom of page Link to this message

Bignole
Mudiripoyina Bewarse
Username: Bignole

Post Number: 22469
Registered: 03-2004
Posted From: 148.87.67.200

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

Posted on Thursday, April 11, 2013 - 3:13 pm:    Edit Post Delete Post Print Post

Meeku simple ee avvochu but anyways:

Oracle DB lo

Table A lo konni Table names vunnayi
Table B lo table names with columns vunnayi

so ee rentini join sesi common ga vunna tables loni column names ni techaa.

Ippudu ee column names yokka distinct values (approx 450 tables) ni display seyyali

Idantha okaee query/script lo

can we do that? If so how? Simple layman terms lo seppi
CLIPART--smokeTmmirekkuvaithe Manchamekkali Kani Spot ki Raakudadhu Raa

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