Need help to write a Boolean function

Hello

I would appreciate you help for writing a Boolean function!


Below are the possible expressions:

${brand.name}

${model.name}

${franchise.name}

${supercategory.name}

${category.name}


VALIDATE any combination of the expressions above (upper and lower case) in a string.


For example:

«It's the best brand of ${brand.name} template category, ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category.»


If one of the above expressions is incorrect in the string, the function returns error.

I'd appreciate your kind help!


Thanks in advance!

Mustak

Maybe (watching scary)

with

data in the form of

(select txt "this is the best brand of ${brand.name} of model category ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category".)

of the double

Union of all the

Select txt ' is the best brand of ${Brand.name} of model category ${Modl.name} franchise ${Franchise.name} supercategory $ {Supercategoory.name} and ${Category.name} category.

of the double

)

Select sys_connect_by_path (case when instr (lower (txt),' ${' | level case when 1 then 'brand'}))

When 2 then 'model '.

When 3 then 'franchise '.

When 4 then 'supercategory.

else 'category.

end: '. (name}') > 0

then '1'

else ' 0'

end,' ') boolean,.

txt

from the data

where connect_by_isleaf = 1

connect by level<=>

and prior txt = txt

and prior sys_guid() is not null

BOOLEAN TXT
1 0 1 0 1 It's the best brand of ${Brand.name} template category, ${Modl.name} franchise ${Franchise.name} supercategory $ {Supercategoory.name} and ${Category.name} category.
1 1 1 1 1 It's the best brand of ${brand.name} template category, ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category.

Concerning

Etbin

Tags: Database

