Select variable amount of columns and htp.print them

Hi,
i have a rather difficult problem i guess. I have a table "Languages" in which i have a couple of languages for example 'nl', 'f', 'eg', ...
i also have another table "Translations", which consists of an id and variable columns. For example, if we have the languages 'nl','f' and 'eg' in our Languages table, we also have a corresponding column in the Translations column. The column names are then 'nl', 'f' and 'eg'. (i'm using nls).
So if i add a language, two things happen:
-a row is added to the languages table
-the translations table is altered; a column is added
Now i want the users to be able to add translations, so filling in the empty fields in the translations table if a language has been added. I want to see an overview of all languages with an input field.
Now i have this:
FOR i IN (SELECT * FROM TRANSLATIONS) LOOP
htp.print('<tr><td>' || i.id || '</td>');
FOR a IN (SELECT id, taal, afkorting FROM LANGUAGES) LOOP
l_thevar := 'i.' || a.afkorting;
htp.print('<td><input type=text name=' || i.id || ' value=' || XXXX || '></td>');
END LOOP;
htp.print('</tr>');
END LOOP;
Where the XXXX is, this should be something like i.nl or i.f or i.eg. So what i should be able to do is saying something like take 'i.' and add the nl, f or eg, in my example it's the column a.afkorting. I should paste it together and then plsql should handle it as a variable. It's like a variable variable.
I know it is possible in PHP, but in PL/SQL i haven't been able to find a method to do so.
If anyone could help me, i would really appreciate it!
Tnx a lot!
If something isn't clear, please ask me !

Er.. not sure how to put this gently, but PHP (and Perl/Python/etc) programmers make the absolute WORSE database (PL/SQL) programmers.
The reason is that programmung techniques used in these scripting languages are great.. for scripting languages. But is not just damn ugly in PL/SQL, but wrong, impacting performance, data integrity, violating concurrency principles and so on.
A FOR cursor fetch loop within a FOR cursor fetch loop? Just plain wrong mate. Performance will suck. That code will not scale and will run into a brick wall when the volumes of the underlaying tables grow.
Use a SQL JOIN to join the data sets. And this is an important concept. In PL/SQL (and SQL and in any RDBMS), you must work with DATA SETS - not with rows. This type of row-by-row processing may look similar as processing arrays in PHP. But then a database table is not just a simple array memort struct. So don't treat it like you would an array in PHP.
The correct way to approach this type of problem in PL/SQL is to write a HTML rendering engine that can render any SQL cursor. Does not matter what the cursor contains - the number of columns, data types, etc.
Which means that you can create a SQL SELECT (joining the languages and translation tables) and pass this SQL to the PL/SQL rendering engine to churn into HTML.
Writing a HTML renderer in PL/SQL is not difficult. You use DBMS_SQL cursors. The DBMS_SQL API allows you to create SQL cursors, peek at how many columns are returned, what the column names are, what the data types are - all the data that you need to loop through in order to generate HTML table tags.

Similar Messages

  • How do i copy contents of cells in a column and then paste them on another spreadsheet as a row?

    HOW DO I COPY CONTENTS OF A CELL IN A COLUMN AND THEN PASTE THEM IN A ROW ON A DIFFERENT SPREADSHEET?

    May you use the Numbers terminology ?
    For Numbers, a spreadsheet is a document created by Numbers.
    Such a document contain one or several sheets.
    A sheet contain one or several tables.
    A table contain one or several cells.
    As you are asking about a cell, I guess that you may copy this cell
    but I'm not sure of the nature of the target cell.
    Is it in a table of the same document or in a table of an other document ?
    Yvan KOENIG (VALLAURIS, France) mercredi 18 mai 2011 19:16:21
    Please :
    Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • I have just selected all my desktop icons and accidentally deleted them.  This included my external hard drive with 22,000 photos in iPhoto.  I cannot open iPhoto now.  Can someone help please?

    I have just selected all my desktop icons and accidentally deleted them.  This included my external hard drive with 22,000 photos in iPhoto.  I cannot open iPhoto now.  Can someone help please?

    What is the file system of that external HD? is it MacOS Extended (Journaled)?
    Which iPhoto version do you have?
    If you directly select the iPhoto Library in the Finder and use "File > Get Info", does the library still show as "Kind: iPhoto Library" and is the file size correct for 22000 Photos?
    If the library does no longer have the correct size, restore it from your backup.
    But if the library has the correct size, try to open it directly by clicking it. This should work, if your iPhoto version is iPhoto '11.

  • Alternate select lists on 2 columns and return more than 1 column

    Hi,
    I try to build 2 alternate select lists and each select list should return more than 1 column
    2 Columns PART_ID and PART_SPECIFICATION
    Now I build a select list on PART_ID like
    select part_id d,part_id r from parts;
    The result should be:
    Column PART_ID has PART_ID and PART_SPECIFICATION must be text of PART_SPECIFICATION
    The other select list based on PART_SPECIFICATION should be like
    select part_specification d,part_id r from parts;
    Now it should be displayed part_specification in PART_SPECIFICATION and part_id in PART_ID.
    This is because one user knows the part_id and another knows only the specification
    Please help me
    Siegwin

    Hi Siegwin,
      Check your application Page 7(copy of page 500)  using select list instead of plugin, it gives all values.
    and works very well,
    use ajax process to get Xml data into page items
    following are changes
    application process: getData
    application item : TEMPORARY_APPLICATION_ITEM
    create one function in page html header pull_multi_value()
    and it call on page item p7_empno on html form element attribute as onchange="pull_multi_value(this.value)";
    this may Helps you,
    Pars.

  • I want to view the results in the form template, rather than in rows and columns, I can print them as .pdf but want to view them online

    e.g   DOB:
           Name:
    If this is the form and   100 people entered it I  would like to go to form template and click forward arrow to go thru all 100, so I can review all of the results
    Like you can in access
    thanks

    You can download the PDF that you are wanting to look at. In safari if there is a link to a pdf you can usually Control Click or Right Click and select to save it to the desktop. From there, you can open the PDF with Acrobat.
    If i'm not mistaken, though, PDF's will default to Apple Preview, so if you want PDFs to open with Acrobat by default, you can set it that way by highlighting a PDF then hitting (Apple) I. In the Info pane, expand the "Open With" field, set the program to Acrobat, then tell it to Change All if you want all PDFs to default to Acrobat.
    Hopefully that will help!

  • How to custom select minimum amount of addons and plugins to load with Firefox browser?

    Hello, I am using latest Firefox 24.0 along with Window xp service pack 3, with approx 1 1/2 Gb memory along with Firemin Plugin to keep Firefox Memory up. I will hopefully be upgrading my PC by early next year.
    However even when using Firemin along with Firefox, many times regular Firefox is bloated, and still uses too much memory, so, many times I have to open Firefox in Safe Mode, just to be lighter.
    Is there any way to open Full Version of Firefox, in a Custom select mode, where I can have set just the minimum Addons and plugins actually needed at the time, without having to go thru and disable the ones do not need? I wish I could use Firefox in safe mode all the time, because is so much lighter, but sometimes I just need the full feature version. Please advise, and thanks for your help!

    You can use multiple profiles and the -no-remote command line instance
    to load different (clean vs addon bloated) profiles.
    SEE
    * http://kb.mozillazine.org/Command_line_arguments
    AND
    * [[Use the Profile Manager to create and remove Firefox profiles]]

  • Dear adobe premier guys...why still u didnt release an update that let us select rushes directly from the timline and drop them into a bin... now if we want to select rushes by select all or few rushes and we throw them into a bin all we get is the whole

    We need an update that makes us able to select specific rushes from the timeline including their in and out and put them into a bin..nkw if we do so we get the whole rush without its in and out we already did... i guess it very easy to be solved by ur support team...thank u

    We need an update that makes us able to select specific rushes from the timeline including their in and out and put them into a bin..nkw if we do so we get the whole rush without its in and out we already did... i guess it very easy to be solved by ur support team...thank u

  • Pass user selected variable to Entity implementation class

    Guys,
    I need to pass the user selected variable to Entity class. and looking for the best way to do this ......
    If user selected process1 or process2 then I need to call stored procedure right before the commit. So i need to pass the user selected process to entity class file.
    I am thinking about having a transient attribute on entity and set the value on front end..... so that value will be pass to the entity class file and in beforeCommit method i can check the value of transient variable and then call stored procedure
    is this a good approach or any other suggestions are greatly appreciated....
    thank you
    -Raj

    Thank you Timo and Jobinesh....
    Good suggestion Jobinesh... will start the implementation
    Thank you
    -Raj

  • Selection Variables / Name of the Variable in a Variant

    Hi,
    I am trying to replicate / create the same variant from PRD back to DEV.
    But in PRD for the variant, there are values for attributes. (Selection Variable is having T and D)
    Number of variables are available for Name of the variable (f4 values)
    But these values are not available for the same variant in DEV.
    How can i bring the values for selection variables and name of the variables in DEV.
    Thanks in advance for your help.
    Regards,
    Ravi

    Ravi,
    you have to include the variant into a transport request than you can transport to the other system. In general, variants not transported automatically when you create a program, you have to include the variant into the request if you want to use in another system also.
    You can do this by:
    SE38 --> Variants --> Utilities --> Transport request
    Edited by: mrwhite on Apr 28, 2009 4:52 PM

  • Changing selection variable of a workbook

    Hi Gurus
    I added a new query to a workbook of 7 queries.
    For all those 7 queries selection variable is profit centre
    But for the new query selection variable is profit centre and fiscal year period
    How can make a unique selection variable for the work book and where can i chan

    Hi,
    You need to provide the same variable(profit centre) for the new query also, then it will be applicable to all the queries. And use the Fiscal year variable for new query it will be applicable only for the new query.
    Hope this helps...
    Rgs,
    Ravikanth.

  • Problem in Combo chart columns and line

    I select chart type is  combo in my vc model  and select data series is columns and line.
    I define 5 series in the chart.
    once i deployed the model the output shows the columns are overwrite in stacked position.
    eg:
    series 1: 10%
    series 2: 20%
    series 3: 45%
    series 4: 25%
    series 5 is line type
    but in the chart the only one column will display,its top value 45% and itself shows 10% and 20% in different color.Don't show the 25% value on that column.
    How to display the chart columns in clustered type in combo chart.
    thanks in advance
    Aravind.S

    Hi
    When you select 'Combo Chart' you will not get options for 'Stacked or Clustered'. By default it will be 'Stacked' chart only. Combo charts are generally used for less number of data series. Normally these charts are best suitable for 2 Data series only.
    Still in your case is there any reason to use 'Combo Chart'? Consider following points -
    1. If you want to use this type of chart then selction of 'Columns + Line' will be difficult because it will treat only 'Last Data Series' as line & all others will be columns & what you said problem will appear.
    2. Instead of that select 'Column + Lines', so that only first 'Data series' will be column & rest all will be 'Lines'. So that you will get better visibility in that graph.
    I think this will help you, If you have nay problem let me know.
    Regards
    Sandeep

  • How do I complete online .pdf form and then print?

    Sometimes, I can enter data on an online .pdf form and sometimes, I cannot.  I need to complete forms and then print them rather than print a blank form to complete by handwriting.  Window XP and Vista on my computers.  I have installed some Adobe and Acrobat programs but do not know which ones would help me with my problem.  thank you

    Adobe is the company. I assume you are talking about Reader and Acrobat. It would be nice to know which ones, but the answer is likely the same. With Reader, you can only complete the form electronically in Reader if the creator added from fields for your to fill in. If not you have one option and that is to print. You could still play with filling it out electronically, but you would have to print the form, put it back in the printer, and use your word processor to place the information on the form. This is a bit time consuming and requires some measuring and possibly some trial and error, but it does work - I used to fill forms out like this all the time, but generally forms I filled out once a month and so it was worth the time.
    With Acrobat, you can use the Typewriter tool, Use the Text Touchup Tool (not real convenient) with the ctrl key used when you place the cursor, or create your own fields. Depending on your version of Acrobat, you may not be able to create form fields (like AA7 Std and before I think, Pro includes the form tools). With forms, you may also have the choice of the form files under TOOLS>Advanced Editing (typically called AcroForms) or the FORM menu that typically takes you to Designer.
    Those are your choices, though there are variations with version (next time try to tell us the program version you are using and if it is Reader or Acrobat - for Reader you may want to go to the Reader forum).

  • On SSRS Export or Print, Select the first 9 columns out of 15 columns

    Hello Every1,
    My Greetings for the day!!!
    I am Hiren Parikh from India.
    I am developing a SSRS report (Tablix) which has 15 columns. While developing the report, I have come a crossed a strange requirement.
    When the reports gets loaded in SSRS Preview or in Sharepoint, it should display all the 15 columns.
    However, if the user exports the same report or print the report in that case only the first 9 (columns 1 to 9)should come and the remaining 6 (columns 10 to 15) should not come in the print or export.
    I request you all to suggest me.
    Thanks in advance.
    Regards,
    Hiren Parikh.
    Hiren Parikh

    Hi Hiren Parikh,
    Per my understanding that you want to hide the remaining 6 columns when print or export the report but display all the column when view in Sharepoint, right?
    I have tested on my local environment and if your SQL Server version is 2008 R2 or higher, you can take reference as the method below:
    This method is use the expression to show/hide the 6 columns in the report, when you print/ export the report it will hide, only when you preview in the designer or view the report in the server you can see all the columns
    Details information below for your reference:
    Check the entire column and right click the column to select the "Column Visibility"
    Check the "Visibility" on the left pane and check the "Show or hide base on an Expression"
    Expression:
    =iif(Globals!RenderFormat.IsInteractive,False,True)
    Repeat the step1 and step2 to hide the other columns.
    If your version is SSRS 2008 and older, you can create a Parameter name 'Display or Print' and can give 2 values one Display and another Print.
    Create two tablix: one have 15 columns (Tablix1)and another 9 columns (Tablix2)and when choose "Display" show the tablix1 and hide the tablix2 and when select the "Print" hide the tablix1 and show the tablix2.
    If you have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How can I print from my ipad2 to my hp6210 all in one using printopia...I can see the list on my ipad2, I select the printer and say print but nothing happens.

    How can I print from my ipad2 to my hp 6210 all in one using printopia? I see my printer on my iPad, I select it and say print and nothing happens. The printer is connected to an older Mac with OS X 10.4.11 but I do have an imac in another room. I have trouble printing from the iMac to this printer also even tho share is on but the printer works fine with the old Mac it's connected to. My iPad has the latest iOS.

    A few things to consider.
    The computer Printopia is loaded on must be powered on and must be able to print on the printer that is being shared.  If the iMac is having problems printing to the printer it could indicate a problem with the share setup.

  • Selecting items in column/list view copying them and pasting them to

    in the past (was it OS 9 ?????? ) i would be able to select all items in a folder
    if i had a long list of titles of files ( songs ) and copy to clipboard and then paste them to text edit and have that list handy for future reference. for example if i have a DVD with 100 photos. I want to keep a file of the names only. I used to be able to select all of them copy and then paste to a document. Cant do it in TIGER????? am i wrong?
    work arounds....

    Hi, Glenn.
    How this works now appears to depend on the application into which you are pasting the results.
    If I open a folder, Select All (Command-A), Copy (Command-C), and then paste into a TextEdit document, if the contents include PDFs it actually pastes all the PDFs into the document! Looks like a change in how this works.
    If I paste into a Carbonized text editor, like Tex-Edit Plus, it pastes the file names, as expected.
    Here's a workaround:
    1. Open the Macintosh HD > Applications > Utilities folder and Lunch Printer Setup Utility. You should see a printer icon in your Dock.
    2. Drag and drop the folder whose contents you want to save a listing of to the icon in the Dock.
    3. When the Print window displays, either:• Click Preview. A print preview of the FInder info for those files appears in Preview. If you like what you see, select File > Save As... and save the output.
    • Click the PDF pop-up button and select "Save as PDF" from the list. Follow the prompts from there to save the Finder info as a PDF file.The resulting PDF saves the list you desired.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

Maybe you are looking for

  • Air 3.0 rendering problem

    I just packaged up an android game using Air 3.0 and the captive runtime (very excited about that!) Much to my surprise I now have a few new rendering bugs. (GPU mode / full screen, Android 2.3 Motorola droidX) Graphics are intermittently missing, th

  • NullPointerException thrown in PKCS12KeyStore when verifying a signed JAR

    Hi, java -versionjava version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) (WinXP) I've signed a JAR with a new pkcs12 certificate using: jarsigner -keystore mystore.

  • SLO Data Integrity check

    Hi, Currently we have 10 company codes in our production system (e.g. Company Code P01 ~ P10) However, there is a requirement that 1 (one) of them need to be separated/migrated into separated system (eg. Company code P10) The idea is to copy client u

  • J2se java not running

    I keep getting an "Exception in thread "main" java.lang.NoClassDefFoundError: CalendarTest" I am getting this type of error for each time I run any of the files that "I am able to compile it", just not run it. I am running XP os. I have run the same

  • Probleme de contact

    Bonjour, je ne sais pas si l'endroit est bien choisi pour ce genre de question mais je ne trouve rien d'autre. Voilà j'ai un problème car je voudrais récupérer le numero de série d'un logiciel qui n'a pas été enregistré sur mon compte adobe.Le problè