Dynamic text name comes from id #

Unfortunately I was given a database that has identified
almost everything with a number rather then a name. This requires
multiple calls to the database as a result. What the best way to
display results in a repeating region, where that number is turned
into the name. for example, let's say you have a recordset where it
pulls results where category is equal to numbers that range from
1-10. you have a second table the has all the category names and
their numbers. When you display the repeating region of all the
results, you get the name, as found in the second table, rather
then the number.

.oO(jsteinmann)
>Unfortunately I was given a database that has identified
almost everything with
>a number rather then a name.
That's quite common, because numbers are much more efficient
to identify
records (primary keys) and to create relations between
different tables
(foreign keys).
>This requires multiple calls to the database as a
>result.
No. Usually you can do it with pure SQL and a single query.
>What the best way to display results in a repeating
region, where that
>number is turned into the name. for example, let's say
you have a recordset
>where it pulls results where category is equal to numbers
that range from 1-10.
> you have a second table the has all the category names
and their numbers.
>When you display the repeating region of all the results,
you get the name, as
>found in the second table, rather then the number.
This is done in SQL with a JOIN, but without knowing more
details about
your table structure it's difficult to give a real example.
It will be
something like this:
SELECT this, that, ..., categoryName
FROM yourTable t
INNER JOIN categories c ON t.categoryId = c.categoryId
WHERE t.categoryId BETWEEN 1 AND 10
Micha

