Connecting Each row to another Table

Hi
This probably isnt the JDBC question but can some one tell me how to Connect each row of a column to another Table.
I have a Table with two columns Name and UserID. I want to connect each UserID to another Table. like User01 will be connected to another table called burn table for user01. User 02 will be connected to another table called burn table for user 02. Each table for user01 and user02 has 3 columns: CDName, EULA, License Key.
I read about primary and foreign keys but can some one give me a hint on this about how to start on it?
And if i get this done, then how would i execute a SQL query command so that I can read the data for each user. I am using java Servlets.
I am new sorry.
-bhaarat

i agree with you that making seperate table for each
user is terrible and i would be ashamed to present
this projec to anyone.
how do you think i should design this database other
than what i have suggested..
i might have alredy explained what the database is
doing but let me do that again..
1. There are about 150 or more CD's from MS.
2. Each user is able to burn a cd once only. for
example if user has already burned xp pro he cant burn
again.
3. there are about 600 or more users(thats why making
each table for each user is wrong, eventhough some one
else will be doing it, instead of me).
4. each cd has a license key associated with it.
please suggest me how i should do this database so its
not much of a hazzle and i dont have to pay some one
100 an hour so fix the problems lol.okay first i am going to list out the table designs and then I am going to provide some explanations
tblUser
username VARCHAR PRIMARY KEY
firstname VARCHAR
lastname VARCHAR
tblCD
cdname VARCHAR PRIMARY KEY
licensekey VARCHAR PRIMARY KEY
eula VARCHAR or TEXT
tblUserCD
username VARCHAR PRIMARY KEY
cdname VARCHAR PRIMARY KEY
licensekey VARCHAR PRIMARY KEY
so what's happening here...
well we have a table for users.. since we need a unique key i am using username... this could be the
name for someone uses to login to your system.
there is a different table that is list of all the cds. the primary key for this one is both the name and license together.
then there is a table that builds a relationship between the two.
in this scheme each user may download or whatnot each cd zero or one times. you can't put a second
download in because that will violate the primary key of tblUserCD
now let's look at some sample data
if the user table has this....
username----firstname----lastname
jsmith----------John----------Smith
aadams-------Audrey--------Adams
and the CD table has this
cdname----license----eula
Access-----12345----blah blah
Word--------12356----blah blah
Windows---99999---blah blah
then we do the following queries when John wants to get Access and Windows and Audrey wants to get Word and Access.
INSERT INTO tblUserCD(username,cdname,licensekey) VALUES('jsmith','Access','12345');
INSERT INTO tblUserCD(username,cdname,licensekey) VALUES('jsmith',Windows,'99999');
INSERT INTO tblUserCD(username,cdname,licensekey) VALUES('aadams','Word','12356');
INSERT INTO tblUserCD(username,cdname,licensekey) VALUES('aadams','Access','12345');
now if you want to get the list of program for any user (example John Smith) you just do this....
SELECT cdname FROM tblUserCD WHERE username='jsmith'
which gives you this
cdname
Access
Windows
there are several pluses to this design
1) as I alluded to earlier this design prevents you putting in the same cd and license key more than once for each user
2) You now can get a nice list of all the CD's easily.
SELECT cdname,licensekety FROM tblCD;
3) if you need to make any changes, like a persons username or more likely the cd stuff then it is easier to do so.. for example in your old design if you wanted to change Access to Access XP you would have to change EVERY table. in the new model you can do this in two queries.
UPDATE tblCD SET cdname='Access XP' WHERE cdname='Access' AND licensekey='12345';
UPDATE tblUserCD SET cdname='Access XP' WHERE cdname='Access' AND licensekey='12345';
(actually if you set up the keys properly and to cascade changes then you would just need the one query)
there is actually a theory for this sort of timesaving and error prevention work called normal form data.
for your further "enjoyment" may I suggest reading this http://databasejournal.com/sqletc/article.php/1443021
anyway hope this helps you out....
does this make sense to you?

