Direct requests detecting all numeric columns As Integer

I'm finding myself in the situation where direct request Answers are detecting all numeric result columns to Integer and truncing the results. Has anyone else seen this? It's as though it's not detecting the column type properly when I click "Validate SQL and Retrieve Columns".
Even if I edit the columns format and set the number of decimal places to 2, it simply appends .00 to the end of ever return value, because as far as it's concerned, it's an Integer. The columns should be detect as Double.
Anyone have any thoughts? I'm pretty sure it's not the case of having inadvertently set the default column formatting or something, some time back. Because even then, that would just be formatting. In my case it's actually incorrectly detecting the underlying column type as Integer instead of Double.
Thanks

Try doing this:
Nest the SQL you've written in one overall SELECT statement. Your issue happened with me. All the "number" fields came out Integer regardless of whether the format on the database was double. I nested everything in one more SELECT statement and voila, everything came out nicely. Don't ask me why. If someone could explain that would be great. But it worked.
Tell me if it worked for you.

Similar Messages

  • SQL 2008 union all numeric column

    Hi guys, I'm struggling with an union all. I tried to union a column float with a null column:
    SELECT column 1,
    column 2,
    '' AS 'column 3'
    FROM table a
    UNION 
    SELECT column 1,
    column 2,
    column 3 FROM
    table b
    If column 3 is varchar everything ok, if ( as in my case) is numeric I got an error. Any sugegstion guys? Thanks as always

    even the below would work, but your solution looks better as column3 is a numeric column...
    SELECT column 1, column 2, '' AS 'column
    3' FROM table a
    UNION  
    SELECT column 1, column 2, Cast(column3
    as varchar(100)) FROM table b

  • All the columns of an alv grid report are not downloading in excel in 1 lin

    Hi All,
    I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
    What the issue is that all the columns are not downloading in one line, instead they split in two rows.
    Please help.
    Regards,
    Neha Patel

    hi,
    just use this procedure it will solve your problem:
    Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    Regards
    Rahul sharma

  • Does an entity bean update result in ALL DB columns being updated?

    Hello,
    If I update a single field in my entity bean, will all the columns for the DB row be updated? -OR will only the changed column value be updated?
    Thank,
    Keith

    Only fields detected as persistent-dirty will be updated in the database record.
    Laurent

  • Excel Download-Numeric columns getting repeated

    Hi
    I am trying to download context data into excel file using WD binary cache. I am using Office XP suite for this case. The text data is getting downloaded properly but all numeric data (though there actual data type is string) is getting repeated in adjacent column with "agg" getting concatenated in actual column heading.
    Any clue why is it so? and how to resolve this issue??
    Thanks
    Yashodhan Mujumdar

    Hi..
    any resolution for this issue?? I am still stuck with the same problem!!
    Thanks
    Yashodhan

  • Infoview not displaying all the columns

    Hi All,
    I have abt 25 columns in my crystal report. Report looks fine in CR designer but when i view the same report in infoview , it doesnt display all the columns. Although i can scroll upto the right but  about 10 columns are missing.
    Kindly suggest.
    Thanks

    Hi,
    Can you please brief me what the approach you took to solve this issue, because even me facing the same problem and I have 35 columns in my report, I build the report on 11x17 page size.
    In that most of them are string type holding the 10 different levels of manager names, employee names and their contact information and few columns are numeric fields
    Since I adjusted all the fields to fit into the page, for all the lengthy name columns like "VenkateshwarRao" its showing "Venkat" and rest of the letters are truncated.
    So basically the user needs the report to download in Excel format, so currently I m able to export and manually adjusting them by selecting all fields in excel.
    But I am not able to show up all fields in info-view, only the first 15 columns are displayed and most of the textual columns are truncated.
    Thanks in advacne,
    Venkat

  • Add one column of string to columns of integer

    Hi there,
    Could someone help please. 
    I would like to add one column of strings to a few columns of integer. 
                                                           --------- Added elements ------ 
    20C=           100     101    102           20C=100     20C=101    20C=102
    15C=           200     201    202          15C=200     15C=201    15C=202
    10C=           300     301    302          10C=300     10C=301    10C=302
    Thanks for help. 

    Hoverman wrote:
    I had a look at the tutorial link you sent. They are not particularly relevant to my question. 
    Why do you think I am posting a question? I have already spent a few hours searching forum and looking at examples. It would be more helpful to have a relevant example or a solution.
    Thanks for your time.  
    What is your problem here? RavensFan gave you information quite relevant to your task, but you had not (and still have not) answered his questions, so he could not (nor anyone else) tell where in your task you are having trouble. Do you know how for loops work, with respect to outputs? Your questions imply that you need to spend some real time learning LabVIEW, not just "having a look at the tutorials."
    Hmm, it looks like you had a similar problem with your last question, and you still have not indicated that you understood how to solve it.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Problem with numeric columns when ADF table exported to Excel

    Hi,
    We have a ADF table on a page which can be exported to excel spreadsheet using the <Af:ExportCollectionActionListener>. The adf table is within panel collection.
    There are many numeric columns in this table and there is <af:convertnumber> used on these columns. No other properties are changed on the <af:convertnumber> tag, everything is default. And no formatting is applied on the view object attributes as well. When a user from US is exporting the table to excel everything works well no issues. But a Netherlands or French user exports the excel, the numeric values which have decimal point are shown as left aligned and the whole numbers in the same column are right aligned. As a result when the user is trying to sum the entire column only the right aligned numbers are getting added.
    I am not sure what is the issue here ?
    HAs someone seen this scenario before ?
    Am I missing anything here - any property setting ?
    The numbers are shown like this in the excel exported from table.
    4,077.78
    3,555,34.12
                        1,234
                        19,219
    3,4445,33.22
    Jdev - 11.1.2.3
    Thanks

    Add a decimal to the whole number columns to make all columns left-aligned. Do all left-aligned columns get added?
    4,077.78
    3,555,34.12
    1,234.00
    19,219.00
    3,4445,33.22

  • How to see all the columns in the spool output of an ABAP program

    I have an ABAP program which displays all the columns when I run it manually. (by scrolling to the right using right arrows). When I run that report in the scheduler and when I see the output in the spool in transaction SP01, it does allow me to go to the right to see all columns.
    thanks
    Ram

    Check OSS Note 409339 - Spool requests with ABAP lists with more than 255 columns.
    Summary
    Symptom
    As of Release 4.6x, the ABAP list processor can create spool requests for ABAP lists with a width of more
    than 255 columns. However, when you print using the SAP spool, only the start of the list lines is printed,
    the rest of the line is truncated at the end of the page.
    Other terms
    ABAP, lists, print parameter, LINE-SIZE
    Reason and Prerequisites
    Creating "wide" lists on the screen (in other words, lists in the SAPGUI with more than 255 columns) was
    already introduced by the ABAP list processor for Release 4.0B. However, before Release 4.6 these lists
    cannot be printed out in the width used on screen.
    In older releases (for example, 4.0B, 4.5B), you were not able to generate spool requests for lists with a
    width of more than 255 columns:
    The system issues error message PT 026: "No. of columns > 255, no standard print-out possible".
    Therefore, we did not have the problem described here of non-existing device-type support in 4.0/4.5 for
    printing out "wide" lists.
    Up to and including 4.6C there are no SAP device types that support print formats for lists with a width of
    more than 255 characters). Since Release 3.0A, all SAP device types support a maximum list width of 255
    characters with device format X_65_255.
    Solution
    When you create the spool request and a print dialog box appears, enter a column width of maximum 255
    in the "Number of columns" field.
    As of Release 4.6D, you have the option of using device type SWIN with the new format X_65_1024/4 when
    printing with Windows (see Note 213382).

  • SPD WorkFlow is not able to read all the column values

    So quick run through of what is going on so far and the environment set in place.
    Number of Environments: 2
    Environment Details:
    Dev: One front end server, One App Server, One SQL Server,
    Production: Two Front End Servers, Two App Servers, One SQL Server,
    We have a InfoPath form made in InfoPath 2010.
    After making the form, it was published to the dev site with all the needed property promotions in place. It was than attached to a library, and than a workflow was made using SharePoint Designer 2010. When the workflow initiates when CreateBy value is not
    empty. The workflow works fine and all the columns promoted from the form are read and placed in the email and set to end user.
    when we move the same form to Production side, what happens is that the workflow reads certain properties and skips certain properties. So when the end user receives the email it is missing information that has been filled out in the form.
    Just to confirm is all the values were being saved to the library properly, i went to modify view under the library tab at the top of my SharePoint library. Opened the view settings and checked off each of the properties that were promoted from the InfoPath
    form (refereed to as site columns on the SharePoint side). All the columns that were filled out show the values that were either chosen or entered by the user (check box, text box, drop down, people picker). But the WorkFlow does not pick up all the values.
    lets say we have the following:
    We have: TextBox A for First Name
    TextBox B for Last Name
    TextBox C for Location Name
    Dropdown 1 for Division Name
    Dropdown 2 for age
    People Picker for requester name
    What happens is that when the user receives the email it will have the only the first name, last name, have the location missing, the division would there there, but the age would again be missing.
    This is really confusing as to why it would be happening. It works fine on the Dev side, but screws up on the Production side.
    Below is what the library looks like with the information populated.
    same names are referenced in the workflow.

    It depends on what you mean by "what messages are available on the topic".
    if you want to know what messages would be delivered to a new consumer on the topic, then you can simply create a consumer yourself. Each messages on a topic is delivered to all subscribers, so by creating a consumer yourself you won't be interfering with the delivery of messages to other consumers. (That's not possible with queues which is why the queue browser is provided).
    If you want to know what messages are "persisted in the topic" then there's not really such a concept. Messages sent to a topic are only persisted in individual durable subscriptions created for individual clients. If there are no durable subscriptions when messages are not persisted. The JMS APi doesn't provide a way to browse the messages saved in an individual durable subscription. It could, but it doesn't.
    Nigel

  • PSA Edit Dialog - Not showing all the columns

    Hi All,
    I need to edit the transaction data for 2LIS_13_VDITM in PSA. when I go to display the PSA data it shows few selected fields in the initial display not all coming in the data source.
    In Order to get that field in Data Display,  I change the display variant and bring the field in the data display .
    Now, When I try to edit that record the the Edit Dialog Pop Up  does not show me all the columns which are there in the Data Display. I checked in the display Selection Tab, the field list over there also does not contain this field.
    However, I am able to edit data for all other Data Sources.
    Has someone ever faced this kind of strange thing.  We were on support pack 18 and migrated to BW 3.1 support pack 20. I was able to edit data in PSA for this data source earlier. Can it be a support Pack Problem ?
    Requesting for your valuable suggestions on this!!!
    Regards
    Deepak

    Hi All,
    The below problem occured due to Support Pack upgrade.
    If you are upgrading Basis Support pack from 47 to 48, you might face this kind of problem.
    OSS Note Number : 821558 proved to be quite handy.
    Regards
    Deepak

  • Fetch and peak detection all channels of PXI-5105 with 4M record... HELP!

    Dear collegaues!
    Please help me to improve performance my application, see attachment, and sorry for my English.
    So, my task is to fetch and peak detection all (eight) channels of PXI-5105 with 4M record and sample rate 4M with loop 1 sec...
    Inputs of all my channels are wiring to NaI detectors with 0,5...1 microsec of pulse width (really) and freq from 0 kHz to no more than 40 kHz.
    Why I've selected 4M record and 4M sample rate namely? Answer is that I've tested PXI-5105 previously by generator 40 kHz and 0,5 microsec width pulse. It is working fine and peak detection indicate for me 40000 pulses/sec. If I set lower than 4M record and 4M sample rate it is no working. In my honest opinion 4M record and 4M sample rate are very min settings.
    In the present time peak detection working only 6 channels... When I've connected to diagram more than 6 "peak detector.vi" - I see the error "...out of memory...".
    Please advise me, what is to be done for that is all working fine.
    Solved!
    Go to Solution.
    Attachments:
    consumer-producer7.vi ‏44 KB

    What you are running into is an out of memory error in LabVIEW.  You have enough onboard memory to capture 4M samples per channel on the digitizer.  The issue is with fetching and manipulating that data in your LabVIEW application.  You will want to step back and take a look at how you are handling your data to understand why that is happening.
    1) 4M samples/ch = 4M Samples x 2Bytes/sample/ch = 8M Bytes/ch
    2) Expanding to 8 channels creates 64M Bytes of data in the raw binary format
    3) You are scaling your data by fetching in a 1D WDT format.  This stores each sample in a 32 bit double, expanding the memory to 256M Bytes (in addition to timing information)
    4) By splitting up the array of waveforms and branching data it you can easily create copies of this data, and if your consumer loop is not completed with the last data, you may be trying to capture a whole new set, creating yet another copy.
    So you can see that while you have 1.5GB of controller memory, when dealing with large arrays of data you can easily eat up that memory.  There are several things you can try to make your application more efficient.  You could work with an unscaled binary data format, you can wire the array of waveform directly to the peak detect vi (instead of creating 8 copies, you will have a single copy with arrays of output) or you could revisit the record size you have chosen (experimenting with your threshold and width settings might help you to get the results you want with smaller record lengths).
    -Jennifer O.

  • Laptop is unable to detect my home router wifi network but detecting all other neighbour networks

    My pavilion g6 laptop is unable to detect my home router wifi network but detecting all other neighbour networks even my phone network also. The same router network is detecting good in another laptops.

    Hi , Welcome to the HP Forums! It is a great place to find answers and information! 
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide. Learn How to Post and More i understand that your notebook finds and displays many network but not yours but another laptop does locate it. One of the easiest steps to try is to reset the router by removing power for approximately 20 seconds and then reconnecting the power.  Give the router time to reset and come back up .  Does you network now show? If your network is set to 5.0 GHz try changing the setting to mixed mode or 2.4 GHz as that is the best selection for HP notebooks. Here is a link to HP PCs - Troubleshooting Wireless Network and Internet (Windows 8).  To say thanks for replying, please click the thumbs up icon below. If this overcame your difficulty please tell people by selecting solution provided to allow it to found with greater ease.  Best of Luck!

  • Alter numeric column to allow NULL

    hi all
      while i am trying to Alter numeric column to allow NULL,i lost my digits after decimal point.How to alter the numeric column without lose the data after decimal.
    Thanks.
    Thanks - SelvaKumarSubramaniam.Please MARK AS ANSWER, if my answer is useful to U.

    While altering the Numeric column, did you change DECIMAL precision and scale too??
    I think you might be altering the scale because, run the below example in ssms.
    CREATE TABLE #TABLE
    Sal NUMERIC(10,5) NOT NULL
    INSERT INTO #TABLE VALUES(5.123), (423.13223), (444.44)
    SELECT * FROM #TABLE
    ALTER TABLE #TABLE
    ALTER COLUMN Sal NUMERIC(10,5)
    SELECT * FROM #TABLE
    DROP TABLE #TABLE
    There is no change in the data.
    Please mark as answered if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
    For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
    Regards,
    Raghu

    Hi,
       Try the following...
    DATA : it_fields like help_value occurs 1 with header line.
    data: begin of w_vbap,
            vbeln      like vbap-vbeln,    
            posnr      like vbap-posnr,   
            werks      like vbap-werks,  
          end of w_vbap.
    data: i_vbap   like w_vbap   occurs 0 with header line,
             w_fields type help_value,
          i_dfies type table of dfies,
          i_return_tab type table of ddshretval with header line,
          i_field  type dfies.
      select vbeln posnr werks
          from vbap into table i_vbap up to 5 rows.
    if sy-subrc = 0.
       sort i_vbap by vbeln.
    endif.
      clear it_fields[] , it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'VBELN'.
      it_fields-selectflag = c_on.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'POSNR'.
      it_fields-selectflag = space.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'WERKS'.
      it_fields-selectflag = space.
      append it_fields.
      loop at it_fields into w_fields.
        i_field-tabname   = w_fields-tabname.
        i_field-fieldname = w_fields-fieldname.
        i_field-keyflag   = w_fields-selectflag.
        append i_field to i_dfies.
      endloop.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield               = 'VBELN'
         window_title           = 'Select'
        tables
          value_tab              = i_vbap
          field_tab                = i_dfies
          return_tab             = i_return_tab
       exceptions
         parameter_error        = 1
         no_values_found        = 2
         others                 = 3
      read table i_return_tab into w_return_tab index 1.
      if sy-subrc = 0.
      endif.
    Regards,
    Srini.

Maybe you are looking for