Similar Messages

  • Where did my DNS name come from?

    Hey everyone,
    Weird issue, I installed leopard server on my G5 last week and I believe I had it connected directly into my DSL modem at the time or no network connection at all. It asked me to name the computer so I called it darwin, then it said dns or hostname I forget which so I made it darwin.invution.
    When complete, it would show darwin.invution as my dns. So on the server I could go to http://darwin.invution/webmail for example and it would work fine.
    I had converted from standard to advance while playing around and some settings were messed up. After having a better understanding of server, I formatted and reinstalled to start from scratch.
    This time however, I had my Linksys router connected to my dsl modem and my server connected to it. When I installed server, it asked for a computer name, but dns was already filled in as bltnij2a.canada.hp.com which makes no sense. It wouldn't let me change it.
    Now under server admin, it shows computer name darwin, and connect to server is darwin.local but DNS is bltnij2a.canada.hp.com.
    If I open web server, it goes to http://bltnij2a.canada.hp.com and loads my server. Where on earth did canada.hp.com come from? Network settings doesn't show it at all, it shows my DNS server as my routers IP address. Confused??

    Use a static IP address on your LAN, and don't use DHCP for your server, and don't use an address in 192.168.0.0/16 or so, and don't use a domain you don't own. I tend to prefer to avoid making up a domain given how ICANN is now passing out new top-level domains, preferring to use something I've registered. And use of subnets outside of 192.168.0.0/16 or 192.168.0.0/24 or 192.168.1.0/24 as that makes future use of VPNs and VPN-based IP routing easier; such as a /24 subnet somewhere within 10.0.0.0/8 or 172.16.0.0/12 or such.
    As for the domain to use, I tend to use foo.example.com or example.net, assuming I own example.com or example.net. If you're running with invution.com as it appears, I'd tend to use internal.invution.com or invution.net (both of which you appear to own) for hosts inside the firewall and particularly that have a NAT'd IP address. Which means darwin.internal.invution.com or darwin.invution.net, for instance.
    As for your question: What is your Linksys set to here? Specifically check the widget to see what its network and DNS settings are. Also confirm that your server's DNS setting is valid (check the settings on the network panel in Server Admin or such or by accessing the server directly and launching Preferences and then the Network panel, and checking the active network controllers for the DNS settings), or that your router is providing valid DNS forwarding.
    Who is running your DNS? If you have that launched and running a DNS server locally, then you're going to need a careful look at that.
    Some of common consumer-grade network boxes have widely-known and very serious vulnerabilities (eg: the Linksys WRT54G wireless router firmware v1.00.9 and earlier, reportedly), and some recent malware attacks have specifically involved jamming DNS settings into various devices.
    Aim a shell-level dig command and a whois at this, and see if you can sort out where the particular DNS translation is arising. And determine if your DNS settings are correct on (all of) your devices.
    Some of your other questions indicate use of VPNs. Is there one in place here? VPN routing can involve the use of specific DNS servers.

  • Where does bcc display name come from

    Hello ...
    I have my iPad mail set up to bcc me; while the address is right the display name is wrong (I know only I can see it!).
    Where is this dislay name pulled from? Everywhere I look in contacts and settings it seems to be correct.
    Thanks,
    d

    Not sure. Might be something in these links.
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
     Cheers, Tom

  • Where did name come from?

    How did Apple come up with the name Macintosh in 1984 and iPod in 2001? I mean, I know that it has to have a reason but I have no clue what it is.

    The Macintosh name came from the similarly named variety of apple, and the origin of the iPod name is given here.
    (22289)

  • How to hyper link the text that comes from database ?

    Hi all,
    Jdev Ver :11.1.1.4.0
    I have one usecase like, to highlight(using af:commandlink) the keywords from some content..
    And i have some set of keywords, and where ever the keywords appears in the content i need to show those words as a af:commandlink in the page ..
    Anyone aware of this kind of usecase ? Please suggest some ideas..
    thanks,
    Gopinath J

    Hi,
    It is not straight forward, here is the sample code to do that where i replaced the text key with the hyperlink and bounded it to outputText
        <af:outputText value="#{<Bean>.text}" escape="false"/>
        //variable text inside bean with setters and getters
        private String text = "This is a sample text where the text key is shown as hyperlink";
        public void setText(String text) {
            this.text = text;
        //replaces the text "key" references with the hyperlink
        public String getText() {
            text = text.replace("key","<a href=\"http://google.com\">key</a>"); //escape sequence the quote to provide value for href
            return text;
        }Sireesha

  • Where does user.name come from when using System.getProperty(user.name)

    Hello,
    Based on the user's requirements, I implemented authentication based on the results of the System.getProperty(user.name) feature. The audit group has some concerns on where the user.name value is coming from.
    Does anyone have any idea where this property is coming from, and if it is coming from a file, whether it is stored as text.

    Environment variable that is read internally by the JRE. If you go to dos (in windows) and type "set" and hit return, you'll see Username=whatever your login name is. If course, someone with the right credentials can change this.
    Unix has a similar feature.

  • *Dynamic* Table Name in From Clause with input from cursor

    Hello
    I have a cursor say...
    select table_name from dba_tables where <blah>
    The result is
    row1:: emp
    rwo2:: emp_1 ---> Both the tables have same structure and entirely different data... please dont ask why... that's the way it is and we cant change it..
    Now we need to run an Insert...
    insert into tableX (col1,col2,...) select a,b,... from <o/p of the cursor> where <blah> ...
    Note: The table name changes and it the cursor can o/p emp,emp_a and emp_b.
    Am looking to do it parallel instead of doing it serially and with best performance ....no sql injection issues.
    By parallel i mean
    insert into tableX (col1,col2,...) select a,b,... from emp where <blah>
    and insert into tableX (col1,col2,...) select a,b,... from emp_1 where <blah> statements to fire parallel/at the same time to the database. If you can share procedure if you guys already have with you.. is really appreciated
    Thanks a lot for your time....
    Edited by: user007009 on Apr 27, 2013 8:33 PM

    Hello thanks for your time..
    I tried to implement the chunk by sql parallel execution approach and it took 3.1 seconds to complete.. while the SP took around 0.042 seconds and the parallel process didn't throwed any errors and it didn't insert any data either... I am not sure what I am doing wrong... can you please let me know your thoughts...
    Sample Data Creation::::::::::::::*
    drop table table_ASERCARE purge;
    drop table table_MEDCARE purge;
    DROP TABLE TABLE_XYCARE PURGE;
    DROP TABLE TABLE_TIME PURGE;
    DROP TABLE TABLE_LOCATION PURGE;
    drop table table_group purge;
    drop table tablex purge;
    -- select distinct TABLE_NAME from ALL_TAB_COLS where TABLE_NAME like 'EMP%';
    create table table_asercare (time number(30), location_number number(5), value number(5),catg_id number(5));
    insert into table_asercare values  (20110111, 01, 55, 1200);
    insert into table_asercare values  (20110131, 01, 31, 1223);
    insert into table_asercare values  (20120131, 15, 24,1224);
    insert into table_ASERCARE values  (20130131, 03, 555,1200);
    -- Truncate table table_MEDCARE
    create table table_medcare (time number(30), location_number number(5), value number(5),catg_id number(5));
    insert into table_medcare values  (20110113, 01, 23, 1200);
    insert into table_medcare values  (20110128, 02, 78, 1223);
    insert into table_medcare values  (20110130, 03, 100, 1224);
    insert into table_medcare values  (20120111, 04, 57, 1200);
    insert into table_medcare values  (20120221, 05, 64, 1223);
    insert into table_MEDCARE values  (20130321, 15, 48, 1224);
    create table table_xycare (time number(30), location_number number(5), value number(5),catg_id number(5));
    insert into table_xycare values  (20100113, 01, 99, 1200);
    insert into table_xycare values  (20110128, 02, 90, 1223);
    insert into table_XYCARE values  (20130128, 03, 24, 1224);
    create table table_LOCATION ( LOCATION_NUMBER number(5), LOCATION_NAME varchar2(50));
    insert into table_LOCATION values  (01, 'atlanta1');
    insert into table_LOCATION values  (02, 'atlanta2');
    insert into table_LOCATION values  (03, 'atlanta3');
    insert into table_LOCATION values  (04, 'atlanta4');
    insert into table_LOCATION values  (05, 'atlanta5');
    insert into table_location values  (15, 'atlanta15');
    create table table_category (catg_id number(5), catg_name varchar2(30));
    insert into table_category values (1200, 'EMS');
    insert into table_category values (1223, 'LJM');
    insert into table_category values (1224, 'LIO');
    create table table_TIME (YEAR_MONTH_DATE number(30), YEAR_VAL number(4), MONTH_VAL number(2),DATE_VAL number(2));
    insert into table_TIME values  (20110111, 2011, 01,11 );
    insert into table_TIME values  (20110131, 2011, 01,31);
    insert into table_TIME values  (20120131, 2012, 01,31);
    insert into table_TIME values  (20130131, 2013, 01,31);
    insert into table_TIME values  (20110128, 2011, 01,28 );
    insert into table_TIME values  (20110130, 2011, 01,30 );
    insert into table_TIME values  (20120111, 2012, 01,11 );
    insert into table_TIME values  (20120221, 2012, 02,21 );
    insert into table_TIME values  (20130321, 2013, 03,21 );
    insert into table_TIME values  (20100113, 2010, 01,13 );
    insert into table_TIME values  (20130128, 2013, 01,28 );
    --Truncate table table_group
    CREATE TABLE table_group (group_key number,table_name VARCHAR2(30), group_name VARCHAR2(30), catg_name varchar2(30));
    insert into table_group values (1,'table_ASERCARE', 'GROUP_ONE','EMS');
    insert into table_group values (2,'table_MEDCARE', 'GROUP_ONE','LJM');
    INSERT INTO TABLE_GROUP VALUES (3,'table_XYCARE', 'GROUP_TWO','LIO');
    create table TABLEX (YEAR_VAL number(4) ,LOCATION_NAME varchar2(50),tablename VARCHAR2(30), cnt number ); --> Proc data will be inserted into this...
    Stored Procedure++++++++_
    CREATE OR REPLACE
    PROCEDURE ABC(
        GROUP_NAME_IN IN VARCHAR2 )
    is
    type c1 is ref cursor;
        sql_stmt VARCHAR2(200);
        v_sql    VARCHAR2(30000);
        c1_cv c1;
        table_name_f VARCHAR2(30);
        c1_rec TABLE_GROUP%rowtype;
      BEGIN
        SQL_STMT := 'SELECT * FROM TABLE_GROUP WHERE GROUP_NAME = :i';
        OPEN c1_cv FOR SQL_STMT USING GROUP_NAME_IN ;
        loop
          fetch c1_cv  INTO c1_rec;
        exit when c1_cv%notfound;
    --    forall i in c1_rec.FIRST ..c1_rec.last loop
        table_name_f := c1_rec.table_name;
    --      END LOOP;
       EXECUTE immediate
       'INSERT  INTO tablex (YEAR_VAL,LOCATION_NAME, tablename, cnt)
    SELECT
    t.YEAR_VAL,l.location_name, :table_name, count(*) as cnt
    FROM '
        ||table_name_f||
        ' variable_table
    ,table_time t
    , table_location l
    ,table_group g
    ,table_category ctg
    WHERE t.year_month_date = variable_table.TIME
    and variable_table.location_number = l.location_number
    and ctg.catg_id = variable_table.catg_id
    --and ctg.catg_name = g.catg_name
    GROUP BY t.YEAR_VAL,l.location_name,g.catg_name' USING table_name_f;
        --dbms_output.put_line ( 'The SQL is'|| v_sql);
        COMMIT;
        --dbms_output.put_line ( c1_rec.table_name||','||c1_rec.group_name );
        --dbms_output.put_line ( 'The table name is '|| c1_rec.table_name );
      end loop;
        CLOSE c1_cv;
      --null;
    END ABC;
    Parallel Execution Code++++++++++_
    begin
    begin
    DBMS_PARALLEL_EXECUTE.DROP_TASK(task_name => 'TASK_NAME');
    exception when others then null;
    end;
    DBMS_PARALLEL_EXECUTE.CREATE_TASK(task_name => 'TASK_NAME');
    DBMS_PARALLEL_EXECUTE.CREATE_CHUNKS_BY_SQL(task_name => 'TASK_NAME', sql_stmt =>'select distinct group_key, group_key from table_group', by_rowid => false);
    end;
    begin
    DBMS_PARALLEL_EXECUTE.RUN_TASK (task_name => 'TASK_NAME',
    sql_stmt =>'declare
    s varchar2(16000); vstart_id number := :start_id; vend_id number:= :end_id;
    table_name varchar2(30);
    begin
    select table_name into table_name from group_table where group_key=vstart_id;
    s:=''INSERT  INTO tablex (YEAR_VAL,LOCATION_NAME, tablename, cnt)
    SELECT
    t.YEAR_VAL,l.location_name, :table_name, count(*) as cnt
    FROM ''||table_name||'' variable_table
    ,table_time t
    , table_location l
    ,table_group g
    ,table_category ctg
    WHERE t.year_month_date = variable_table.TIME
    and variable_table.location_number = l.location_number
    and ctg.catg_id = variable_table.catg_id
    and ctg.catg_name = g.catg_name
    and g.group_key =:vstart_id
    GROUP BY t.YEAR_VAL,l.location_name,g.catg_name'';
    execute immediate s using vstart_id;
    commit;
    end;',
    language_flag => DBMS_SQL.NATIVE, parallel_level => 2 );
    end;
    / thanks in advance for your time.
    Edited by: user007009 on Apr 28, 2013 12:25 PM

  • Dynamic table name in FROM clause of an abap native sql statement

    Hi Frenz,
    Kindly help me with the solution. Thank you.
    data: tabname type string.
    tabname = 'CRMD_ORDERADM_H'.
    EXEC SQL.
      SELECT count( * )
             FROM tabname into :count
    ENDEXEC.
    This piece of the code is giving me a dump. Kindly let me know how can i use tabname in this context. It is a parameter on the selection screen.
    Thank you,
    Kamal
    Edited by: Rob Burbank on May 20, 2009 10:02 AM

    Hi
    try using ( )
    EXEC SQL.
    SELECT count( * )
    FROM ( tabname ) into :count
    ENDEXEC.
    hope this helps!
    haven't tested it in from section but it worked for me in where section
    regards jacko
    Edited by: Jacko1986 on May 20, 2009 3:55 PM

  • Where do the song title names come from?

    i just bought a cd off ebay, one which i believe was manufactured by the person who sold it to me, because i don't think the album was ever released on cd, only in mp3 form.
    anyway, i put the cd in, and instead of the correct track listing coming up on itunes, each track listing had been replaced by a title which insults the artist who made the album.
    i'm trying to find out if these new, insulting track names were somehow encoded by the album seller who manufactured the cd, or whether the names were encoded into itunes library of track names which were then matched up with the code of the tracks on the cd when i put it into my computer.
    anyone know whats up?

    For CDs, iTunes does a query to the Gracenote database to get the track info. Since Gracenote is user-updatable, somebody apparently put bogus data in for that particular CD.
    To correct the info, right-click the track, Get Info, go to the Info tab and type in the correct info.

  • Where did the  text logo come from.

    I know this is a stupid question and i know i will get stupid remarks but i want to know where and hoe the  logo became text. I have seen it alot and i have used it alot but i wish to know. maybe if i had been an apple person longer i might know.

    How it became text?!? You mean, kinda like how someone put it into a font, or what the decision was to put it in fonts in the first place?....to both questions, the answer is "yes".

  • Positioning dynamic text in SAP Script windows

    HI all,
    Is there any control command to position DYNAMIC text that comes from a variable into a window...
    Regards,
    Chandra Sekhar

    Hi chandra,
    You can move the text into one variable in the print
    program and in the layout form call this as
    &VAR&.
    Thanks&Regards,
    Siri.

  • EDGE and HTML dynamic text in a "box" with scroll bar

    I'm new to EDGE, a win7pro master collection cs5.5 suite owner. I'm mainly in the Film/Video post production field (mostly AE, PPro, Pshop, IA) but have been branching into web design the last couple of years.  I use Dreamweaver, Fireworks, Flash. While I'm a expert user with all the Film/video apps, I would say I only have intermediate ability with the web apps. While I understand a lot of programing logic bulding blocks I'm not a coder.
    So since we're told "flash is dead",  my interest in Edge is to try to do some of the things that I can currently do in flash in  EDGE. I was excited when Edge first came out but lost interest when it became obvious that Adobe was not going to offer Edge and Muse to "suite owners" but only in their force feeding of the "Cloud". Better known as the "golden goose" for adobe stockholders and a never ending perpetual hole in the pocket for users. Anyway....
    I spent the last couple of days doing some of the tuts and messing with the UI. It's matured a lot since I was here last.
    I've been working on a flash site for a sports team where one of the pages is a player profile page where college recuriters and other interested parties can view recuriting relavent info/stats about players. This is how it works. While on the "Team" page a users clicks on  a button labled "Player Profiles" . (Animation) A "page" flies in and unfurls from the upper right corner (3d page flips effect created in AE played by flash as a frame SEQ). Once it lands filling most of the center of the screen there is a bright flash. As the brightness fades we see the "page" is a bordered box with a BG image of a ball field(End). (Animation) from behind the border in fly small pictures (player head shots with name and jersey number). They stream in and form a circle like a wagon train and the team logo zooms up from infinity to the center of the circle(End). As the user mouses over a player's pic it zooms up a little and gets brighter (like mouseover image nav thumbs for a image slider). If the user clicks on a player's head shot it flips over and scales up to become a text box with a scrollbar. The content of the box is a mix of images, static and dynamic text fields populated from data in an "player info data base" XML file, and some hyperlinks. It's all kept updated dynamicaly with current stats, info and images from the XML file. There is also a "PDF" button that allows the user to open/save/print a PDF of the player's profile (the PDF's are static files for now but the choice of which pdf to retrive is dynamicaly supplied via the XML file.
    So.... Is Edge now able to do something like this?  Would it need to be a collection of small animations? could these be "assembled" and connected as an asset in dreamweaver ?
    I thought I would approach this from the end (ie click on an image and display a box with dynamic TEXT fileds. ) since that is the most important part, ie displaying the dynamicaly updated profile info.  Sooooo....
    Can Edge display a scrolling text box with Images, static text, and html dynamic text in it??
    Joel

    The code is in composition ready. Click the filled {}

  • How can I assign index markers to a list of names coming from Excel

    I have to build up indexes on directories. The list of names comes from Microsoft Excel and is saved as a text file. I need to assign index markers to the list (sometimes up to 2000 names) so I can build up an index after the layout is done.

    Indesign cs6
    On Thu, Feb 19, 2015 at 11:07 AM, John T Smith <[email protected]>

  • Using loadVariables() to populate a Dynamic Text in a MovieClip

    Hello everyone,
    I am trying to populate a Dynamic Text with data from a
    remote database. I have no problem populating the Dynamic Text with
    the data from the remote database if the Dynamic Text is placed in
    the main timeline using the following code.
    loadVariables ("php/attorney.php", "");
    Once I move the Dynamic Text into a Movie Clip with instance
    name of “MC_But_1” I am only able to populate the
    Dynamic Text if I place the above code in the movie clip. Since it
    is going to take sometimes for the data to be transferred from the
    remote database I rather to do this on the main timeline before the
    MC_But_1 is shown. I have used the following code but for some
    reason it is not working.
    loadVariables ("php/attorney.php", _root.MC_But_1);
    Can someone be kind enough to tell me where I am going wrong?
    Thank you very much and have a great day.
    Khoramdin

    > Since it is going to take sometimes for the data to be
    > transferred from the remote database
    That is one of the best arguments for abandoning
    loadVariables() in
    favor of LoadVars(). Check that out in the manual. It's
    better because
    there are events that get triggered when a data transfer has
    completed
    and you can write an event handler script to deal with server
    responses.
    Christian Scholz-Flöter

  • Dynamic text box problems

    I have created a dynamic text box and an input text box.
    I have produced code that replicates whatever is typed in the
    input box to display in the dynamic box along with a date and time
    stamp once a button is clicked.
    This all works fine, except for the sizes of the fonts. for
    both boxes, i selected font size 10 . The input box is fine,
    however the dynamic box text is huge.
    When i make the dynamic text font smaller, it fits in fine,
    but the input text that is inserted into the dynamic text box comes
    in too big. If i make the input text box font smaller it is
    unreadable when typing it in.
    any soultion to how to make my font consistent. I am assumin
    the problem is because both the text boxes are different sizes,
    however i don't know how to resolve the issue.
    Any help is much appreciated.
    Laura

    hi laura
    i think the problem it's in the targetPath "
    mainClip.newspaper_mc.newinstructions.text =
    lu.welcome[langIdx];".
    chech if you have mistype the instance names of your
    movieClip and rewrite it or in the Actions panel select the path "
    mainClip.newspaper_mc.newinstructions" and click the button
    "Insert Target Path" this will open a popup with a tree of your
    MC's on the stage, so you can browse and find the textfield. i hope
    i helped you if not let me know!

Maybe you are looking for