Query condition such as a cycle

Hello community!!!
I have a concernand I wonderif you couldsuggest meorprovide meany help.
My caseis as follows:
I have two tableswith the following structure:
1. PrestacionServicios as ps
campos:
ID int incremental=true
fechaServ datetime
CliExt bit, "Para especificar si el cliente es externo o no". El cliente externo es un cliente donde no está registrado en la tablaClientes.
CliExterno varchar(50) "Datos del cliente Externo. Solo se especifica si el campo cliExt es =true."
IdCliInter int "ID relacionado con el ID de la tabla Clientes donde se ha especificado un ID de esta. Solo se especifica si el campo cliExt es =false
Servicio varchar
2. Clientes. tabla que tiene la data de los clientes
ID int
NombreCompleto varchar (80)
Dirección varchar (100)
Email varchar (50)
Telefono varchar(13)
What do I needto do?
Show ona gridor make aquerywhere Ishowthe serviceswith data fromboth clients.That is,show the nameof theexternal
customerin a row whenit comes tothistype of customer andifa rowwhere the data isexternal customer, to recoverthefullNameinternal
customerinthe Customers table.
The combination of thepstable and thec'scould dowithoutproblemsbut not how toshowor otherdatain
the case ofan internalor external customerin the same query.
I thank youforanyhelp or suggestionsantemanos.
Greetings.
Quien no conoce el pasado está condenado a repetirlo. Napoleón Bonaparte

