Question about Dynamic cursor!!
-
I want to create a cursor using a string,the code as below. but it's complied with error.who can tell the solution,thanks!! StringSql := ' select Right.SEQ_NUM, Right.PAY_SYS_CD, HD.TORI_CD from ' || HdTableName || ' HD, ' || RightTableName || ' Right where Right.DENPYO_NUM = DenpyoNum and HD.DENPYO_NUM = Right.DENPYO_NUM '; declare cursor CUR_PAYINTERNALCODE(DenpyoNum in AATCHANGEHD.DENPYO_NUM%TYPE) is --select * from aatchangehd where denpyo_num=DenpyoNum; StringSql;
-
I want to create a cursor using a string,the code as below. but it's complied with error.who can tell the solution,thanks!! StringSql := ' select Right.SEQ_NUM, Right.PAY_SYS_CD, HD.TORI_CD from ' || HdTableName || ' HD, ' || RightTableName || ' Right where Right.DENPYO_NUM = DenpyoNum and HD.DENPYO_NUM = Right.DENPYO_NUM '; declare cursor CUR_PAYINTERNALCODE(DenpyoNum in AATCHANGEHD.DENPYO_NUM%TYPE) is --select * from aatchangehd where denpyo_num=DenpyoNum; StringSql;
I hope you have your flameproof suit on :) Alternatively, for friendly advice, please turn left at the end of the passage and enter the SQL forum
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog Photography -
I hope you have your flameproof suit on :) Alternatively, for friendly advice, please turn left at the end of the passage and enter the SQL forum
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog PhotographyAn idea just popped in my head ::lightbulb:: What if Chris changed the style of the lounge, so that anyone would immediately know that they are not in a programming friendly area. As annoying as seeing newbies posting these in the lounge, I sometimes have to scroll to the top of the page just to make sure that I am in the right forum.
I Dream of Absolute Zero
-
I want to create a cursor using a string,the code as below. but it's complied with error.who can tell the solution,thanks!! StringSql := ' select Right.SEQ_NUM, Right.PAY_SYS_CD, HD.TORI_CD from ' || HdTableName || ' HD, ' || RightTableName || ' Right where Right.DENPYO_NUM = DenpyoNum and HD.DENPYO_NUM = Right.DENPYO_NUM '; declare cursor CUR_PAYINTERNALCODE(DenpyoNum in AATCHANGEHD.DENPYO_NUM%TYPE) is --select * from aatchangehd where denpyo_num=DenpyoNum; StringSql;
Two bad things: 1. A cursor (did I mention you should avoid them?) [edit]Ooops, just now I noticed the '||' for string concat, you're using Oracle[/edit] 2. A programming question on the lounge... Yes, even I am blogging now!
-
An idea just popped in my head ::lightbulb:: What if Chris changed the style of the lounge, so that anyone would immediately know that they are not in a programming friendly area. As annoying as seeing newbies posting these in the lounge, I sometimes have to scroll to the top of the page just to make sure that I am in the right forum.
I Dream of Absolute Zero
... or even take the Lounge off the home page. Perhaps it could be an option in 'My Settings' to pick which forum you see on the right hand side, and for new people who haven't made a choice, it could just be a list of all the forums, to encourage people to pick an appropriate one, and not just post their question in the first forum they see.
-
... or even take the Lounge off the home page. Perhaps it could be an option in 'My Settings' to pick which forum you see on the right hand side, and for new people who haven't made a choice, it could just be a list of all the forums, to encourage people to pick an appropriate one, and not just post their question in the first forum they see.
Or may I suggest turning right at the end of the passage for the suggestions forum ;P
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog Photography -
I want to create a cursor using a string,the code as below. but it's complied with error.who can tell the solution,thanks!! StringSql := ' select Right.SEQ_NUM, Right.PAY_SYS_CD, HD.TORI_CD from ' || HdTableName || ' HD, ' || RightTableName || ' Right where Right.DENPYO_NUM = DenpyoNum and HD.DENPYO_NUM = Right.DENPYO_NUM '; declare cursor CUR_PAYINTERNALCODE(DenpyoNum in AATCHANGEHD.DENPYO_NUM%TYPE) is --select * from aatchangehd where denpyo_num=DenpyoNum; StringSql;
My cursors blink. That's how I like them. :) -- Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr. Welle: Erdball - F104-G Starfighter
-
I want to create a cursor using a string,the code as below. but it's complied with error.who can tell the solution,thanks!! StringSql := ' select Right.SEQ_NUM, Right.PAY_SYS_CD, HD.TORI_CD from ' || HdTableName || ' HD, ' || RightTableName || ' Right where Right.DENPYO_NUM = DenpyoNum and HD.DENPYO_NUM = Right.DENPYO_NUM '; declare cursor CUR_PAYINTERNALCODE(DenpyoNum in AATCHANGEHD.DENPYO_NUM%TYPE) is --select * from aatchangehd where denpyo_num=DenpyoNum; StringSql;
-
An idea just popped in my head ::lightbulb:: What if Chris changed the style of the lounge, so that anyone would immediately know that they are not in a programming friendly area. As annoying as seeing newbies posting these in the lounge, I sometimes have to scroll to the top of the page just to make sure that I am in the right forum.
I Dream of Absolute Zero
Or pay attention to the words in red when submitting a message that says "Please do NOT post programming questions to this forum." Pretty clear to me. Or maybe those people are color blind???
Yes, I program in VB6, but only because I use it to fill my addiction to having a dry place to sleep and food to eat! -
Or pay attention to the words in red when submitting a message that says "Please do NOT post programming questions to this forum." Pretty clear to me. Or maybe those people are color blind???
Yes, I program in VB6, but only because I use it to fill my addiction to having a dry place to sleep and food to eat!Have you noticed it's men who always do this ? Something about not taking 'No' for an answer ? ;P The tigress is here :-D
-
Have you noticed it's men who always do this ? Something about not taking 'No' for an answer ? ;P The tigress is here :-D
Let's not start pointing gender specific questions!!! ;P Yes, I program in VB, but only to feed my addiction to a warm place to sleep and food to eat!
Visit my Code Project blog (Mobile Audio project)[^]