Conversion in the Query statement for T/F

Hi,
If I have a boolean attribute (char(1)), which contains T or F, is there a way that I can do a query and at the same time, somehow, convert T to 1 and F to 0 respectively?
Thanks!

Can I do the following?
SELECT case when <<booleanAttr>> = 'T' then 1
else 0
end
from <<tableName>>

Similar Messages

  • How to consolidate the financial statements for 3 company codes, assigned t

    Hi Friends,
    How to consolidate the financial statements for 3 company codes, assigned to 3 different companies, 3 different fiscal years, 3 different controlling areas and all the 3 Company Codes assigned to same chart of accounts in the same client?
    Can we need any ABAP program for this (or) Is it possible using Report Painter?
    Please help me.
    Thanks

    Hi friend,
    Is it a real-time situation or something you are visualising ?
    For consolidation, you can use a group chart of accounts and select that in the operative chart of accounts for consolidation purposes.  This would work provided the company codes use the same operative chart of accounts and fiscal year.
    I hope the above would be helpful to you.
    Regards,

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • Editing the Query name for all reports in PRD.

    Dear All,
    I have created 25 reports using Query Designer.We have moved all the reports to BI Production. And Clients are using these reports using the Tool Bex Analyser.
    Every time they are navigating through open Query -> Info Areas -> Data targets and Query.
    Instead of going this way, is there any other way to Open a query easily.
    And they wants to modify the Report name and the Technical name for all the reports. Can we able to edit the Query name for all reports, or do i need to go for SAVE AS for all querys.
    Pls Suggest.
    Thanks,
    Ram

    Hi Ram,
    1. For the first question; if it user specific query then ask the users to save them at the FAVORITES so that there is no need to go to the dataprovider specific.
    Or they can create the reports as favorites user menu screen of that particular user.
    2. In order to change the technical name and description of the queries goto RSZC t-code> give the source and target infoprovider as same> select queries>click on the reports>click on transfer selections-->
    Then you get a screen to change the description and technical name.
    But this is pertained to Infoprovider level.
    You can see all the reports on the infoprovider (cube/ods).
    Hope you understood.
    Regards,
    Ravi Kanth

  • Publishing server doesn't work - error 'The request URL doesn't contain the query string for the client OS'

    Hi,
    I'm trying to setup an App-V environment in my lab.
    I've used the App-V 5.0 Trial guide to help me configure all necessary components.
    I'm able to install everything without error.
    when come time to publish an app, it simply doesn't show up on my client.
    after looking at events on the client and server, I found that the Publishing server is returning under Admin the following message.
    'The request URL doesn't contain the query string for the client OS'
    My setup is pretty simple.
    App-V Server managament and Publishing on the same box
    App-V database on my SQL server.
    I'm able to see the publishing "webpage" by using http:://localhost:889.
    It only display this :
    -<Publishing Protocol="1.0"
    <Packages />
    </Publishing>
    I've published one app from the management console.
    any idea what could mean this error?
    thanks

    Hi,
    thanks for the link.
    I've validated the suggested debug steps. It seems that the problem is with my Publish server again.
    I've looked in the web.config file. It seems to be missing some parts compare to the example provided.
    Again, I've published an application from the management console. Management and Publishing are running on the same box, while SQL is remote.
    Here's the web.config
    <?xml version="1.0" ?>
    - <configuration>
    - <system.web>
    <compilation debug="false" targetFramework="4.0" />
    <machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" />
    - <authentication>
    - <!-- We don't support form authentication, but this will supress x-ray security warning
    -->
    <forms requireSSL="true" />
    </authentication>
    </system.web>
    - <system.webServer>
    - <modules runAllManagedModulesForAllRequests="true">
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
    - <security>
    - <requestFiltering>
    - <verbs>
    <remove verb="GET" />
    <add verb="GET" allowed="true" />
    </verbs>
    </requestFiltering>
    </security>
    </system.webServer>
    - <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    + <behaviors>
    - <serviceBehaviors>
    - <behavior name="">
    <serviceAuthorization impersonateCallerForAllOperations="true" />
    <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    - <bindings>
    - <webHttpBinding>
    - <binding name="SecureBinding">
    - <security mode="Transport">
    <transport clientCredentialType="Windows" />
    </security>
    </binding>
    <binding name="UnsecureBinding" />
    </webHttpBinding>
    </bindings>
    - <protocolMapping>
    <add scheme="http" binding="webHttpBinding" bindingConfiguration="UnsecureBinding" />
    <add scheme="https" binding="webHttpBinding" bindingConfiguration="SecureBinding" />
    </protocolMapping>
    - <standardEndpoints>
    - <webHttpEndpoint>
    - <!--
    Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
    via the attributes on the <standardEndpoint> element below
    -->
    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
    </webHttpEndpoint>
    </standardEndpoints>
    </system.serviceModel>
    </configuration>

  • Method which is return's all the refinement state for Dimension.

    Hi All,
    Is there any java method which is return's all the refinement state for Dimension.
    Ex:
    Brand
    Reebok
    Scholl
    Sebago
    Ravel
    When i clicked All Brand from front end it will select all 4 Brands data.
    Any help will be great appreciation
    Thanks,
    Sunil N

    Not sure what you want to achieve here. If you want to select all the dimension values, then provided the dimension is Multi-select OR you can have N=Id-1+Id-2+Id-3 and it will return all of them. What I'm not sure on is why you would do this, you'll get back precisely the same results (provided every record is tagged with a brand) as if you did nothing, although I guess you might want to allow them to select all then deselect one or more afterwards ... Note you can also use N=<dimension-id>, where <dimension-id> is the id of the actual dimension, and that will return all records that have a value for that dimension, but that won't give you any descriptors (breadcrumbs) other than the dimension name/id.
    Michael

  • The license state for the current server doesn't match the farm's license state

    I am trying to build a development Server, to mirror our Production Server. 
    I have copied the Config_Database and WSS_Content from our Production Server to a Development Server that is on a separate network. I installed SharePoint 2010 and ran the Config Wizard, entered in the database server and chose the Config_database that I
    copied over previously.
    But I receive the error:
    "The license state for the current server doesn't match the farm's license state"
    Can anyone help me with this.
    dfrancis

    Hi,
    Please have a look at links below:
    https://sharelockpoint.wordpress.com/2014/01/09/sharepoint-2013-installation-error-the-current-server-cannot-be-joined-to-this-farm/
    http://blogs.msdn.com/b/sowmyancs/archive/2012/08/08/the-license-state-for-the-current-server-doesn-t-match-the-farm-s-license-state-sharepoint-psconfig-error.aspx
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • Using an "EXISTS" test in the QUERY parameter for an expdp

    Has anyone successfully used EXISTS in the QUERY parm during an export datapump? I can get IN to work, but not exists:
    Works:
    tables=fred.export1
    directory=dpump_dir_dev
    dumpfile=expdpdev_export_test2_20101216.dmp
    logfile=expdpdev_export_test2_20101216.log
    query=export1:"WHERE state in (select state from fred.export2)"Doesn't work
    tables=fred.export1
    directory=dpump_dir_dev
    dumpfile=expdpdev_export_test4_20101216.dmp
    logfile=expdpdev_export_test4_20101216.log
    query=export1:"WHERE exists (select * from fred.export2 where fred.export2.state = fred.export1.state)"Oracle unhappy:
    Processing object type TABLE_EXPORT/TABLE/TABLE
    ORA-31693: Table data object "FRED"."EXPORT1" failed to load/unload and is being skipped due to error:
    ORA-00904: "FRED"."EXPORT1"."STATE": invalid identifier
    . . .I tried "where export2.state = export1.state)" and that returned the same error
    It's like Oracle is aliasing the table or something, such that when I try to reference it in the WHERE clause of the subquery, it can't recognize it. Any ideas on another way of writing the EXISTS test? I can use IN, but in some cases that might be a list of values over 500,000 items long. Looks like an EXISTS runs faster as a SELECT statement, so I thought the same might be true during the datapump process.
    --=Chuck

    Hi,
    It looks like boolean expression in query does not work in expdp where as it works for in clause as in that case it is referring to export table column and matching it to the value from other table.
    "where export2.state = export1.state)" also will not work as you are only exporting export1 table so it does not have references to export2 table (as there is no select for export2 table)
    My 2 cents
    Regards

  • Unit Conversion in the Query

    Hello Experts.
    I have a situation where I need the units of quantity to be converted at the query level. For e.g. if the value of the keyfigure is stored in litres in the Cube, then at the time of the query execution this value should be converted in gallons.
    I cannot use the following options in this case:
    1) The Solution for alternate UOM using the How-to guide for the same as the conversion from liters to gallons is not maintained at the material master level in my case
    2) I cannot use the Unit Conversion in the Conversion tab because gallons won't be the only target unit in my report, it will depend on the type of material select by the user.
    Please let me know about the options in this case. Any sort of help is appreciated and points will be duly rewarded.
    Thanks,
    Rishi

    Hi Prasad,
    In both of the ways, there should be only one target unit for them to work which is not the case in my situation. I want only specific material types to be displayed in gallons. If the User selects a different Material type then the target unit will be different.
    Any other possible solution on this one.
    Thanks,
    Rishi

  • Currency Conversion terminates the query execution

    Hi friends,
    When I execute a query it terminates due to the following error in currency conversion. "Abort System error in program CL_RSR_RRK0_CURR and form FILL_CUDIM_02-04 (see".
    conversion works fine and gives correct values in target currency when the source currency is say thailand bhat, malaysian ringett, philippino peso etc.., but when i use the source currencies of zimbabwe or kenya i get this error and next the query terminates.
    Can any one of you suggest me what could be the problem. How do i systemtically approach to solve this problem.
    Thanks
    Raj

    Hi Serjio
    All the currencies mentioned currencies are available in the TCURR table including the exchange rates from those currencies to USD.
    Hi Sven,
    I am sorry, I really didnot understand when you say "set the flag for protocol to X". You may throw more light on this. I tried debugging the program RSW_CUR_TRANSLATION_RATE_GET in the past step-by-step. This leads to lots of other programs and i was really lost in them. Pls guide me to debug it effectively.
    Hi Serjio/Sven,
    Further, i missed out to mention the following details in my post. We have two version of a this COPA query. One is older and the other is newer. Both were created before we upgraded from 3.1C to NW2004s.
    The older version works fine. The conversion from source to target currencies is good for the african currencies also besides the asia-pacific (AP) currencies. However, the newer version throws out the error message i have mentioned in the post for african currencies but works fine for asia-pacific currencies. Even the newer version was working fine before we upgraded from 3.1C to NW2004s. Its only after the upgrade that we are encountering this problem.
    In the query we are also converting the data to SGD (singapore dollar), besides USD. As i donot require this data i have hided the values in SGD. As a reason we have never maintained conversion rates/factors for converion from any of the AP or African currencies to SGD. Due to these missing rates I get an Information message to maintain the conversion rates/conversion factors for AP/African curr to SGD. This message appears along with the error message(mentioned in my post) on the same screen. This information message also appears for the older version of my query, which is currently giving correct $values. But I think we can ignore this message. Else do you think, in some way these missing rates are responsible for the trouble??.
    But more surprisingly why is that the older version is not impacted by the upgrade while the newer is affected?
    Pls share your views
    Thanks
    Raj

  • Allow the external access to the query massage for WEBI in BO 4.0 ,

    Hi ,
    I created the BEX query and in query properties I checked " Allow External access to this query" and saved the query
    but this check box  option  " Allow External access to this query"  is not saving .
    is there any note need to be implimented for this problem.
    I created the the connection using the information design tool.
    I'm trying to create the Webi using BICS connection form BEX query through Web intellengence rich client
    it is giving the message like "it is not possible to use this Bex query as source for Web intellengence reports. Ask your administrator to edit this query so that it can be used by
    web intellengence and enable the query propery" Allow External access to this query.
    we are using BI - 7.35 support pack  4  and BO - 4.0 SP2
    Did any one has faced this issue, Could you please send your comments
    Regards
    JV
    Edited by: Jennie Juvvanapudi on Oct 13, 2011 3:43 AM

    Upgrade your SAP GUI to 720 and there will be a updated patch at service market place for GUI 720 which will resolve this issue.
    When we faced same issue we had upgraded and our system currently shows
    SAP GUI Release: 720 Final Release
    File Version: 7200.3.7.1066
    Build:            1257409
    Patch Level: 7
    Thanks,
    Suresh

  • How can I call a Page Process from the Select statement for Report Page

    I'm able to call a javascript using the below:
    img src="#IMAGE_PREFIX#add2.gif" border="0" alt="Icon 4" onClick="javascript:add_connect1('||CPORT.ID||')"
    But Now,
    I'd like to accomplish (2) New things:
    1. instead of using,....... onClick="javascript:add_connect1,
    I'd like to call a Page Process, onClick=
    2. I'd like to be able to call two different processes onClick.
    a. onClick="javascript:passBack('||ID||')"
    b. onClick= <Please see my question #1 above>
    Can someone please help me with the syntax for this,
    If indeed it can even be done?
    Thanks- Gary

    Greg.
    It seems that my situation is the one you describe in you second paragraph, where you mention:
    you could then add the ID column value as a parameter to the javascript functionBut,
    I do not know how to reference the variable in my javascript nor how to use it in my on-demand process.
    If you can hellp me past this last little bump, then I think I will be able to use these skills in Sooo many different areas of my design.
    Here's what I've got so far:
    A. In the select statement I identify the javascript as:
    onClick="javascript:connect_port('<font color=blue>''||ID||''</font>')";
    B. In my javascript I have this:
    <script language="JavaScript" type="text/javascript">
    function connect_port(ID)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=CONNECT_PORT',0);
    gReturn = get.get();
    get = null;
    </script>
    C. In my on demand function I have this:
    BEGIN
    INSERT INTO CCONNECTIONS_B
    BLDG_ID,CLST_ID,PORT_ID,STRAND_ID
    ) VALUES
    :P2004_BLDG_ID,:P2004_CLST_ID,:P2004_PORT_ID,:P2004_STRAND_ID1
    END;
    You can see that I dont know how to use the value for 'ID' in either the javascript or the On-Process function.
    If you can help me out with this one, Then I can imitate it for the rest.
    -Gary
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:45 AM
    Edited by: garyNboston on Apr 3, 2009 6:47 AM

  • Currency conversion in the query designer level

    Hi
    Iam calculating the 'Financial Loss' in the Formula in the query designer.And it comes in SAR(Saudi Riyals).
    But i want the 'Financial Loss' in USD in the Query Designer. Because i want the USD Financial Loss to be use in some other calculation.
    Please let me know how can we do this one in the query designer. I really appreciate for it .
    Regards
    Kumar

    Dear Ravi,
    Basically there are 2 ways to do it: routine & query level.
    If query level, you need to maintain it first using tcode RRC1, then you use it in your KF in your query. .
    Routine level,
    You can create new KF in info-provider, then in the update rules routine, you can use this function to convert the currency :
    CONVERT_TO_LOCAL_CURRENCY
    Hopefully it can help you a lot.
    Regards,
    Niel
    thanks for any points you choose to assign.

  • How can I setup the query timeout for SQVI in basis?

    Hi,
    I want to setup query timeout for a particular user so that if his query (created in SQVI) takes more then say 10 minutes, it automatically times out and system resources are freed up.
    How can I do this for a specific user? Also in case I cant do it for a specific user how can I do it for all users?
    Thanks for reading

    The memory is limited by the parameters
    abap/heap_area_dia
    abap/heap_area_nondia
    abap/heap_area_total
    which are system wide.
    If a user requests more memory than those, the program will dump.
    Markus

  • How to read back the output state for digital output or anlog output ?

    I use NI-pci 6221(68PIN) Accquistion card to do measurmet,after i do digital output ,or anlog output ,I find that the output will be maitained by the card.even after i exit my accquistion program.But if i reset the card ,the ouptut also will be reset.
    Now if i don't reset the card ,how can i read back the output state,?

    Hi Mike,
    There is no way for you to internally route an analog output to an analog input. The only solution is to physically connect the two lines together with a wire.
    I came to this conclusion through the following steps:
    1- Start MAX and select the DAQmx device under "Devices and Interfaces>>NI-DAQmx Devices" that you want to internally route signals through.
    2- Click on the "Device Routes" tab on the bottom of the right hand window (It defaults to the "Attributes" tab)
    3- Line up the Source with the Destination to see if the connection can be internally routed (either direct or indirect)
    I came to the above conclusion by following these steps for a PCI-6251 DAQ device (the analog output & input do not exist in the "Device Routes" tab therefore they do not support internal routing), but you should verify this for your specific hardware. Let me know if you have any other questions/concerns.
    Cheers,
    Jonah Paul
    Applications Engineer
    National Instruments
    Jonah Paul
    Marketing Manager, Embedded Software
    Evaluate the LabVIEW RIO Platform! - ni.com/rioeval

Maybe you are looking for