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

Bewarse Talk � Archives � Cine Talk - Reviews, Gossips, Insider Info etc. � Archive through June 21, 2006 � SQL Help � Previous Next �

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

Tmbuff
Pilla Bewarse
Username: Tmbuff

Post Number: 147
Registered: 04-2004
Posted From: 159.153.4.51
Posted on Friday, June 16, 2006 - 8:26 pm:   Edit PostDelete PostView Post/Check IP

this should help:

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4 950_P8_DISPLAYID:52733433785851
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23111
Registered: 07-2004
Posted From: 71.234.232.47
Posted on Friday, June 16, 2006 - 7:19 pm:   Edit PostDelete PostView Post/Check IP

rank enti maama...denserank aa....elaa seyyaali
Top of pagePrevious messageNext messageBottom of page Link to this message

2007
Kurra Bewarse
Username: 2007

Post Number: 522
Registered: 05-2006
Posted From: 129.188.33.222
Posted on Friday, June 16, 2006 - 7:03 pm:   Edit PostDelete PostView Post/Check IP

transpose nenu oka SELECT lo chestha... naa kenti ata chesi isthey meeku.. aha nakenti ata...

RANK use cheyyi mama vachhiddi...
Top of pagePrevious messageNext messageBottom of page Link to this message

Sinnodu
Bewarse
Username: Sinnodu

Post Number: 2088
Registered: 05-2005
Posted From: 69.223.93.139
Posted on Friday, June 16, 2006 - 3:54 pm:   Edit PostDelete PostView Post/Check IP

goss
Navve vallu navvani edche vallu edvani pogide vallani pogadani tittevallu tittani Dont care
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23110
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:50 pm:   Edit PostDelete PostView Post/Check IP

antha cinema ledhu maama..matter endante nest project ippudu panichesthunna company vaadi client daggara..ikkademanna thedaalu vacchayante akkadanundi ikkadiki pilichi mari thaata theesthaaru naadhi..so max work chesi D'sthey gola undadhu..lekapothe tharavatha idhi adhi rendu isthe surru summaipoddi
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 682
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:44 pm:   Edit PostDelete PostView Post/Check IP

gosi mayaa..nee swinciarity tho
Top of pagePrevious messageNext messageBottom of page Link to this message

Rrc
Kurra Bewarse
Username: Rrc

Post Number: 699
Registered: 04-2006
Posted From: 129.138.6.17
Posted on Friday, June 16, 2006 - 3:39 pm:   Edit PostDelete PostView Post/Check IP

best of luck (for ur failure)
"The world's biggest power is the youth and beauty of a woman."
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23109
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:37 pm:   Edit PostDelete PostView Post/Check IP

dicchu kaadehe...mottham complete chesi elthey naaku kooda satisfactiongaa untundhi..alaa sagam lo vadilesthey elaa paapam..so andukani naana kattalu padi pinish seddamani tryings
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 681
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:35 pm:   Edit PostDelete PostView Post/Check IP

adedo ninnu dicchu chesinattu peel avutunnavee
Top of pagePrevious messageNext messageBottom of page Link to this message

Rrc
Kurra Bewarse
Username: Rrc

Post Number: 698
Registered: 04-2006
Posted From: 129.138.6.17
Posted on Friday, June 16, 2006 - 3:32 pm:   Edit PostDelete PostView Post/Check IP

office lo work isthe aa office nunchi jump aaaaaaaa
"The world's biggest power is the youth and beauty of a woman."
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23108
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:31 pm:   Edit PostDelete PostView Post/Check IP

oka 3 months work 15 days lo complete sesi D'mannaru... so manaki chethanainatha sesi jump iyyatame..
Top of pagePrevious messageNext messageBottom of page Link to this message

Rrc
Kurra Bewarse
Username: Rrc

Post Number: 697
Registered: 04-2006
Posted From: 129.138.6.17
Posted on Friday, June 16, 2006 - 3:31 pm:   Edit PostDelete PostView Post/Check IP

inni rojula work leka db lu chuttu tirigevadivi kani leka pothe nuvvu work lo king vi anamata
"The world's biggest power is the youth and beauty of a woman."
Top of pagePrevious messageNext messageBottom of page Link to this message

Rrc
Kurra Bewarse
Username: Rrc

Post Number: 696
Registered: 04-2006
Posted From: 129.138.6.17
Posted on Friday, June 16, 2006 - 3:30 pm:   Edit PostDelete PostView Post/Check IP

annaltiki nee office vallu neeku work icharuuuuuuuu
"The world's biggest power is the youth and beauty of a woman."
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23106
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:29 pm:   Edit PostDelete PostView Post/Check IP

working hard kaadhu...kutthaa colgate paste avuthaandhi RRC maayya...
Top of pagePrevious messageNext messageBottom of page Link to this message

Rrc
Kurra Bewarse
Username: Rrc

Post Number: 694
Registered: 04-2006
Posted From: 129.138.6.17
Posted on Friday, June 16, 2006 - 3:27 pm:   Edit PostDelete PostView Post/Check IP

