a field that contains a list of sizes or a table?

Iain was kind enough to advise on the use of a table instead of a field containing a list of 6 comma separated elements.

I did, but if I can throw new slope on why I prefer to use a field?

JEWELRY WEB PAGE

Select * goods where merchandise.category = 'jewels '.

THE PRODUCT DETAILS PAGE

When a user clicks on items by top of the page, the hyperlink sends the unique merchandise_ID in the link, a page of details of the product using a query:

Select * from goods where merchandise.merchandise_ID = URL.merch_ID'

This gem is available in different sizes. These sizes are in a list separated by commas in a field called "sizes" in the table of the goods. I had been advised to move to a table instead. If I moved to a separate table sizes, I should add a LEFT JOIN to include the size chart or execute a separate query on the size chart (where sizes.merchandise_ID = URL.merch_ID) - which is a drop in performance.

What should I do with the sizes is produced a menu drop down, the user can choose to - so isn't better I just put sizes into one field, separated by commas? Then use Coldfusions built-in functions to analyze the list in a drop-down list?

A thought experiment that might convince you.

To compare these two data patterns.

CSV

Agenda Size
Shirt Small, medium, large
Coat Medium, small, large
Pants Small, large, medium
Shoes Large, small, medium

STANDARDIZED

Size chart

Key Size
1 Small
2 Medium
3 Large

Article - size join Table

ItemKey SizeKey
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
4 1
4 2
4 3

Roll of the order of the day

Point of
Key
1 Shirt
2 Coat
3 Pants
4 Shoes

Imagine now these two systems extended to several thousands of items.

Then imaging that some type of marketing has decided that 'Big' was an ugly description for this size, so they want to change to "Husky" and | or they want to change the size of the 'Small' to 'small '.

In the standard version, you do one or two update table of sizes.  I don't even want to try to describe the ugly update that you try and create that involves looping and string manipulation to try to update all the records in the CSV version.

Tags: ColdFusion