Similar Questions

  • I need help to write a script that detects the first instance of a paragraph style and then change

    I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style.  I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thank you!

    Hello

    then try this with your active doc:

    ....................

    myDoc var = app.activeDocument;

    mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle

    var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle

    var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mStyle;

    for (var k = 0; k)< mframes.length;="">

    {

    currFound = mFrames [k] .findText ();

    If (currFound.length > 0)

    currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;

    }

    app.findTextPreferences = null;

    ................

    Rgds

  • Need help to write a sub query

    Our environment - Oracle 10 g

    Hi all
    Need help to write a sub query to reach him here are examples of data using which iam trying to replace the value column in the table based on two other columns in the same table

    Examples of data

    ClaimNo flag LineNo Procedurecode
    100 01 N MN4567
    100 02 Y 7863
    100 03 N MN8976
    100 04 Y 9000
    101 01 Y 8954
    101 02 N MN6754
    101 03 N MN7654
    101 04 Y 8976
    102 01 Y 1234
    102 02 Y 2345
    102 03 Y 3456
    102 03 Y 4567

    Each column of ClaimNo has several rows of data. But if column procedurecode for a claimNo starts with MN then all values associated with the claimno for the flag column should replace N

    If the data must become like below

    ClaimNo flag LineNo Procedurecode
    100 01 N MN4567
    100 02 N 7863
    100 03 N MN8976
    100 04 N 9000
    101 01 N 8954
    101 02 N MN6754
    101 03 N MN7654
    101 04 N 8976
    102 01 Y 1234
    102 02 Y 2345
    102 03 Y 3456
    102 03 Y 4567


    Thank you

    See the example:

    with t as (
                  select 100 ClaimNo, '01' LineNo, 'N' Flag, 'MN4567' Procedurecode from dual
        union all select 100, '02', 'Y', '7863' from dual
        union all select 100, '03', 'N', 'MN8976' from dual
        union all select 100, '04', 'Y', '9000' from dual
        union all select 101, '01', 'Y', '8954' from dual
        union all select 101, '02', 'N', 'MN6754' from dual
        union all select 101, '03', 'N', 'MN7654' from dual
        union all select 101, '04', 'Y', '8976' from dual
        union all select 102, '01', 'Y', '1234' from dual
        union all select 102, '02', 'Y', '2345' from dual
        union all select 102, '03', 'Y', '3456' from dual
        union all select 102, '03', 'Y', '4567' from dual
    )
    select
        claimno,
        lineno,
        flag,
        case
          when count(decode(substr(procedurecode,1,2),'MN',1)) over(partition by claimno)>0
            then 'N'
          else flag
        end new_flag,
        procedurecode
    from t
    

    Kind regards
    Sayan M.

  • Satellite A300-1EG: need help to write module fan control ACPI NHC

    Hello

    I need assistance with writing module NHC allowing me to adjust the speed of the fan always at max level.
    The reason why a desire to do this is high time on the CPU and the GPU.

    I find guide to do something like that, but it of for laptops asus and records of fans and time does not match.

    http://help.notebookhardwarecontrol.NET/ACPI/HOWTO/nhcAsusM2N/index.htm

    My laptop is Toshiba A300-1EG

    Thanks for the help and sorry for my bad English

    I think you're going in the wrong direction. As you probably all know it works automatically and Toshiba made laptop computers to function at an optimal level. If you have problems with this older model A300 you should take standard steps and clean it. It can be done on a career path.
    Laptop can be disassembled, cleaned. CPU fat can also be renewed.

    After doing all this laptop will be clean, laptop can catch its breath and all hardware components can be properly cooled. There is therefore no need to change anything, especially values not original in the BIOS or anything related to the GPU.

    I have the same machine. It works still fairly quiet, but one day, I want to do the same thing.

  • Need help to write a program for the acquisition of signals.

    Hello

    I need to write a program that will do the following:

    1 acquire two signals simulated,

    2. make 10 averages the signal,

    3. filter the signal,

    4. display the signal in its raw form and the power spectrum (fft),

    5. save the data using writing to the file vi

    I tried it for awhile, but there's always something does not... None of the experts LabVIEW here can help me?

    Thank you 1 million.

    -Deet

    No one here is going to do your homework for you. Please join what you have written so far and explain the specific problem that you are experiencing.

  • need help to write sql code

    Hi all

    I need to write a sql that retrieves data from the status table and check for this time in the ESHIFT table if the flag was or not. If is there, then it will keep the record as it is Furthermore, there

    did not understand at the time the flag was N suppose ESHIFT table has one record where you N 13:00:01-13:30 then the status register which is 13:00-13:59 min 59 s, we should get 13:00 - 13: records of 00:00 1 and 2 of 13:30:01-13:59 min 59 s

    create table ESHIFT (From_date date, date, to_date, flag varchar2 (2));

    insert into ESHIFT values (' 1 February 12 09:00 ", February 1, 12 13:20 ', 'Y');

    insert into ESHIFT values (' 1 February 12 13:20:01 ", 1 February 12 13:30 ',' don't);

    insert into ESHIFT values (' 1 February 12 13:30:01 ", February 1, 12 16:00 ', 'Y');

    SELECT * from eshift;

    create table status (date of From_date, to_date date, status number);

    insert into values of status (1 February 12 11:00 ', February 1, 12 12:00 ', 1);

    insert into values of status (1 February 12 12:00:01 ', February 1, 12 12:20 ', 2);

    insert into status values ("1 February 12 12:20:01", 1 February 12 12:59:59 ', 1);

    insert into status values ("1 February 12 13:00", February 1, 12 13:59:59 ', 1);

    insert into status values ("1 February 12 14:00", February 1, 12 14:59:59 ', 2);

    SELECT * STATUS;

    In the case above should get sql

    1 FEBRUARY 12 11:00 1ST FEBRUARY 12 12:00 1

    FEBRUARY 1ST, 12 12:00 1ST FEBRUARY 12 12:20 2

    FEBRUARY 1ST, 12 12:20:01, 1 FEBRUARY 12 12:59:59 1

    FEBRUARY 1ST, 12 13:00 1ST FEBRUARY 12 13:20 1

    FEBRUARY 1ST, 12 13:30 1 FEBRUARY 12 13:59:59 1

    FEBRUARY 1ST, 12 14:00 1 FEBRUARY 12 14:59:59 2

    It will be really great if someone can help me how I can get the desired result.

    Thank you very much in advance.

    Please provide instructions creating table and data. It makes it so much easier to answer.

    I think you want:

    Select (s.from_date, e.from_date) greatest from_date, less (s.to_date, e.to_date) to_date, s.status

    s status e eshift join on s.from_date < e.to_date="" and="" s.to_date=""> e.from_date and e.flag = 'Y '.

    order by 1

  • Need help to write a script that opens files, removes layers and sous-calques

    Hey all,.

    I'm a noob to the community of script, and what I try to do is file edit commands that share the same names of layers and sublayers. I have a few questions that would be incredibly useful if I could have answered.

    I'm not sure how to define a script too call out of the layers that have been created without script. I need to create a variable for the existing layers and leave the script to know what their names are in the files?

    For example, I have three files which have each layer named 'cutlayer', 'trimlayer', 'fold' and 'work '. I need to write a script that opens three files, deletes the layer 'fold' of each file, and then move the layer "trimlayer" in his own sublayer in 'work' (the base layer can be on the top so reorganization sublayers is not necessary to worry about something). I do not understand how to write the script because I couldn't find examples in the documentation for the script provided on the adobe website which has worked with existing files.

    It's my shot at what I'm trying to do, with English fill in the blanks of what I do not know how to script. If anyone can help me understand this point, I would really appreciate it!

    app.documents.openDlg (prompt, filter, MultiSelect);  the user opens the associated files

    If (documents.length > 0) //run the script through each document individually

    {

    sourceDoc = activeDocument;

    delete the "fold" sourceDoc layer

    move the "trimlayer" in the layer "work."

    remove the underlayment 'path' of layer "work."

    Run the script through each document

    Save the new file name folder in the new parallel to the current folder on the hard disk

    Go out and spend in each document until there is no more

    }

    create new document

    Place documents published in different layers in the new document, with a distance between them, optimize the space on a 51 "x 51" work plan, using as little of the artboard as possible. "

    All comments are things basically, I do not know how and am trying to figure out how to do, so if anyone has a second to explain some of these things, I would really appreciate it!

    Thanks again!

    I know it of very frustrating when his apprenticeship and things don't go as planned, but understand that it is quite confusing as it is and do not add more confusion to the mix by using other tools than those provided. I mean JSLint, it might be useful with GENERAL javascript syntax, but Adobe's Javascript implementation is another animal, or another language, always JavaScript, but intended to be run by its own engine. JSLint has no idea what "layers", or "pathItems" are, it will trigger errors when he sees the objects, it does not recognize.

    .. .in learning... not to take baby, write a single line of code and run... If it works, write another line of code

    Try this version (always in the ESTK),'re missing you a few "++", and you do not change "documents" with "docs" in a certain place

    var docs = File.openDialog("Select Files to Open", "*.ai", true);
    
    var idx = 0;
    
    for (idx = 0; idx < docs.length; ++idx) {
    
        var doc = app.open(docs[idx]);
    
        var myCounter = 0;
    
        for (myCounter = 0; myCounter < doc.layers.length; myCounter++) {
    
            doc.layers[myCounter].locked = false;
    
        }
    
        doc.layers.getByName('Crease').remove();
    
        doc.layers.getByName('Regmark').remove();
    
        doc.layers.getByName('Artwork').pathItems[0].remove();
    
        doc.layers.getByName('Through Cut').hasSelectedArtwork = true;   
    
        doc.layers.getByName('Through Cut').pathItems[0].strokeColor = doc.swatches.getByName("Black").color;   
    
        doc.layers.getByName('Through Cut').move(doc.layers.getByName('Artwork'), ElementPlacement.INSIDE);
    
    }
    
  • AS3: need help to solve a problam function

    Hey, I need your help once again.

    I have a wheelchair clip that I want to just move left and right in a loop, I have this code:

    var wheelChairRightTimer:Timer = new Timer (120,24);
    var wheelChairLeftTimer:Timer = new Timer (120,24);

    wheelChairRightTimer.addEventListener (TimerEvent.TIMER, moveRight);
    wheelChairRightTimer.addEventListener (TimerEvent.TIMER_COMPLETE, startMoveLeft);
    wheelChairLeftTimer.addEventListener (TimerEvent.TIMER, moveLeft);
    wheelChairLeftTimer.addEventListener (TimerEvent.TIMER_COMPLETE, startMoveRight);

    wheelChairRightTimer.start ();

    function moveRight(event:TimerEvent):void {}
    wheelChair.x = wheelChair.x + 20;
    }

    function moveLeft(event:TimerEvent):void {}
    wheelChair.x = wheelChair.x - 20;
    }

    function startMoveLeft(event:TimerEvent):void {}
    wheelChairLeftTimer.start ();
    }

    function startMoveRight(event:TimerEvent):void {}
    wheelChairRightTimer.start ();
    }

    The problam is with the last function "startMoveRight". Without this feature the wheelchair goes right and left as he should and everything stops. I added the last function loop the movment, but after the first round of movment left and right (which works well), it seems that all 4 functions are called together so the wheelchair is battery mobile 20 px right and left 20 px.

    I know this probably isn't the best way, in other ways, or just a way to fix this will help a lot!

    This should do it:

    // speed
    var vx:Number = 20;
    
    var chairTimer:Timer = new Timer(120);
    chairTimer.addEventListener(TimerEvent.TIMER, moveChair);
    chairTimer.start();
    
    function moveChair(e:TimerEvent):void {
         wheelChair.x += vx;
         if (chairTimer.currentCount % 24 == 0) {
              // change direction
              vx *= -1;
         }
         e.updateAfterEvent();
    }
    

    Post edited by: Andrei1

  • Need help to write an actionscript stop for mp3

    Has managed to learn how to write an actionscript game for mp3. Now need assistance in the drafting of a judgment actionscript. And a gotoAndPlay also.

    play_btn.addEventListener (MouseEvent.CLICK, playMusic);

    function playMusic(e:MouseEvent):void {}
    var myMusic:Sound = new Sound();
    var soundFile:URLRequest = new URLRequest ("custodiansofkingdom.mp3");
    myMusic.load (soundFile);
    myMusic.play ();

    Thank you

    If not restart from where it stopped, use:

    var sc:SoundChannel;

    var myMusic:Sound = new Sound()

    start_btn.addEventListener (MouseEvent.CLICK, startMusic);

    stop_btn.addEventListener (MouseEvent.Click, pauseMusic);

    restart_btn.addEventListener (MouseEvent.Click, continueMusic);

    function startMusic(e:MouseEvent):void {}
    var soundFile:URLRequest = new URLRequest ("custodiansofkingdom.mp3");
    myMusic.load (soundFile);
    SC = myMusic.play ();

    }

    function pauseMusic(e:MouseEvent):void {}

    SC. Stop();
    }

    function continueMusic(e:MouseEvent):void {}

    var pos:Number = sc.position;

    SC = myMusic.Play (POS);

    }

    p.s. Please mark this thread as answered.

    PPS.  Please start another thread for a new topic.

  • I need help to write script

    I was doing a form fillable Friday and I had someone to help him, but it does not quite work. I need a field to be is the difference between two fields, OR, if this difference is 0 or a negative number, it must be '0 '. The code we have written has worked to do simple subtraction, but he was always playing the negative number, AND more important still, it wouldn't "Refresh" I've changed numbers (I had 36-30, so it was show 6, but even when I started to clear the fields, he would remain at 6)

    Here is my domain names and needs:

    If exchangetotal-returntotal < = 0, then the value I show is 0 in the "sub-total" field (IE, you do not get a credit or refund if the value of the goods you are returning is greater than what you are in Exchange for)

    If exchangetotal-returntotal > 0, then the value is what is this difference. (IE, you will pay the difference if what you are sharing costs more expensive than what you have returned)

    (I had planned to paste the code that we had, but my stupid work computer won't let me paste half the time)

    In addition, this will of 'Custom calculation Script,' correct?


    Thanks in advance!

    ~ Heather

    You can use this script as "Subtotal" custom calculation script It will update automatically whenever you change a value of a field in your file (However, he won't like you, change only when you leave, because that's when the value actually takes effect):

    var v1 = +this.getField("exchangetotal").value;
    var v2 = +this.getField("returntotal").value;
    if (v1<=v2) event.value = 0;
    else event.value = (v1-v2);
    
  • Need help to write sql query

    I am trying to write the SQL for a single recordset.

    I have a table with all the info from the standard article and an item_colorID.

    I have a table with 2 columns, item_colorID and color_ID color_lookup

    I have a table with 2 columns, color_ID colors and color

    I want to join the tables and filter it so that a repeat region shows dynamic data by the name of article, thumb, description, price

    and also a dynamic list/menu populated by color

    filtered so that each element is in the list/menu only available element colors.

    I have tried different variations of this sql

    SELECT * items INNER JOIN color_lookup ON color_lookup.item_colorID = items.item_colorID INNER JOIN colors ON colors.color_ID = color_lookup.color_ID WHERE items.itemCatID = 3 ORDER BY items.itemName

    but the list/menu shows each color choice, multiplied by the number of items in this color

    That is to say white will show 80 + times.

    Thanks for your help,

    Jim balthrop

    Hi JB, I think I understand the situation, but of course, I'm not familiar with the interface of the cart software you are using. It seems that you will not be able to use the choice "research from the recordset" because the color is a different Recordset. You can't really understand the color in the main recordset because it would cause the main repeating region show the item once for each available color, which is not what you want.

    I also see that the drop-down color is in its own form. If you have placed this process in the main form, would be the behavior recoginize it and treat it differently? In other words, the cart accepts entry options outside the main form element it uses:

    
    

    I don't know that the shopping cart software contains other methods to add to the cart you can be forced to use.

    What shopping cart software are you helping? They have a forum which you could get more targeted assistance?

  • need help to write a conditional query recordset

    I have two fields or not in the database. VeteranMarker and VeteranNoMarker. Answering one can be Y or N.
    I want to write a statement for my detail page where there is a label "veteran? If VeteranMarker or VeteranNoMarker has a Y in the database, then I want to display "YES" next to the label of "veteran? If neither has a Y, then I want to say 'NO '.

    The recordset is called DetailRS1, the fields would be so (I think) DetailRS1.VeteranMarker and DetailRS1.VeteranNoMarker.

    I have no idea how to write a conditional statement to achieve this.

    Thanks in advance,
    Miriam

    I think I have it solved. Here is the code, and it seems to work. If this is correct, I hope it can help someone else too.

  • Need help to write the SQL query

    Hello
    Please help me to write a query. My requirement is as below.

    Hello
    I have a table say XYZ in the following format.

    product_id local min_order_quntity
    ========================================
    1 en 10
    1 ch 10
    2 en 20
    2 ch 20
    3 en 30
    3 ch 30
    4 en 40
    4 NC 10

    Now I want to find the product_id where min_order_quantity is different for cn and locale

    now I want the result of the following

    product_id local min_order_quantity
    =============================================
    4          en          40
    4 ch 10

    This is different for local in and cn for product_id 4 min_order_quantity

    min_order_quantity should be the same for both the locale(en,ch) for any product_id.

    I want to find the product_id where min_order_quantity is different for ch and fr local

    Thank you..

    Hello

    This query should do the job

    select * from xyz t1
    where exists ( select 1 from xyz t2 where t2.product_id = t1.product_id and
                   t2.locale != t1.locale and t2.min_order_quantity != t1.min_order_quantity );
    

    See you soon

  • Need help to write a workflow rule

    Hi all!

    I want to write a workflow that will fill in the field "Region" when a new account is saved.

    We use territories, but cannot effectively throw contact reports due to not having OnDemand is not the field of territory in the area of Contact of the registrant. (Statement in contact area you can only shoot in the 'Région')

    When we originally put in place on request during the conversion of result data, we created our regions to be the same as the territories. However at the moment 'Région' is not a field we use, because of the need to create accounts to be a simple as possible. So what I want to do, is to bind the field 'region' in the field 'Territory', so that when a new account is saved this field is automatically filled in.

    Also uses a workflow the only way to do it?

    Thanks in advance!

    The expression of JoinFieldValue I put in my last message is exactly what you need. Just copy exactly as you see and passed in the default value box. You should not write 20 expressions. The name of the territory in my expression field is available in the territory, but you wouldn't see it in the drop-down list in the field into account when creating the default value of the message.

    OK, so to test it, please copy the expression in the default exactly as I have above. Then check the default message indicator. Then save your changes. You must ensure that the drop-down lists of territory and the region are compatible. They must match exactly. You will have to finally, disconnect and reconnect you and create a new account and choose the territory.

    Let me know how it goes.
    Thom

  • Need help to write a better SQL query

    Hi gurus,

    Please let me know your best query for the problem below:

    Suppose we have 2 tables in Oracle 10 G database:

    IM1: product and warranty sales records

    A: sales_id

    B: product QTY.

    C: quantity of product

    D: Service QTY.

    E: Service amount

    IM1 table:

    a b c d and e

    --  --  ----  --- ---

    1 1 100 1 10

    2 1 150 1 70

    3 2 500 1 100

    4 1 100 0 0

    IM2: brand and product guarantee service term associated with record sales

    A: sales_id

    G: the Service life

    P: brand product of

    Z: flag of product/Service

    IM2 table:

    a    g               p          z

    --  ----------    -----------   -----

    1 sony NULL p

    1 monthly NULL g

    Dell 2 p, NULL reference

    Reg 2 g NULL

    NULL lenovo 3 p

    3 monthly NULL g

    Sony NULL 4 p

    Then, he must bring the "term of Service" and "Brand product" in line with the sales table, as below:

    ID h_qty h_amnt g_qty g_amnt brand term

    --  -------  -----------  --------  ----------  ---------    ----------

    1 1 100 1 10 sony monthly

    2 1 150 1 70 dell Reg

    3 2 500 1 100 lenovo monthly

    4 1 100 0 0 sony NULL

    What I wrote myself is as below, but I want to know if there is a better idea to make the query more reliable, because real paintings are big and my query is slow.

    SELECT DISTINCT

    ID of the s.a,

    s.b h_qyt,

    s.c. h_amnt,

    Virginia g_qty,

    Sager g_amnt

    brand of the PDP,

    term of r.g

    Of

    (SELECT s.*, PDP FROM s im1, im2 p WHERE s.a = p.a. PDP AND IS NOT NULL).

    IM2 p,

    IM2 g

    WHERE s.a. = p.a.

    AND s.a. = g.a

    AND (p.z = 'p' AND WINS = 'g')

    OR (p.z = 'p' AND WINS = 'p' AND sagehomme = 0 AND s.p = pp)

    ORDER BY 1;

    Here you will find the table scripts:

    create table im1 (a number, b, c number, number d, e number);
    create table im2 (a number g char (10), char (10) p, z (1) tank);
    insert into values im1 (1,1,100,1,10);
    insert into values im1 (2,1,150,1,70);
    insert into values im1 (3,2,500,1,100);
    insert into values im1 (4,1,100,0,0);

    Insert in im2 values (1, null, 'sony', 'p');
    Insert in im2 values (1, 'Monthly', null, 'g');
    Insert in im2 values (2, null, 'dell', 'p');
    Insert in im2 values (2, 'Reg', null, 'g');
    Insert in im2 values (3, null, 'lenovo', 'p');
    Insert in im2 values (3, 'Monthly', null, 'g');
    Insert in im2 values (4, null, 'sony', 'p');

    something like below

    Select x.a as id, x.b as h_qty, x.c as h_amnt, Eliane as g_qty, x.e as g_amnt, min (y.p) as min (y.g) as mark

    -min (y.p) compared to (x.a partition) as min (y.g) on (x.a partition) as the term mark
    of im1, im2 XY
    where x.a = y.a
    Group of x.a, x.b, x.c, Eliane x.e

    Edited: putting aggregation function instead of the function min min Analytics

Maybe you are looking for