gochi working hard aaaaaaaaaaaa
"The world's biggest power is the youth and beauty of a woman."
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23105
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:27 pm:   Edit PostDelete PostView Post/Check IP

deenemma intha katha undhaa transpose seyaneeki..
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23104
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:21 pm:   Edit PostDelete PostView Post/Check IP

nene maama...Cognos lo crosstab chepthunnava..ikkada memu cognos vaadatledhu..direct SQL raasukovaali annitiki...catalog lo anni thappulunnai..so memu vaatini use chesey scene ledhu

B123 maama...intikelli try chesthaa maama..naakikkada only databse read rights unnayi..insert etc lu use cheyyalenu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 680
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:17 pm:   Edit PostDelete PostView Post/Check IP

ee procedure ni marchuko mama..naaku telisi guarantee ga work avuddi..cursors use chesaadu
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 679
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:16 pm:   Edit PostDelete PostView Post/Check IP

This is part of the hideous PL/SQL procedure I use. It may not be pretty but it works and it is fast.

Every couple of days, I have to submit a batch to the State of Maine for select mental health clients. We store the data in vertical format but the state wants it horizontally.

-------------------------------------------------- ----------
-- This procedure parses the client's enrollment status from -- a vertical record layout to a horizontal one.

PROCEDURE AE_STATUS
-------------------------------------------------- ----------
IS
BEGIN
DECLARE
d_client_id trclqsca.client_id%TYPE ;
d_trt_plan_id trclqsca.trt_plan_id%TYPE ;

v_client_id trclqsca.client_id%TYPE ;
v_trt_plan_id trclqsca.trt_plan_id%TYPE ;
v_service_under trclqsca.service_under%TYPE ;

CURSOR client_insert IS
SELECT DISTINCT a.client_id,
a.trt_plan_id
FROM trclqsca a,
trclpage b
WHERE a.trt_plan_id = b.trt_plan_id
AND b.page_id = 'ADENROLL06'
AND a.trt_plan_id NOT IN (SELECT trt_plan_id
FROM ae_history)
ORDER BY a.trt_plan_id ;

CURSOR service IS
SELECT client_id,
trt_plan_id,
service_under
FROM trclqsca ;

BEGIN
EXECUTE IMMEDIATE('TRUNCATE TABLE status_parse') ;

OPEN client_insert ;

-- This loop inserts the client_id and trt_plan_ids.
LOOP
FETCH client_insert INTO d_client_id, d_trt_plan_id ;
EXIT WHEN client_insert%NOTFOUND ;

INSERT INTO status_parse(client_id, trt_plan_id)
VALUES(d_client_id, d_trt_plan_id);
END LOOP ;

CLOSE client_insert ;
OPEN service ;

-- This loop inserts the status or type of enrollment -- that is being sent to the state.
LOOP
FETCH service INTO v_client_id, v_trt_plan_id, v_service_under ;
EXIT WHEN service%NOTFOUND ;

UPDATE status_parse
SET service_under_n = v_service_under
WHERE v_trt_plan_id = status_parse.trt_plan_id
AND v_service_under = 'N';

UPDATE status_parse
SET service_under_c = v_service_under
WHERE v_trt_plan_id = status_parse.trt_plan_id
AND v_service_under = 'C' ;

UPDATE status_parse
SET service_under_u = v_service_under
WHERE v_trt_plan_id = status_parse.trt_plan_id
AND v_service_under = 'U' ;

END LOOP ;

CLOSE service ;
COMMIT ;
END ;
END ae_status ;

The first loop inserts the client's ID number and the Treatemnt plan or medical record number. The second loop changes the data to a horizontal layout. I have a permanent table called "status parse" which is formatted for final vertical layout and is also used for for other reporting.
Top of pagePrevious messageNext messageBottom of page Link to this message

Nene
Kurra Bewarse
Username: Nene

Post Number: 572
Registered: 03-2004
Posted From: 198.22.236.230
Posted on Friday, June 16, 2006 - 3:15 pm:   Edit PostDelete PostView Post/Check IP

Discontinue crosstab use chesi chodu mama
neeku yela kavallo ala vachhiddi anukuntaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23103
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:15 pm:   Edit PostDelete PostView Post/Check IP

massmegastar@yahoo.com

kaakapothe idhi intikellaaka choodali maama..naaku officelo yahoo access ledhu..
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 678
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:12 pm:   Edit PostDelete PostView Post/Check IP

save sesaa..aa page close sesaa.. mail id ettu
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23102
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:11 pm:   Edit PostDelete PostView Post/Check IP

choodaledhu maama..link unte padeyyi...
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 677
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:10 pm:   Edit PostDelete PostView Post/Check IP

google lo oka pl/sql procedure dorkindi mayaa..nuvvemanna soosavaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemonth
Pilla Bewarse
Username: Hemonth