Similar Questions

  • New additional break line when a record has a field that contains characters of new line

    Hello

    I have problems to queue a file without blank lines. I noticed that the problem is THAT SQLPLUS is extra line breaks just after returning from a recording that has the characters of new line in. See screenshot below:

    sqlplus_newline.png

    Note that there is an extra line break after recording that says "multiple multiple line1 & line2".

    Is there a parameter of SQLPLUS that I can use to get rid of the extra line? If not, what are the other options that I can use to get rid of him.

    I can't really use sed UNIX because there could be a field that contains a blank line.

    Note also that I need the data remains the same, in other words, I need to keep the new line characters in the column

    Please notify.

    Thanks in advance

    SQL Plus adds a record separator (default empty line) when the column value is wrapped.

    You can change the default value to observe behavior.

    Here are the test data

    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
    
             4 line5
    

    Now, change us the record separator to dot

    SQL> set recsep wrapped
    SQL> set recsepchar "."
    SQL>
    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
    .....................................................................
             4 line5
    

    And if you do not want a record separator you can just disable

    SQL> set recsep off
    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
             4 line5
    
  • find fields that contains a space

    I'm trying to find a field that contains a space in the data. I have a user_login column where all the user id is stored. User IDs are normally "SMITHJ', 'DOEJ' etc... but I wanted to see if we got one with a space. what the script would look like this get?

    Thank you

    example of

    user_login PK
    1 SMITHJ
    2 DOEJ
    3 OF THE CRUZJ

    Hello
    Welcome to the forum

    SQL> with t as
      2  (
      3    select 1 pk,  'SMITHJ' user_login from dual union all
      4    select 2, 'DOEJ' from dual union all
      5    select 3, 'DE LA CRUZJ' from dual
      6  )
      7  --
      8  select * from t
      9  where instr(user_login, ' ') > 0
     10  /
    
            PK USER_LOGIN
    ---------- -----------
             3 DE LA CRUZJ
    

    do a google on string handling Oracle and especially Instr.

  • How to clear the inputText field that contains control data to the Web Service data?

    Hello

    I use JDeveloper 12.1.3 and 2.2 of the MAF.

    I created a Web Service data control that offers the feature of the View object on the server side.

    To use this, I created a taskflow with two pages of amx. The first page of the amx contains a button to call the other.

    The second page of the amx contains fields inputText with the values of the parameters of creation out of the data control functions.

    If I call the second page of the amx inputText fields are empty. On the page, I have a button to call the function of creation itself. By pressing the key the inputText field values will be sent to the server. Everything works great! Pressing on the button also calls for action to return to the first page of amx in the taskflow.

    Now, if a next time I call the second page the inputText fields contain the values from the last call.

    I want the inputText empty fields each time. How can I achieve this?

    Thanks in advance.

    Martin

    You can ask this question in the forum of the MAF

    Oracle Mobile Application Framework

  • Subtract 2 (varchar2) fields that contain time items

    Hello

    I have 2 varchar2 columns, have all two fields contained in this title time (07:30) and (06:00) and I would subtract the two columns. I tried Trunc / to_date / to_char in different orders before the column labels but I either get a 'not one month valid' error or a "number not valid" error. My final output must be decimal time.

    for example start at 08:00 and 16:00 arrival would be the end result is therefore 8 8 hours would be the result if arrival at 15:30, then 7.5 would be output.

    any help would be appreciated... Thanks in advance.

    Ash

    Select

    A.CONTRSTARTTIME - A. CONTRFINISHTIME AS CONTR_HRS

    OF A datalab.timesheet;

    You're wrong.  If they are the varchar2 data type when they contain no time, they contain strings.  This may sound pedantic, but it's an important thing to remember.  Oracle treats strings as strings, nothing more nothing less.  If you want to date/time-related features, then you should be storing your data in an appropriate such as DATE or TIMESTAMP data type even if you want only the time part.

    Thus, the first thing you need to do is convert your strings to an appropriate data type, and then you can use built-in brilliant manipulations date Oracle...

    SQL > ed
    A written file afiedt.buf

    1 with t (t1, t2) as long as)
    2 Select ' 06:30 ', ' 07:30 ' of all the double union
    3 select ' 08:00 ', 16:00 ' Union double all the
    4 Select ' 09:00 ', 15:30 ' of the double
    5        )
    6  --
    7. end of test data
    8  --
    9 select t1, t2
    10, (to_date(t2,'HH24:MI')-to_date(t1,'HH24:MI')) * 24 comme diff_hrs)
    11 * t
    SQL > /.
    T1 T2 DIFF_HRS
    ----- ----- ----------
    06:30 07:30 1
    08:00 16:00 8
    09:00 15:30 6.5

    3 selected lines.

  • Automatic row height resize on text that contains a floating field

    Hi all

    Hope someone can help out me

    I'll explain my scenario with an example simplified to keep things to-the-point:

    I have a Table with 2 rows and 1 columns. The Row1 cell is text (NOT a text field) that contains a floating field. I have a button on my form that populates the field floating with a string. If the string value that is inserted into the floating field is very long, the text overflows outside of the cell.

    Screenie.png

    It seems that the height of the table row adjusted not dynamically to changes in the length of the text in the cell.

    Any ideas?

    Thank you

    Another way is to click on the cell and then click View > Source XML. You will see something like has highlighted. Remove the attribute of height h = "10mm" completely.

    Kyle

  • Hide the form field based on the name that contains some characters

    I think it's easy.

    We're looking for help with a script that allows you to hide all instances of text fields that contain a certain value. We have a running feature that applies to the same text fields, however, each text field should be labeled with a number at the end also running with this is a custom save button that flattens the page and hides some elements before the record on. The hide feature works pretty simple with "this.getField... = display.hidden; The problem is we do not want to repeat this step for each unique instance of fields that share the same name.

    We must look to each text box that has a similar title, so for example if we had several fields like that...  "my-text-field-01", "my-text-field-02" and "my-text-field-03" we want the script to find the "my-text field" name and hide all instances of that. ' "."

    Hope this makes sense, I'm sorry, our programming skills are still amateur. Thanks in advance for any help.

    You can do if you use a hierarchical naming convention. For example, instead of using something like: my-text - field.1, my-text - field.2, etc..

    You can then hide as well as:

    // Hide all of the "my-text-field" fields
    getField("my-text-field").display = display.hidden;
    
  • linking two fields and fill in the two field based on the list drop-down selection box 1

    I work for a small social service agency VERY small non-profit and I try to get our paperwork until the twentieth century. I hope someone here can help me. I have adobe acrobat, but not of other adobe products. I converted our word document that we use for client notes in fillable pdf format and so far everyone is excited to try it. I have a huge problem that I can't understand. I have a customer named created drop-down list box that contains a list of 300 customers. Box 2 is named customer ID and will contain a unique identification code assigned to each customer.

    For example:

    CUSTOMER ID customer JANE DOE 12345678

    So here is my question how can I ensure that when Unetelle is selected 12345678 is already filled in the second field?

    I fill the drop-down list with the names of customer and then enter the customer ID as the value of exports. Note You must have a unique name for each client.

    If your customer ID starts at zero, then you must use a custom JavaScript, so you can keep the zero non significant.

    For the customer ID field, you can use the following custom JavaScript code:

    Event.Value = this.getField("DropBoxFieldName').valueAsString;

    You will need to change DropBoxFieldName name of the drop-down list.

    You will need a mechanism for updating the new customer form and IDs names.

  • cannot record copy that contains "#" using branching

    Hello everyone - I use APEX 4.1 and have implemented a "Record copy" button that copies the selected fields from the folder to the same page to create a new record. This is done by using branching (had the idea of this forum!) and in defining the elements (for example, P2_NAME, P2_ADDRESS1, P2_ADDRESS2, etc.) with these values (by example, & P2_NAME, & P2_ADDRESS1., & P2_ADDRESS2, etc...)

    It has worked perfectly in other APEX applications - up to present. The problem is that the new database contains several fields that contain the character ' # '. When the character ' # ' is detected during the copy process, all data after the # is not copied (but all the data before the # are copied OK).

    Is there a way to get around this? Remove the characters ' # ' is not an option, because it is part of many manufacturer part numbers that follow us.

    Any guidance is appreciated. Thanks in advance for your help - Gail

    Hi Gail, so if they are database columns, I think you must have a DML search process in there to fill in as in page 30 you have to edit the line.
    Fix?

    If this is the case, then I think loaded the items in the collection, then your DML process happens and as 'THIS' line does not exist, the page elements get eliminated from the DML extraction.

    Change to the Source used to load items ONLY when NULL would correct that. You can, of course, that the link from Page 30 to 31 to change also clears the cache on page 31.

    So to change it:
    -Link to page 31 of 30 and clear the cache on page 31.
    -Pass the ID of your line on page 30 to P31_ID?
    -the collection does not exist so nothing happens in the header after process
    -the DML process runs and support items because they are null, and row data exist.
    -make changes, the changes apply
    OR use the copy button, that:
    -Submit page
    -Process captures the fields necessary for collection
    -Creates a branch to 31, clear the page cache
    -Runs in Process, research collection, load the page elements.
    -DML process works but does not affect the page elements because the Source is used only when the page element is null
    -Form appear with elements of pages loaded.

    FWIW, assuming that when you check in a copy and the elements of the page is deleted, your key (P31_ID?) column is also set to NULL, you could put a condition on the process DML to run only if the element of the page P31_ID is NOT NULL, which would cause the LMD to be ignored process and elements of the page to keep their value from the loading of the collection.

    Published by: Bob37 on August 15, 2012 16:39

  • The research of Web applications with fields of the Data Source that contains multiple values

    I have a Web application with a field that allows multiple values to be recorded similar to the list box. I need limit the allowed values for a large, over the list of the values currently stored in another Web application as a data source. I can not apply to the type of Data Source field that allows only single value selection. I also need to be able to use the search form Web App to search for items containing 1 OR more of the values in this field (a type of list control field search functionality). Here's what I tried to field types:

    • Text (String) or text (multi-line) field type - By saving a list of values separated by commas (outputs in the same way this list box) to an entry of text or textarea, the search only logic search exact string (including commas) and does not analyze individual values.
    • Type of list (checkbox) field - it allows me to search for multiple values using the logic of the GOLD, but the web application stores only the values that have been entered as an option in the field settings real web app. I tried to use a checkbox with minimal or empty options list, hoping that some values I sent more separate by a comma value chain would be still stored, but because the values come from my Web App data source and not stored with the field options list, they were not saved.

    Someone at - he found a way to do it?

    My other question is how can I use a multivalued field to similar as described above but return results containing the elements with ALL the values of this field (AND logic).

    Can someone enlighten me to the inner workings of the search BC logic web app?

    You don't need to use the predefined boxes or types of entries. Everything you can represent as a string (such as the values separated by commas in your example) can be saved in any field of webapp. The types of fields defined in the Web application are only used to translate internal representation (all channels) to the various user-friendly interpretations (checkboxes, radios, dates, links, etc.)

  • a bug with the structure that contains bit fields?

    using CVI 8.5. I tried to set up a structure that contains bit fields. Although the structure compiles, I encounter strange behavior when you access individual fields, while the value of the overall structure seems ok. Here is the structure:

    typedef struct
    {
    Union
    {
    struct
    {
    unsigned int Flag1: 1;
    unsigned int dummy: 3;
    unsigned int Flag2: 4;
    unsigned int Indicateur3: 4;
    unsigned int dummy2: 4;
    };
    unsigned short;
    } flags;
    } flagset;

    When you set the Member 'all' to a value so that one or more indicators, but not all, are false, I still read the individual like real flags, until all flags are set to false.

    I missed something? This definition is really legal?

    Please find attached a file showing the problem.

    The same issue is at stake with or without the ternary operator. It turns out the problem was not specifically with printf, but rather a bug in the compiler that is related to the evaluation of the members of anonymous internal structures. If several internal anonymous struct members are evaluated before the compiler actually do anything with the result - which is the case when passing arguments to a function-, so they will all be evaluates the value that was evaluated last.

    A. Mert

    National Instruments

  • In disk management, it shows only a single hard drive and it's C, but it lists the size than what my old drive was that I took out

    I got a new hard drive in my computer and the old a subscribed.  I then had to reinstall Windows XP Pro.  In disk management, it shows only a single hard drive and it's C, but it lists the size than what my old drive was that I took out.  The new shows of unallocated hard disk without a drive letter and has a black bar above it. How do I show my new hard drive that is 1 TB instead of one that was a 250 GB is not yet in my computer.

    Hi Reta,

    ·         The drive appears like 250 GB even if it's a terabyte?

    ·         Is the remaining 750Go showing as unallocated disk space?

    If this is the case, you can refer to this article on how to use disk management in Windows XP:

    How to use disk management to configure dynamic disks in Windows XP

    You can follow the directions to extend a Simple Volume so that your 250 GB turns into a single terabyte.

  • Printing of documents that contain the letter and legal-size pages - Laserjet 600 M602

    We have a printer Laserjet 600 M602, that does not automatically select a tray to print every time someone tries to print a document that contains the letter so many pages of legal size.  The default printer for the Tray 1 (Manual power) and the user will have to walk over to the printer and the printer to select the correct tray.  I went in the printers settings via the web interface and I set the tray settings to the following: Tray 1 - any Type of Size/Any, bin 2 - letter/plain, plateau 3 - legal/Plain and it still does not print correctly.  Unfortunately for the printer settings, it was on that I'm comfortable doing.  I read the print driver may have changed, but we use the driver included with the disc and I guess that it would be sufficient that this driver.  Does anyone know of some setting that I might be able to change the printer or if it is indeed a print driver problem?  Any comments would be appreciated.

    Thank you

    I was able to receive help this morning from HP support.  He turns out, there were two things that I needed to change.  The first is that when printing from a pdf file, there is an option in the print area for "Choose paper according to the size of PDF page source" and the second thing, it was with the printer printing preferences.  In the printing preferences, under the "Printing shortcuts" tab, the paper Type has been set to Prepunched.  We changed this Unspecified.  After making these two changes, the user is able to print correctly in the printer.

  • How can I add white space between areas that contain text fields? I use Adobe Acrobat Pro DC 2015.  I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these text fields to be developed and not

    How can I add white space between areas that contain text fields?

    I use Adobe Acrobat Pro DC 2015.

    I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these areas to be developed and do not overlap the text and the text below fields.

    For example:

    1. 1.

    Progress/strategies:

    1. 2.

    Progress/strategies:

    1. 3.

    Progress/strategies:

    1. 4.

    Progress/strategies:

    The space between each 'progress/strategies' increasing needs. A text field is under each of them. If it's a Word doc, I could just press on enter. What is the best way to do this with Adobe Acrobat Pro DC?

    There is no easy way to do it. You need to move the text fields more apart and if there are static elements, then you will need to use the tool edit text & Images to move them, separately.

  • Creating a page of my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Hey, I would like to create a page on my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Another thing I need to allow users must be able to upload their own graphics to the pre-assigned fields. Thank you please advise me on how I would go to this topic.

    Nothing to do with the Muse. You need a system dynamic as Joomla, Wordpress, Drupal and so on. Otherwise, there is no way to store your information.

    Mylenium

Maybe you are looking for

  • NEX 5N sweep panorama does not

    I have a brand new 5N (10 October 2012) NEX of Adorama with 18-55 mm lens.I used only the focal length of 18mm for sweep pano. I tried more than 100 panoramas of sweeping and only 3 came out. 3 / 100 attempts. I am a very experienced photographer. Th

  • Mail server integrated with FTP

    I am looking for a solution to the problem of large attachments that are underway through Microsoft Exchange Server 2003. I suppose a solution to the problem is to have a mail server outgoing specially configured which detaches attachments from any g

  • Unable to do Windows Update - error code: 800700 1

    Impossible updates updates window for some time.   Was not too concerned until I wanted to load a software application when it refused to load indicated he could not because of a damaged component and set the 1 800700 error code Is there any solution

  • Replacing OneCare

    I use Windows Live OneCare by Qwest and need to change programs since it is to be abandoned.  I know there is really nothing there that replaces OneCare and I studied the paintings of other options.  All I really need to know is how to protect my com

  • Opening of the session of the Windows for POP3 incoming/outgoing security

    I am a Qwest customer, using the windows email. Can't send or receive emails. I get a message of Windows e-mail asking me to connect to POP3, what I do, and then I get the following error message: Account: 'POP3', server: 'pop.centurylink.net', Proto