Hi Paoli,
Thank you for your sharing which will help for others who have the same issue.
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • How to set a BEx Query Condition in Design Studio (e.g. Net value GT 0)

    Hi experts,
    I have set a simple condition in my BEx Query...
    e.g. key figure "Net value" GT 0 to become only positive values in the query result.
    In the Query runtime the condition works successful, but in the Design Sudio view the defined Query condition doesn´t work.
    In my Design Studio crosstab I have tried to switch between the display setting "Conditional formating Visible" true/false, but without success.
    By the way, before I have posted this thread, I had a look at this two blogs...
    Design Studio 1.0: Create a Scorecard Using SAP BW BEx Query Exceptions
    Design Studio 1.2  - a Second Look
    Any ideas or experiences?
    Thanks and regards,
    Michael

    Hi Michael,
    I think you are mixing up two different BEx terms. Conditions are filters on key figures (show me only the results with a value bigger than 50). Exceptions do not filter the result set, but provide a formatting based on the values in the result set (if value is bigger than 50, make its cell red).
    The Conditional formatting setting in Design Studio refers to the BEx exceptions. For the BEx conditions there isn't such a setting available. You just have to activate the condition in your BEx Query and use that for your data source in Design Studio.
    If you want a workaround to enable/disable conditions from Design Studio, check this blog I wrote: HackingSAP.com - SAP Design Studio and Conditions It shows how you can use variables to adjust the conditions (and also activate) from within Design Studio.
    Cheers,
    Xavier

  • Problem to get ResultSet when it is used a Date type in the query condition

    hello ,
    I having a bit of nightmare getting a ResultSet how result of one simple Query for a table when the condition WHERE involve a Date type.
    To change the String value in a date to use in the query condition, I tried both:
    String strDate = "dd/mm/yyyy";
    (1.) java.sql.Date sqlDate = new java.sql.Date(strDate.getTime() )
    (2.) SimpleDateFormat formatter = new SimpleDateFormat(strDate) ; sqlDate = formatter.parse(strDate);
    and finally I use this code to get the ResultSet:
    sql = "SELECT * FROM myTable Where (idCli = " + cd_Cli + " And dateReg = " + sqlDate + ")";
    statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    resultSet = statement.executeQuery(sql);
    boolean ok = resultSet.last();
    totNumberOfRegistration = resultSet.getRow();
    But In both the cases I get a empty resultSet.
    I shoul like if someone would look my code to say me where it is the mistake...
    thank you
    tonyMrsangelo
    P.S. I tryed using PrepareStatement too to get the ResultSet, but in that case I couldn't use the ResultSet because executing the statement resultSet.last() I get the error: "Result set type is TYPE_FORWARD_ONLY"

    In a database like Oracle, you need to use a function like TO_DATE; other databases may have something similar.
    However, the proper way to do this is to use a PreparedStatement. Then you can say
    PreparedStatement ps = conn.prepareStatement("update SOMETABLE set SOME_DATE=? where SOME_ID=?");
    ps.setDate(1, new java.sql.Date(someJavaUtilDate.getTime()));
    ps.setInt(2, theId);
    ps.executeUpdate();

  • How to define the query condition of Image Theme in MapBuilder?

    Hi,
    I'm trying to add an dynamic Image Theme in OracleMap, but there's a problem.I defined the query condition of Image Theme like this:
    select scanimage,shap from image where scanimgid=467
    The shap column is the MBR column
    And the XML CODE:
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="image" image_column="SCANIMAGE" image_format="JPEG" image_unit="M" image_resolution="1.0">
    <rule>
    <features> select scanimage,shap from image where scanimgid=467 </features>
    </rule>
    </styling_rules>
    When i preview this Image Theme ,there is an ORA-00936 error means lack of expression.
    Is there any problem with my definition?Or can query an image from an Image Theme?
    Thanks a lot for your help!
    Message was edited by:
    N.Mars
    null

    Hi Mars,
    predefined image theme definition does not support a "select" statement in the <features> tag. You should just define a query condition in the <features> tag.
    It seems that you are trying to use an image theme in Oracle Maps, but it currently does not support a FOI image theme. You should add a predefined image theme as part of the basemap, and maybe add scales values to set the visibility range of this image theme.
    Joao

  • Ak query condition

    Hi all,
    How we can query the following conditions using ak query.
    there is 2 variable say A and B if A&B is present then condition must be where A=value of A and B=value of B this condition works when given qo0 and qo1 value as IN but other condition when A or B is null I am not able to retrieve anything.Please help me when any of the value is null wht is the query to be and condition to be.
    Thanks
    Mark

    Your approach is valid. You can put a complete query in the query condition box. Mapviewer is smart enough to tell whether it's a complete query or a where clause condition.

  • 'Show Query Conditions' in Charts Portlet

    Is it possible to display 'Query' conditions in the 'Run as Portlet' option in a Chart?
    If not, is there a workaround to display the conditions?
    Thanks.

    Juha,
    I have a similar problem what you have. Can you share the solution with me.
    My problem
    My LOV has following select:
    Select ename, empno from emp;
    I want to Show only Ename in the LOV and display Ename on the form too. but I want to store only empno and nothing to do with ename.empno is a hidden column.
    Can anybody please help me. Can you please reply to [email protected] also.
    Thanks in advance.
    Murali

  • Query Rules - length limitation on query conditions set via powershell

    My current client has 200 custom keywords in SP 2010 which they would like to migrate to SP 2013 query results.  I have powershell scripts to perform the export from SP 2010 and import into one of three SP 2013 environments.
    One limitation I have found in powershell -- that does not happen in the search service application UI! -- is a 100 character length limit on the keywords used for matching query conditions (synonym data in SP 2010).   The keywords can be set through
    the UI without limitation but are limited to 100 characters when using powershell!  It makes no sense!
    I suppose my final update could be done by hand (ugh!) and I would much rather be able to script these updates.  
    Any pointers or help?

    Hi grobinson,
    If you used this code line in your Powershell and have the following error:
    [string[]]$QueryRuleTerms=@($QueryRuleConditionTerm)
    Exception calling "CreateKeywordCondition" with "2" argument(s): "The value must be at most 100 characters long.
    Parameter name: Term"
    At line:2 char:1
    + $QueryRuleCondition = $QueryRuleConditions.CreateKeywordCondition($QueryRuleTerm ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException
    You need to use the following code line with Split() method to add the multiple terms, it will work.
    $QueryRuleConditionTerm = "a1;a10;a100;a101;a102;a103;a104;a105;a106;a11;a12;a13;a14;a15;a16;a17;a18;a19;a2;a20;a21;a22;a23;a24;a25;a26;a27;a28;a29;a3;a30;a31;a32;a33;a34;a35;a36;a37;a38;a39;a4;a40;a41;a42;a43;a44;a45;a46;a47;a48;a49;a5;a50;a51;a52;a53;a54;a55;a56;a57;a58;a59;a6;a60;a61;a62;a63;a64;a65;a66;a67;a68;a69;a7;a70;a71;a72;a73;a74;a75;a76;a77;a78;a79;a8;a80;a81;a82;a83;a84;a85;a86;a87;a88;a89;a9;a90;a91;a92;a93;a94;a95;a96;a97;a98;a99;a991"
    #use the following codeline, it worked for me
    [string[]] $QueryRuleTerms = $QueryRuleConditionTerm.Split(";")
    $QueryRuleConditions = $QueryRule.QueryConditions
    $QueryRuleCondition = $QueryRuleConditions.CreateKeywordCondition($QueryRuleTerms,$true)
    $QuerySourceContextCondition = $QueryRule.CreateSourceContextCondition($ResultSource)
    $QueryRule.Update()
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • Syntax for calling a form & passing a query condition

    I have a stored PL/SQL procedure where I am attempting to link to a master detail form from a button created in the procedure. The procedure is called from a form based on a table.
    I want to pass an id from the first form to the second when the user clicks the button and have that id bring up the master record in the calling form (query condition to be automatically executed).
    I am using the Portal technical FAQ 10.10 as a reference. However, I must be off in the syntax. Here's what I have:
    objectId - contains id from calling form
    OBJECT_ID - column name in called MD form
    elsif (button = 'Subject Matters') then
    PORTAL30.wwa_app_module.link(
    p_arg_names =>
    PORTAL30.wwv_standard_util.string_to_table2('_moduleid:_show_header:OBJECT_ID:_OBJECT_ID_cond'),
    p_arg_values =>
    PORTAL30.wwv_standard_util.string_to_table2('2215270925:YES:'&#0124; &#0124;to_char(objectID)&#0124; &#0124;':%3D'));
    The best I get is the id passed and the called form opened in INSERT mode.
    I have been playing with this for days!
    If anyone spots the error in my code and could point it out, I'd greatly appreciate it.
    Regards,
    Judy

    try this
    String b = (String)am.invokeMethod("getValue", params);
    Thanks,
    Prasanna

  • Query For Purchase A/P Cycle Details

    Hi
    All export pls. provide me Query for Purchase A/P Cycle Details i.e Vendor Code  Vendor Description doc. date posting date po date amount quantity unit price same as Grpo returns and invoice in singal screen
    Thanks & Regards

    Hi,
    What do you mean by Query for Purchase A/P Cycle . All Query  for A/P Cycle , you can search  in SDN.Any specific unsolved query for you can be posted here.Ok.
    Check the details:
    1.PO creation
    http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
    2.Goods Receipt
    http://e-mory.blogspot.com/2008/02/sap-migo-goods-receipt.html
    3.Invoice Verification
    http://e-mory.blogspot.com/2007/11/sap-miro-enter-invoice-verification.html
    Regards,
    Biju K

  • Uploading a text file from webi filter area as part of the query condition

    Post Author: balasura
    CA Forum: Publishing
    Requirement : Uploading a text file from webi filter area as part of the query condition Hi, I am in a serious requirement which I am not sure available in BO XI. Can some one help me plz. I am using BO XI R2, webi I am generating a ad-hoc report, when I want to give a filter condition for a report, the condition should be uploaded from a .txt file. In the current scenario we have LOV, but LOV could hold only a small number of value, my requirement is just like a lov but the list of values will be available in a text file ( which could number to 2000 or 2500 rows). I would like to upload this 2500 values in the form of a flat text file to make a query and genrate report. Is it possible in BO XI? For Eg:- Select * from Shipment Where u201CShipment id = u2018SC4539u2019 or Shipment id = u2018SC4598u2019u201D The u201Cwhereu201D condition (filter) which has shipment id will be available in a text file and it needs to be loaded in the form of .txt file so that it will be part of the filter condition. Content of a .txt file could be this shipment.txt =============== SC4539 sc2034 SC2343 SC3892 . . . . etc upto 2500 shipment Ids I will be very glad if some could provide me a solution. Thanks in advance. - Bala

    Hi Ron,
       This User does not have the access to Tcode ST01.
       The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
      Any further suggestions, PLEASE.
    Thanks.

  • Query Condition of Geometry Theme Issue?

    I have created a very simple Geometry Theme within Map Builder and in the Query Condition of the Styling Rule I have placed the following query:
    SELECT person_id
             , bng_geometry
    FROM locations
    WHERE person_id = :pv_person_idThe attribute BNG_GEOMETRY corresponds to the column LOCATIONS.BNG_GEOMETRY which is of type SDO_GEOMETRY and is registered within the USER_SDO_GEOM_METADATA table.
    Whilst it seems illogical to put an entire query into the "Query Condition" box, the theme runs successfully and plots all my FOI's with the application.
    Since this box is clearly only expecting a WHERE clause (person_id = :pv_person_id in my case), I am curious how this theme is functioning correctly?
    If anyone knows how MapViewer handles any SQL supplied by the user I would be very grateful. Also, is my approach invalid or can you supply entire SQL statements rather than just the WHERE clause?
    Thanks for any help.
    Oh and we are running:
    OracleAS MapViewer Version: Ver1033p5_B080908
    Oracle Map Builder Version: 11.1.1.2.0 Build: Ver11_B091229
    Duncs

    Your approach is valid. You can put a complete query in the query condition box. Mapviewer is smart enough to tell whether it's a complete query or a where clause condition.

  • Query Conditions

    Hi
    Is there a way to show the 'real' Query conditions in a report instead of return value of LOV.
    Example of my LOV:
    'select distinct decode(np.vl,1,'400 kV ',
    2,'200 kV ',
    3,'110 kV ',
    6,' 20 kV ',
    'Muu kv ') &#0124; &#0124; np.name &#0124; &#0124;' '&#0124; &#0124; np.specifier, bsnet_id from elnet_dw.r_pylvaat2 r, elnet_dw.net_parts np
    where np.bsnet_id = r.trline_id'
    So I don't want to display bsnet_id to users.
    Now in a report's Query conditions, there are five ID-number. ID-numbers don't tell anyting to users.
    Thanks,
    Juha Leinonen

    Juha,
    I have a similar problem what you have. Can you share the solution with me.
    My problem
    My LOV has following select:
    Select ename, empno from emp;
    I want to Show only Ename in the LOV and display Ename on the form too. but I want to store only empno and nothing to do with ename.empno is a hidden column.
    Can anybody please help me. Can you please reply to [email protected] also.
    Thanks in advance.
    Murali

  • Can you include an external data source in query condition?

    Hi all,
    I have a user that wants to run a report off a subset keys in an external data source. Is this possible in Disco Plus?
    For example, he has an Excel file that is just a list of employee numbers. He then wants his Disco query to only bring back the employee records for the people listed in the Excel file. Right now, he uses Cognos and can do this. A visual representation of this would be a condiition that would accomplish something like this:
    WHERE EMPLOYEE_NUMBER IN (Excel row 1, Excel row 2, Excel row 3, ...)
    We do not want to have to load the data into a table each time to accomplish this, but no other way readily jumps out at me. Anyone have any ideas?
    Thanks in advance,
    Jewell

    Jewell.
    Given the situation you describe, I don't know of any 'reasonable' way to do this either the GUI in Desktop or the interface in Plus.
    However - and just for the grins - there may be a possibility if done through the command line interface of Desktop. I truly doubt you'll want to do it - given the limitations - but ...
    ... in the command line interface you can put in the switch for /parameter such as: /parameter today trunc(SYSDATE), which means that your report is looking for a parameter called 'today' and you're putting in the data to put in the parameter 'trunc(SYSDATE)'.
    So, you could either build the command line with a batchy-kinda-process in that via batch it reads a file as input and puts parameters, or hard code it manually (which no one would want to do). Problem is, if you have multiple values, I don't think it'd work as you're saying something like:
    /parameter today (SYSDATE,SYSDATE-1,SYSDATE+!) - which I doubt would work as it probably only wants one value
    or if you had:
    /parameter today SYSDATE /parameter today SYSDATE-1 /parameter today SYSDATE+1
    it also might choke.
    Alternatively, you could investigate using Plus with the Java command line utility and see if it's possible to do a similar thing via Java.
    ... so long answer to a short question ... (my specialty) 8-)
    Russ

  • How to fire sql query conditionally?

    Hi all,
    I want a select query to fire conditionally.
    for example
    I want this:
    select case when &a>2 then
    select 2 from dual
    else when &a<2 then
    select 3 from dual
    end
    from dual;
    when variable a is greater than 2 then "select 2 from dual" query will fire
    and when variable a is less than 2 the "select 3 from dual " query will fire.
    how to do this?

    RMukherjee wrote:
    hi...my question is not about selecting 2 or 3
    its about firing query selectively
    that is
    select case when condition then
    select something from some table ---- this query will fire --query 1
    when condition
    select something from some table ---this query will fire--query 2
    end
    from dual;
    depending on the condition, query 1 or 2 will fire.No, that is one whole query, there is no query 1 or query 2.
    SQL is not a conditionally executing language. You consruct a whole query and you execute a whole query.
    Sure, you could get the query to call functions, or a pipelined function etc. which could use PL code to conditionally execute some query and return data appropriately, but that's introducing seemingly unnecessary context switching.
    So what is the actual problem that you are trying to solve? Rather than ask how to fix a clearly broken solution, it's better you explain what you are trying to achieve in the first place.

  • Custom query conditions in db adapter

    Hello,
    How to execute custom query in bpel db adapter?
    For example :
    1. select * from employee where status = 'N' and address is not null
    2. select * from empoyee where substatus = 'Y' and phone is null
    after where keyword - query part is dynamic, parameter combinations and count is unlimited ( depends on business logic ). It is not possible to implement each condition parameter as parameter in db adapter configuration.
    Db adatper query has to be something like  : select * from employee where #condition# , but #condtion# need to be interpretated as condition not string with quotes..
    best Regards,
    Uldis

    Say your complete query looks like this -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN (select PARTY_KEY from  xref WHERE row_id='123')
    1). In assign activity, write out the query part which comes after where clause and assign to variable query
    (select PARTY_KEY from  xref WHERE row_id='123') , replace the value of row_id from input value in assign.
    2. Now open DB adapter and pass the rest of query as input -
    select SUBJECT_NAME from RELATION
                where PID_GID_SSID IN #query

Maybe you are looking for

  • Itunes won't launch, no error message

    I have an ipod shuffle and everything was fine till I downloaded the new version of itunes. Now itunes does not launch, it does not do anything atall, no error message, no hourglass, nothing. Also, my ipod shuts down after playing for just 5 minutes.

  • Can i put powerpoint onto my mac pro?

    Can I use powerpoint on the mac pro?

  • XI3.0: Soap Sender with HTTPS

    I have enabled HTTPS on our J2EE stack. We have a soap sender which works fine using http and username/password authentication. When I switch "HTTP Security level" on the SOAP sender to "HTTPS without client authentication" and sends the SOAP request

  • Import subtitles for slide show

    I have two slide shows, each with 50 slides. I would like to generate a text file with the subtitle definitions and import it, but apparently subtitles can only be imported for timelines. Why is that? I have the names of the slides (the texts that sh

  • Adobe Captivate 7 availability by location

    Hello, I want to download the trial version of Adobe Captivate 7 but it didn't work. I checked help - download problems and I got this " I can't download a trial that uses Akamai Download Manager (Including Acrobat X Pro. Not applicable to downloads