Post Number: 8
Registered: 05-2006
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:07 pm:   Edit PostDelete PostView Post/Check IP

yea decode gani case gani use seyyochu..
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23101
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 3:06 pm:   Edit PostDelete PostView Post/Check IP

thanx B123 maama..

nenu kooda crosstab reports gurinchi choosthunna kaani sodhi gaallu oka row,oka column unte elaa cheyyaao icchaaru..multiple ki ivvaledhu..

Month in X axis,Order No in Y axis kaavalante ilaa raasthey vasthondhi...

select
decode(...,JAN,order_no)
decode(...,FEB,order_no)
decode(...,MAR,order_no)
decode(..,APR,order_no)

kaani ippudu Y axis lo migathaavi raavalante elaa raayalo artham kaatalledhu
Top of pagePrevious messageNext messageBottom of page Link to this message

Balayya123
Kurra Bewarse
Username: Balayya123

Post Number: 676
Registered: 06-2004
Posted From: 129.138.18.85
Posted on Friday, June 16, 2006 - 3:01 pm:   Edit PostDelete PostView Post/Check IP

Gosi mayaa neeku fixed set of rows vunte ala seyyochu..
Number of rows anedi dynamic mayaa. Nuvvu transpose kattali vunna results ki..ante neeku enni rows vunnayo teliyaali..appudu UNION work avuddi anukuntunna

ala kaakundaa dynamic gaa ante eti seyyali ani indakatnunchi choostunnaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Gaali
Desanike Pedda Bewarse
Username: Gaali

Post Number: 10683
Registered: 03-2004
Posted From: 199.26.230.102
Posted on Friday, June 16, 2006 - 2:43 pm:   Edit PostDelete PostView Post/Check IP

Sorry Gochi mama. Nenu cheppindi tappanukonta. Yippudee malli neeku kaavalsina result set choosaanu. Kaani naaku yenduko multiple UNION statements tho saadinchavachu anipisthondi, but I don't know if it is very efficient.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23095
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 2:38 pm:   Edit PostDelete PostView Post/Check IP

gaali maama...ante elaa maama, ilaa try cheyyaalaa..



select a.order_month,
'null' order_number,
'null' order_type
'null' order_amount

union

select 'null' order_month,
a.order_number,
a.order_type
a.order_amount
Top of pagePrevious messageNext messageBottom of page Link to this message

Gaali
Desanike Pedda Bewarse
Username: Gaali

Post Number: 10680
Registered: 03-2004
Posted From: 199.26.230.102
Posted on Friday, June 16, 2006 - 2:27 pm:   Edit PostDelete PostView Post/Check IP

Gochi mama

Hope this helps.

Do a union. The first select statement will have your header info, union that with the data you need using a second select statement.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23093
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 2:21 pm:   Edit PostDelete PostView Post/Check IP

okate untundhi maama...basic gaa avu sum(order numbers) or sum(amounts) aa type..so Jan kindha okkate untundhi..sameway feb kindha okkate untundhi..
Top of pagePrevious messageNext messageBottom of page Link to this message

Bangaram_khushi
Pilla Bewarse
Username: Bangaram_khushi

Post Number: 12
Registered: 04-2006
Posted From: 208.189.200.2
Posted on Friday, June 16, 2006 - 2:17 pm:   Edit PostDelete PostView Post/Check IP

Jan kinda Oka order number vastundi kada.. oka vela JAN lo rendu order numbers unte ekkada ravali ani..

So nee logic tappu avutundi kada oka month lo more than one row unte..
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23091
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 2:14 pm:   Edit PostDelete PostView Post/Check IP

naakartham kaaledhu maama..first order,second order ante enti..
present query ilaa undi maama...

select to_char(a.order_month,MM/YYYY)
a.order_number,
a.order_type
a.order_amount
from -----


so daanni cross tab cheyyaali with month on top..
Top of pagePrevious messageNext messageBottom of page Link to this message

Bangaram_khushi
Pilla Bewarse
Username: Bangaram_khushi

Post Number: 11
Registered: 04-2006
Posted From: 208.189.200.2
Posted on Friday, June 16, 2006 - 1:37 pm:   Edit PostDelete PostView Post/Check IP

Okka month ki Oke order ununda?? mari second order unte ekkada print cheyyali??
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 23085
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Friday, June 16, 2006 - 12:28 pm:   Edit PostDelete PostView Post/Check IP

maamas...naaku chinna problem vacchindhi..

For egjample :

select a.order_month,
a.order_number,
a.order_type
a.order_amount
from etc etc

ani query raasthey

Jan 123 CAP 1000
Feb 234 PAC 2000
March 345 APC 3000
April 567 ACP 4000

ilaa vasthundhi data...kaani naaku ilaa kaakundaa Month Top row lo vacchi.migathaa Data kindha raavalante elaa raayali SQL..ante

Month JAN FEB MAR APR
OrderNo 123 456 567 789
OrderType CAP PAC APC ACP
Order Amt 1000 2000 3000 4000