Jump to content

Recommended Posts

Posted

table lo distinct columns on PLAN_ID theesukoni

same table lo aaa particular PLAN_IDs ki different values insert cheyyali

[b]ee table ni[/b]

PLAN_ID
1 1001 default
2 1002 default
3 1003 default


[b]I want like this[/b]


PLAN_ID
1 1001 default
2 1002 default
3 1003 default
4 1001 choice
5 1002 choice
6 1003 choice



please guys... 1 day nundi chastunnaa

Posted

declare that 1st column as identity and insert

Posted

primary_key only plan_id aithe u cannot insert into the table as u told

Posted

see the idea here is you make template of first table as second table, you insert values in the second table, you append them.

try it.

Posted

[quote name='mukunda' timestamp='1373758035' post='1303949221']
see the idea here is you make template of first table as second table, you insert values in the second table, you append them.

try it.
[/quote]

okatee table bhayyaa.... same table lo new records insert cheyyali using particular column in that table

Posted

requirement sariga ardam kaaledu bhayya,, nuvvu insert cheyyalsina values already table lo unna value meeda dependent ga untaya,, konchem example unte cheppu.. will try

Posted

[quote name='Ever_forEver' timestamp='1373757513' post='1303949200']
table lo distinct columns on PLAN_ID theesukoni

same table lo aaa particular PLAN_IDs ki different values insert cheyyali

[b]ee table ni[/b]

PLAN_ID
1 1001 default
2 1002 default
3 1003 default


[b]I want like this[/b]


PLAN_ID
1 1001 default
2 1002 default
3 1003 default
4 1001 choice
5 1002 choice
6 1003 choice



please guys... 1 day nundi chastunnaa
[/quote]

Dat depends on order which u r inserting. Neeku Ela insert chesinaaa adey order follow avvala?

Posted

[quote name='faf' timestamp='1373758810' post='1303949239']
requirement sariga ardam kaaledu bhayya,, nuvvu insert cheyyalsina values already table lo unna value meeda dependent ga untaya,, konchem example unte cheppu.. will try
[/quote]

already PLAN_ID s evaitho vunnayo table lo

malli ade same PLAN_IDs ki different values insert cheyyali


select distinct PLAN_ID from PLAN_TABLE where PLAN_VALUE=3001

ila vachina PLAN_ID s ki

insert into PLAN_TABLE values(primary_id, PLAN_ID(piana vachina distnct values), 3001(PLAN_VALUE), 'choice' (instead of default), expiration_date,...........)

Posted

[quote name='DARLING...' timestamp='1373759055' post='1303949242']
Dat depends on order which u r inserting. Neeku Ela insert chesinaaa adey order follow avvala?
[/quote]


order emundi?... paina malli cheppa okasari choodu bhayya...

Posted

[quote name='Ever_forEver' timestamp='1373759566' post='1303949251']

already PLAN_ID s evaitho vunnayo table lo

malli ade same PLAN_IDs ki different values insert cheyyali


select distinct PLAN_ID from PLAN_TABLE where PLAN_VALUE=3001

ila vachina PLAN_ID s ki

insert into PLAN_TABLE values(primary_id, PLAN_ID(piana vachina distnct values), 3001(PLAN_VALUE), 'choice' (instead of default), expiration_date,...........)
[/quote]

create a staging table, insert this plan_id, plan_value to that table. and insert all the other columns like 'choice, expiration_date' and all..
once done,, insert into main_table select * from staging_table chesey

Posted

[quote name='faf' timestamp='1373761295' post='1303949281']
create a staging table, insert this plan_id, plan_value to that table. and insert all the other columns like 'choice, expiration_date' and all..
once done,, insert into main_table select * from staging_table chesey
[/quote]

maaku aa permission ledu bhayya tables create cheyyadaniki

Posted

[quote name='Ever_forEver' timestamp='1373762297' post='1303949297']

maaku aa permission ledu bhayya tables create cheyyadaniki
[/quote]

hmm,, then you can use a procedure.. get the required values into a cursor,, and then isert into your main table.. I think may be u will get mutation error,, but you can try it..

×
×
  • Create New...