Similar Messages

  • Insert missing rows from another table

    Hi
    I need to insert rows from another table if there is gaps in my transaction table. For each ärendenr there should be 5 Id status rows (1-5). Except for the fact that the inserted rows never should have higher IdStatus number then the highest value from
    the transaction for each Ärendenr. See my example below that illustrates my transaction table, Stages master and the desired result.
    Is there some t sql code that could handle this problem?
    Best regards
    Arne
    So far i have tried to solve this with the code below but it doesnt work.
    I have copied the transaction file information to the TempLogTransTimes
    and then insert into LogTransTimes
    IF OBJECT_ID('dbo.TempLogTransTimes', 'U') IS NOT NULL --Här raderas den tillfälliga tabellen
    DROP TABLE dbo.TempLogTransTimes;
    SELECT *
    INTO TempLogTransTimes
    FROM LogTransTimes
    DECLARE @TopÄrende INT
    WHILE EXISTS(SELECT * FROM TempLogTransTimes)
    BEGIN
    SET @TopÄrende = (SELECT TOP(1) Ärendenr FROM TempLogTransTimes ORDER BY Ärendenr)
    INSERT INTO LogTransTimes(Ärendenr, IdStatus, StatusNamn, SourceId)
    SELECT @TopÄrende, SM.IdStatus, SM.StatusNamn, 'Beräkning'
    FROM Statusmall SM
    FULL JOIN TempLogTransTimes LT ON SM.IdStatus = LT.IdStatus
    WHERE LT.IdStatus IS NULL
    DELETE TempLogTransTimes WHERE Ärendenr = @TopÄrende
    END
    Arne Olsson

    Hi Arne Olsson, try this..
    DECLARE @Transactions TABLE
    Id1 INT,
    IdStatus INT,
    StatusName VARCHAR(10)
    DECLARE @Stages TABLE
    IdStatus INT,
    StatusName VARCHAR(10)
    INSERT INTO @Transactions VALUES(1,1,'AA'), (1,3,'CC'), (1,5,'EE'), (2,1,'AA'), (2,3,'CC')
    INSERT INTO @Stages VALUES (1,'AA'), (2,'BB'), (3,'CC'), (4,'DD'), (5,'EE')
    ;WITH CTE AS(SELECT DISTINCT Id1 FROM @Transactions)
    SELECT Id1, IdStatus, StatusName FROM CTE, @Stages
    EXCEPT
    SELECT Id1, IdStatus, StatusName FROM @Transactions
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How could I insert the deleted row into another table within a trigger?

    Hi,
    How could I insert the deleted row into another table within a trigger? The destination table has the same columns as the source table. Since the statements are in the trigger, it is not allowed to query the source table named 'test'. Thanks! The trigger is as follows, uncompleted:
    CREATE TRIGGER delete_trigger
    AFTER DELETE
    ON test
    FOR EACH ROW
    BEGIN
    -- How could I insert the deleted row into another table
    END delete_trigger;
    Message was edited by:
    user569548

    Hi,
    I'm not sure what's wrong there.
    I read the oracle docs about ANALYZE and ALL_TAB_COLUMNS, and did the following:
    ANALYZE TABLE my_tab VALIDATE STRUCTURE; //went ok.
    SELECT column_name
    FROM all_tab_columns
    WHERE table_name = 'my_tab'; //but no rows selected?
    This topic might not be what this thread should be about. Here I posted a new thread:
    How to get colum names of the newly created table?
    Thanks.
    Message was edited by:
    user569548

  • Add rows from another table

    Hi ,
    I have a table with 20 records and 10 columns.I want to add columns from another table with out cross join.

    As others have said, you need to have some sort of join condition otherwise it is a cross join.
    SQL> ed
    Wrote file afiedt.buf
      1  with T1 as (select 'e' as c1, 2 as c2 from dual union all
      2              select 'd', 3 from dual)
      3      ,T2 as (select 'x' as c3, 5 as c4 from dual union all
      4              select 'y', 6 from dual union all
      5              select 'z', 2 from dual)
      6  --
      7  select T2.c3, T2.c4, T1.c1, T1.c2
      8  FROM (select c1, c2, row_number() over (order by c1) as rn from T1) T1
      9       FULL OUTER JOIN
    10       (select c3, c4, row_number() over (order by c3) as rn from T2) T2
    11*      ON (T1.rn = T2.rn)
    SQL> /
    C         C4 C         C2
    x          5 d          3
    y          6 e          2
    z          2
    SQL>This example assigns a row number to each row within each table and then joins using that row number.
    (I've assumed the row number should be generated based on the order of the first column of each table, but you can change that as required).
    What is the point of your requirement?

  • Update row in a table based on join on multiple rows in another table

    I am using SQL Server 2005. I have the following update query which is not working as desired.
    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. But the above update query is considering only one row from
    PlantAction table even though there are multiple rows that match with DocID and PlantID.
    DocHistory column is of type NVARCHAR(MAX).
    How do I fix my query to achieve what I want ? Thanks for the help.

    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    We do not use the old Sybase UPDATE..FROM.. syntax. Google it and learn how it does not work. We do not use the old Sybase CONVERT() string function. You are still writing 1950's COBOL with string dates instead of temeproal data types. 
    You also did not post DDL, so we have to guess about everything. Does your boss make you work without DDL? How do you do it? 
    >> For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction [singular name?] table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. <<
    Why? What does this new data element mean? This is like dividing Thursday by Red and expecting a reasonable answer. Now, non-SQL programmers who are still writing COBOL will violate the tiered architecture rule about doing display formatting in the database.
    If you will follow forum rules, we can help you. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Need help in SQL Query: Update a row in a table & insert the same row into another table

    I want to update a row in a table say Table A and the updated row should be inserted into another table say Table B. I need to do it in a single SQL query and i don't want to do it in PL/SQL with triggers. And i tried with MERGE statement but its working with this scenario. (Note: I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0).
    Thanks in Advance.

    Using Sven's code as an example, you could save the updated row in a sql plus variable. (also untested):
    SQL> var v_id number
    update tableA  
    set colB='ABC' 
    where colC='XYZ' 
    returning id into :v_id;
    insert into table A_History (ID, colA, colB, ColC)  
    select id, ColA, ColB, ColC  
    from tableA  
    where id = :v_id;   

  • For each row of a table call a pl/sql function

    Hi,
    i have a search form in adf like this:
    parameter1:___
    parameter2:____
    buttonSearch
    Table with results
    field1 field2 field3
    row1 ------ --------- -------
    row2 ------ --------- -------
    row3 ------ --------- -------
    The user inputs the parameters 1 and 2 then press buttonSearch and the query execute and returns rows 1 to 3.
    What i need is for each row call pl/sql function and passed the parameter 1 and 2 and field 1 to 3 (plsql function recives 5 parameters (parameter1, parameter2, field1 , field2 and field3) )
    my buttonSearch call a java class that execute ExecuteWithParamters method.
    I create the call to my plsql function on Application module class and then export as a java interface.
    So i have the function to use in the viewcontroller layer, but i don't know where to use it, and how to pass the paramters: the parameter 1 and 2 that user inputs and the row fields.....
    any ideas....
    thanks!!

    Hi,
    for this you need to call the PLSQL function upon table rendering, which means that you need a field in the table referencing a managed bean. In the managed bean you can use #{row} and resolve it using a ValueExpression. #{row} gives you access to the current rendered row (this is why you need to do it when the table renders) and thus allows you to call getAttribute(name) to get the values of field 1 - 3. The search field value you should get through the bindings reference (assuming the search form uses ADF). Then you create an operation binding for the executeWithParameters and call operationBindingName.getParamsMap().put(argname, argvalue); on it.
    Frank
    Ps.: I am concerned about the performance you get and wonder if it isn't possible to create a transient attribute that executes the function and displays the results. As I understand, the search parameters are only to filter the result set, which you still can do

  • Different values in a list box for each row of the table control...

    Dear Experts,
    Is it possible to populate different values for each row in a listbox inside a table control ?
    Example,
    Row 1 in the the table contains A, B & C
    Row 2 in the same table contains C, D & E
    If yes, How?
    yes i am using
      call function 'VRM_SET_VALUES'
        exporting
          id     = i_name
          values = i_list.
    Thank you .
    Message was edited by:
            Kokwei Wong
    Message was edited by:
            Kokwei Wong

    Hi Wong,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Updating a variable based on checking expiration date against now() in each row of a table

    I’m using Coldfusion 9,0,0,251028 on Windows 7 64-bit, with a Microsoft Access 97 database.
    I’m trying to create a query which loops through all the rows in a table and checks if the current date is later or earlier than the expiration date. 
    If the expiration date column is earlier than now(), it sets the column “is_current” to 0, which is a variable that controls whether or not a message displays on a different page(breakingnews.cfm). 
    The column that has the expiration date is “exp_dat” in the table “news”. The query I have so far is:
    <cfquery name="expire" datasource="#db#">
    update news
    set is_current = 0
    where exp_dat < now()
    </cfquery>
    What this ends up doing is filtering out the expired items correctly, but once a new row is inserted, the previous items(which haven’t expired yet)
    are still having the “is_current” column set to 0.
    The query is cfincluded on the page the messages are supposed to display on (breakingnews.cfm). 
    How can I get the query to loop over each row every time to check if the now() is earlier or later than “exp_dat” without setting all the other row’s “is_current” to 0?

    Two things:
    1 - A query will never affect rows you haven't told it to. Therefore if new rows have the is_current set to 0, then it's because you're either setting it so in your insert statement or you've set a default value on the column. Just make sure you set the column to 1 when you insert the new row.
    2 - Why are you doing this at all? Say you run your update query (which is relatively intensive) a millisecond before one expires, it'll still be shown on your page. Why are you not just doing "SELECT * FROM mytable WHERE expiration_date > now()"?
    Obviously use cfqueryparams, but that's just an example. It seems at the moment all you're doing is storing out-of-date data in a database and causing yourself a lot more work and overhead.

  • Hyperlink to each row(record)  of Table

    Hi All,
         My requirement is I am geting data using Adaper RFC call and displaying in a table.I want all the rows of the
    table has hyperlink,so that if i am selecting any row the details of that row should be show in either in another view or window.
    Thanks & Regards
    muna

    Hi
    Create an action for the table in the onLeadSelect event.
    Get the current node values.
    //get the cuttent table node's element value
    String id=wdContext.current<TableName>Element().get<Param>();
    // set the selected value to next view's element
    wdContext.current<nextView>Element().set<param>(id);
    //fire the outplug to next view
    Create a outboundplug to another view . and call the plug in this action.
    Kind Regards
    Mukesh

  • Update a column in each row in my table that have similar values in another column

    Hi All,
    I have a table in my DB.
    This table has values like this:
    Name
    Key
    a
    1
    a
    2
    a
    3
    a
    2
    b
    4
    b
    5
    b
    5
    I need to change the name to a different name for keys that are different. For same keys, the name must be same.
    Here I need to rename the 'a' to different name, but make sure that the 'a' that have 2 as the key have same name .
    Similarly, i've to rename the 'b' to different name , but make sure that the 'b' that have 5 as the key have the same name.
    How can I achieve this in sql? I dont know how to use cursor and complex queries, as i'm new to SQL.
    Please help
    Thanks,
    Vid
    Vidya Suryanarayana

    Ok. The output should be like this:
    Note here, that the names with same keys have same names.
    name
    key
    a1
    1
    a2
    2
    a3
    3
    a2
    2
    b1
    4
    b2
    5
    b2
    5
    Thanks,
    Vid
    Vidya Suryanarayana

  • Select count(*) for each row of a table

    Hello All,
    Following query gives a statistics for each user (how many items he owns, home many tickets authored, how many objects he is subscribed to etc...)
    select auser.userid,
    (select count(*) from item where owner like '%' || auser.id || '%') ITEM_OWNER_CNT,
    (select count(*) from tkt where originator = auser.id) TKT_ORIGINATE_CNT,
    (select count(*) from tkt where assigned_to = auser.id) TKT_QA_CNT,
    (select count(*) from tkt where create_user = auser.id) TKT_AUTHOR_CNT,
    (select count(*) from subscriptions where subscriber_id = auser.id) SUBSCRIPTION_CNT
    from
    user auser
    I was not happy with the performance of this query, so I tried the same using group by. The performance was even worse.
    Is there any other option for me to try? Please advice.
    Thanks,
    Sathish

    Hi, Sathish,
    As SBH said, a lot depends on your data. Please post some sample data (CREATE TABLE adn INSERT statemetns) for all tables, and the results you want from that data. Describe and give examples of any relationships that are not one-to-one..
    You probably want to do joings, like SBH suggested, rather than scalar sub-queries.
    The connection between the auser and item tables
    (select count(*) from item where owner like '%' || auser.id || '%') ITEM_OWNER_CNT,is very suspicious. Perhaps the item table is poorly designed, and the query would be faster if that table were changed. Is changing the design of the item table an option?
    You should be able to get all the information from the tkt table in one pass. It looks like you need to unpivot the data, so instead of one row per ticket (with 3 different people connected to it), there are 3 rows per ticket, each with only 1 person referenced. This is not necessarily a bad table design. Unpivoting, even more than most other things, depends on your database version, so you'll have to tell what version of Oracle you're using.

  • How to change VO's dynamically for a item for each row in advanced table?

    Hi All,
    We had a requirement to filter the employees based on the search criteria table. I am using advanced table for developing search criteria.
    In that table I am having three columns. Operator (messagechoice), Criteria Type (messagechoice), and Criteria value (messageLovInput). Also 'Add Another Row' functionality is available.
    My requirement is:
    First Row:(Initial Row)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    Second Row: (when the user selects Add Another Row button)
    When the user selects a value in Criteria Type, only the values that are relevant to that type should be displayed in the Criteria Value.
    The problem I am facing here is, the Criteria Value column is pointing to only one VO at design time. But wee need to change that VO dynamically without disturbing other rows depending on the Criteria Type value.
    Is it possible to do so?
    Note: User can add n number of conditions as he want.
    Can anyone help how to acheive this.
    Regards,
    Sundeep.

    Check Dynamic Poplist section under Standard Web Widgets in Chapter 4 of OA Framework Developers guide.

  • Turning parts of a string into rows in another table

    I need to extract unit codes that are stored in a string into rows in a new table as below
    From:
    Set_cd         sequence_number         rule_text
    KP106A         15432         {1234,4567,8910,1567}
    To:
    Set_cd         sequence_number         unit
    KP106A         15432         1234
    KP106A         15432         4567
    KP106A         15432         8910
    KP106A         15432         1567
    The strings will be of varying lengths but the layout will always be the same with the curley brackets and commas.
    Any ideas please?
    Thanx
    Rob.
    Edited by: Rob Mc on Sep 23, 2009 2:38 PM

    Something like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>
    satyaki>with ta_tab
      2  as
      3    (
      4      select 'KP106A' set_cd, 15432 sequence_number, '{1234,4567,8910,1567}' rule_text from dual
      5    )
      6  select set_cd,
      7         sequence_number,
      8         REGEXP_SUBSTR (replace(replace(rule_text,'{',''),'}',''), '[^,]+', 1, level) rule_part
      9  from ta_tab
    10  connect by level <= (
    11                         select length(regexp_replace(replace(replace(rule_text,'{',''),'}',''),'[^,]*'))+1
    12                        from ta_tab
    13                      );
    SET_CD SEQUENCE_NUMBER RULE_PART
    KP106A           15432 1234
    KP106A           15432 4567
    KP106A           15432 8910
    KP106A           15432 1567
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>Regards.
    Satyaki De.

Maybe you are looking for

  • In eRecruitment - Application wizard F4 Values are not getting displayed.

    Hi, I have created a seperate process template for MBA candidates (external) as per client requirement and in the Vacancy req.when the process template is selected the application wizard is getting displayed ( which has been defined according to new

  • How can I recover MacBook Pro disk space

    My MacBook Pro is over ten years old... works fine, but I can't access much of the disk space on the original hard drive. I should have 100 Gig of space but only about 5 gigs is available despite the fact that Appications show 13 Gigs used and oly 7

  • Need to find out link between reservation created and actual issue of mater

    Hi I am going to develop a Y report for client, where they want to see the reservation details created in MB21 and the actual goods issue against the reservation (some more details also). Now from the table RESB I got the details of reservation and a

  • PGP software for XI/PI

    Hi, We are trying evaluate the best command line PGP encryption software that we may be able to call from within PI 7.1I. Any recommendations regarding this are greatly appreciated. Thanks Teja

  • Hyperion Reports - HFMCurrency function error when expanding rows

    <p>Im using Hyperion Reports 7.2.On the report in the production environment, Ihave a cell containing a HFMCurrency function with a conditionalformatting:</p><p> </p><p>    I<b>n<<HFMCurrency("Grid1", 5, A, 1)>>Thousands</b></p><p> </p><p>    Conditi