IF NEW VARIABLE IN SQL QUERY, DISPLAYS AS LAST COLUMN + rpad not working

Hello everybody and thank you in advance,
1) if I add a new variable to my sql query to select a column which was already in the table, it shows it in the report table as the Last column to the right. That is, if I add "street" to
something like city, postcode, street, store, manager, etc, instead of placing street between postcode and store, it places it as i said as the last column to the right.
2) When values are entered into the cells of the tables, yes, they do expand it to their needed lenght, But, only if it is one word. If it is two, like when i enter the value "very good"
then it takes two lines so as with a carriage return within the cell, thus, making it too high the row. I tried to padd spaces with rpad but it did not work. something like rpad(stock, 20,' ')
I must say that the table is in the same page where there is a Form, so as the table grows in lenth it is actually squeezing the form located right on its left.
3) rpad did not work with the most simple syntax, but less would with what i need because it turns out i am using DECODE in order to do a conversion between value displayed and
value returned in my select list of values, something like : DECODE (TO_CHAR (stock),'1','Deficient','2','Average','3','Good','4','Very Good',null) AS stock,
so, i have tried to put the rpad there in several places but either it gave parsing error or it left the column empty not picking any values.
thank you very much
Alvaro

Alvaro
1) That is standard behaviour of apex builder. You can change the display order with the arrows in the report attributes column report.
2) You will have to play with the style attributes of the column to accomplice this. For instance style="white-space:pre;" in the Element Attributes of the column attributes. White-space:normal would thread several space (' ') as 1. So no matter how many you add with rpad they will be shown as 1.
Or set a width either as attibute or in a style class for that column.
Nicolette

Similar Messages

  • Create new variable in a query using if

    Is it possible to create a new variable in a query based on an if statement.
    eg select A, B, C from table where condition
    C is the new variable and should have a value of 10 if A is > 100 and a value of one if A > 100 and B < 200 for example.

    Yes. Why not.
    select a,
             b,
             case
                 when a> 100 then
                    10
                 when a> 100 and b<200 then
                   1
              end c
    from table
    where <condition>;Regards.
    Satyaki De.

  • Passing values in a vector list as bind variables in sql query.

    Hi,
    I have a vector list containing values 12,13,14.
    vector<string> v;
    v has values 12,13 and 14.
    Here the number of values in vector list are not fixed.
    I want to pass these values as bind variables to sql query.
    Can anyone suggest me how to do this.
    Thanks in advance!!

    Ah, the it's the classic 'Varying In-List' again
    See:
    The Tom Kyte Blog: Varying in lists...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 (started more than a decade ago, so scroll down for more recent examples)

  • Bind variables in SQL query of DBAdapter

    Hi,
    Can we add bind variables to SQL query when we define DB adapter...?

    No, not in the Wizard.
    I do not know if it is possible with the TopLink in combination with BPEL.
    But can you use a Pl/SQL procudere/package that performs the dynamic SQL?

  • SQL Query - The number of columns specified in "SQL Query" does not match t

    I am creating new UDM for tablespace alert, below is my query,however its failing with error
    SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
    I selected Metric type is number
    SQL Query Format : Two columns
    Query:
    SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
    used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    Any clues why i am getting error.

    SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
    2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    TABLESPACE_NAME USED_PCT
    MGMT_TABLESPACE .82
    SYSAUX 1.52
    UNDOTBS1 .32
    RMAN .02
    CORRUPT_TS 10.63
    USERS 0
    SYSTEM 2.26
    MGMT_ECM_DEPOT_TS .04
    MGMT_AD4J_TS 0

  • Can anybody help....SQL to display row as column and column as rows

    Can anybody help in writing a SQL to display row as column and column as rows?
    Thanks

    check this link:
    Re: Creating Views - from rows to a new column?

  • SQL query to get last 6 months records neglect the current month

    Hi All;
    I need help with 
    sql query to get last 6 months records neglect the current month
    Any help much appreciated
    Thanks
    Pradnya07

    SELECT <> FROM tbl WHERE dt >=dateadd(month,-6,GETDATE())
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SQL query to get last 10 records in the table?

    Hi,
    Can anyone tell me the SQL query to get last 10 records in the table?
    Thanks!!
    MCP

    Please, define what "last" means. Sets are unordered by definition, so if you want to retrieve rows from a table in a specific order you need to specify what that order is - e.g. by maintaining a value in a column (or a combination of columns) that you can use in the ORDER BY clause of the SELECT statement.
    If, for instance, you kept the time when the row was inserted in a special column (InsertedTime), you could use this in your query like this:
    select top (10)
      <column list>
      from <table or view>
      where <restriction(s)>
      order by InsertedTime desc;
    ML
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

  • I am trying to connect my old mac desktop and my mac book pro to my new mac desktop to use as monitor but it will not work??

    I am trying to connect my old mac desktop and my mac book pro to my new mac desktop to use as monitor but it will not work??

    Hi ashleydanc588,
    If you are interested in more information on using an iMac in Target Display Mode, including what machines are compatible, you may find the following article helpful:
    Target Display Mode: Frequently Asked Questions (FAQ)
    http://support.apple.com/kb/ht3924
    Regards,
    - Brenden

  • Hi I have a recent macbook pro 12" (bought in april 2012) model number A1278.  I'm trying to connect to a 23" apple cinema display (A1082) this currently is not working - i've bought an additional Apple MB570ZA Mini DisplayPort to DVI Adapter - no luck!

    Hi I have a recent macbook pro 12" (bought in april 2012) model number A1278.  I'm trying to connect to a 23" apple cinema display (A1082) this currently is not working - i've bought an additional Apple MB570ZA Mini DisplayPort to DVI Adapter - no luck!
    im not sure what to do next - can anyone help?
    im running OSX 10.7.4

    Hi There,
    I have had the exact same issue but with a projector.
    The issue lies with Mountian Lion 10.8.2.
    I tried many a combination with no luck to get HDMI working.
    Took my mac into the apple store and came to the conclusion it was the software, so I asked them to install 10.8 onto it (this is destructive so a backup is a must)
    Bought my macbook home and voila, now displaying through my projector.
    There is a small graphics update after 10.8.1 which seems to be the cause.
    Hope this helps.
    Thanks.

  • I have recently upgraded from my iphone 5 to a new phone. My iphone 5 's touch screen does not work anymore. I need to backup my phone, but I can't do it on itunes without my password. Everything besides screen is ok. Is there a way around it? :(

    I have recently upgraded from my iphone 5 to a new phone. My iphone 5 's touch screen does not work anymore. I need to backup my phone, but I can't do it on itunes without my password. Everything besides the screen is completely fine-the screen will not recognize my finger anymore. I am not trying to fix the phone, but I need to have my contacts. The pictures have already synced, but I need my password to do a full backup. Unfortunately, I can't type in my password. Is there any way around it? If I take my phone to the apple store, will they be able to help me? I am not willing to replace the screen just to do this, however, so that is out of the question. 

    Someone else may have a workaround, but, as far as I know, if you cannot interact with the screen on the iPhone, there is no way to unlock it so you can get to your contacts.
    Were you saving them to iCloud by chance? If so, you can restore them to your new phone.
    ~Lyssa

  • My daughter down loaded the new 6.0 software and now her home button does not work.  Tried reloading software and reset to original factory settings.

    My daughter down loaded the new 6.0 software and now her home button does not work.  Tried reseting to original settings and reset the operating software.  Any ideas?

    Try:
    fix for Home button
    Fix a broken, unresponsive or sticky iPhone Home Button
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • TS1702 After I updated my new Ipad  with IOS 6, now Map& Dictation icon are not working. please help me

    After I updated my new Ipad  with IOS 6, now Map& Dictation icon are not working. please help me

    Thank you wjsten for your soon reply. Unfortunately on these days I'm in a country that Apple don't have any retail store here and for sake of time I prefer to fix it myself to DHL it to the nearest country to use its warranty. Do you have any idea how can I fix it? Do you think it's a software issue?

  • Since I installed the new OS X Lion, the iCal syncing through iTunes is not working properly.

    Since I installed the new OS X Lion, the iCal syncing through iTunes is not working properly.
    When I sync my MacBook Pro with my iPhone and iPad, the events set in both devices (iPhone & iPad) are not transfered to the iCal on my labtop. Events created in both devices are transfered and copied betwen them when I sync them with the iTunes app (through the MacBook Pro) but they are not trasfered/copied into the labtop (iCal). The events created in the iCal (on my MacBook) are tranfered to the devices as two events on same hour. One, with the description created on the iCal, and the other as a New Event (no description). This is happening since I installed the new OS X Lion last week.
    I file a report and talked with an Apple Support Representative, but they could not help me. They have not receive any other reports on this matter. Do someone has confronted this issue. I need to find out how to solve this problem.
    Regards,
    JAD

    Hi Sydness,
    Thank you very much for your help. It just worked fine. I have 4 macs in my company for 25 years (one is updated each year), and it is the first time I could not solve a problem for weeks. It gave me the opportunity to join this great community.
    Charles
    Sydness wrote:
    I reset my SyncServices and the calendar sync worked perfectly after that.
    I followed the instructions found here:
    http://support.apple.com/kb/TS1627?viewlocale=en_US
    Mac OS 10.7.1 - MacBook

  • Help!!! I can not make or receive calls! other functions itself. Internet, sms, whatsapp work. I restored as new iphone from the phone and from itunes and still not working.

    I can not make or receive calls! other functions itself. Internet, sms, whatsapp work. I restored as new iphone from the phone and from itunes and still not working.
    Sorry for my english i'm spanish

    I have not tried that...I will look up the process so that I can do it correctly (and still transfer all of my files, contacts, etc).  Any suggestions?  What is the advantage of restoring as a new device..is this more akin to a complete wipe of a hard drive?

Maybe you are looking for

  • Looking for a new laptop

    Hi. Because of an unexpected hardware problem I'am looking for a new laptop. The last weeks I've informed me a bit of some laptops but I'am not really sure: My favorite is Samsung R560-Aura P8400 Madril but my last notebook had an ATI graphic card an

  • P205-s7469 speakers not working for windows 7 64 bit

    I recently upgraded from vista 32bit to windows 7 64 bit. My laptop is equiped with harman/kardon speakers, 2 main speakers and sub woofers under the laptop. The speakers worked fine under vista, now that I have windows 7 my speakers sound  bad and t

  • To remove Double quotes while uploading a file

    Hi All, I have a requirement, where i have to Remove double quotes after uploading a file. I am uploading the file using GUI_UPLOAD. CALL FUNCTION 'GUI_UPLOAD'   EXPORTING     filename                      = v_file   FILETYPE                      = '

  • Change the Logo in iStore Home page

    All, Can any one tell the process to place the custom logo in iStore home page ??? Thanks in advance

  • How to edit podcast title page?

    I'm not seeing how to edit the title line on the podcast page here www.jimsavage.net it's acting like a hyperlink that's set to white text (so you cant see it, yellow scrollover. Also is there supposed to be a "read more" option at end of text on thi