SQL & PL/SQL :: Convert String Of Flags Into List Of Labels

Apr 21, 2011

I have a varchar2 column that contains something like this:

10100010

Each digit represents a flag that corresponds to a certain label:

1 - Bananas
0 - Oranges
1 - Apples
0 - Tomatos
0 - ..
0 - ..
1 - Kiwi
0 - Others

What I want to do is, translate '10100010' into the string '(Bananas,Apples,Kiwi)' using SQL-only. As a bonus it would be nice if the string is completely empty if all flags are '0', so no '()'.

View 6 Replies


ADVERTISEMENT

How To Get Type / Length And Flags By Query

Feb 19, 2007

how to get the type, length, flags in oracle by query..??

View 1 Replies View Related

How To Convert String To Date

Apr 15, 2007

I have a date saved in varchar2 colomn.

how can I convert the vaules into date, so I can use the date to compare data.

Ex: I have the value '20-03-2007 05:31:29', but this value is saved as varchar2.

how can I take from this value the date '20-03-2007' as date format?

View 6 Replies View Related

SQL & PL/SQL :: Convert Alphabet To String?

May 30, 2013

I want to make a query in which i can convert
alphabet
A
B
C
D

asume i have column name alphabet have data A B C D.But i want to retrieve data like this
Apple
Boy
Cow
Duck

View 2 Replies View Related

SQL & PL/SQL :: How To Convert String To Ascii

May 20, 2011

I can't think of a clue how to get the desired results.

I have table column with varchar2 type. I need to convert the strings in this column to ascii values. Now I know Oracle function ascii() converts a character to ascii values. But it just converts the first character of the string and ignore the others. I need to convert the whole string to ascii values. For example, if I need to convert the string "USA", the result should be '858365' (as in U decimal value is 85, S decimal value is 83 and A decimal is 65).

I think I need to use instr() function and also PL/SQL to pass all these strings through a cursor and then use a loop but I'm still confused about it.

View 5 Replies View Related

SQL & PL/SQL :: Convert ID And Comma Delimited List To Rows

May 31, 2011

how can I convert

select 1 as id, 'role1,role2,role3' as roles from dual union all
select 2 as id, 'role1' as roles from dual

to

select 1 as id, 'role1' as roles from dual union all
select 1 as id, 'role2' as roles from dual union all
select 1 as id, 'role3' as roles from dual union all
select 2 as id, 'role1' as roles from dual

?

I would prefer sql then plsql. Script for creating a test table:

create table CONVERT_LIST(id integer, roles varchar2(100));
insert into CONVERT_LIST values(1,'role1,role2,role3');
insert into CONVERT_LIST values(2,'role1');

View 3 Replies View Related

SQL & PL/SQL :: How To Convert String To Date Format

Jun 12, 2011

I have a string in this format '2011/06/01 00:00:00'. How do I convert this to date format.I tried to_date,to_char and they give errors invalid number & literal does not math format string. I don't have much control on the string since that is the way is comes from the application.

View 3 Replies View Related

SQL & PL/SQL :: How To Convert A String Into Numeric Other Than To_number

Dec 30, 2012

I have a column which has has all numeric values 3 digits to 7 digits in length but all in string format, I want to use seomthing other than to_number function.

Would like to use within the ETL tool, where to_number function isn't getting recognized.

select EMP_NO from employees;

View 2 Replies View Related

SQL & PL/SQL :: Convert One String Into Multiple Strings?

Aug 31, 2010

i have a column 'name' in which value is 'Shailesh Negi',i have to insert 'shailesh' into'first name' column and 'Negi' into 'last name' column respectively.

View 20 Replies View Related

SQL & PL/SQL :: Convert Column Value To Delimited String Using Query?

Jan 10, 2012

I want to convert a column value to a delimited string using a query.

Example

TableA
Col1 Col2 Col3
1 x200 MIS-X
2 x200 BTS-X
3 x200 TYR-X
4 x100 YRY-X

Select Col3 From TableA where Col2 = 'x200'

Expected Output:

'MIS-X','BTS-X','TYR-X'

View 4 Replies View Related

SQL & PL/SQL :: Convert A String In Date Obtaining Just A Year?

Nov 12, 2012

basically I have to insert in a date field a string that is a year(four characters).

The problem is that I have to convert a string in date obtaining just a year. How can i do this?

View 14 Replies View Related

PL/SQL :: How To Convert BLOB To BASE64 String And Back

Aug 15, 2012

We have a forms application in Forms 10g. We scan a document and gets it to a image item in the Form. Now, we need to pass this image to a 3rd party application (document mgt. system, ). They have given us a web-service for this. We have to convert the image to a BASE64 string and then invoke the web-service method and input it.

The, 3rd party application document management system will also send images as BASE64 strings through the web-service. We need to convert them back to a blob and put to an image item in the form so that it can be viewed by the end-user.

So, how can we convert a image item in form (as BLOB) to a base64 string and also do the reverse???

View 2 Replies View Related

Forms :: Possible To List PDF File Having User Provided String?

Nov 21, 2012

Is it possible to list pdf file having user provided string using oracle forms? if yes then how? How can I achieve this target?

View 2 Replies View Related

Application Express :: Substitution String For List Entry

Jul 4, 2012

I have created a list with name Test_List and 5 values in it.

I want to pass the values dynamically when i select the list values (any of the 5 values).

I tried:

For each list setting(List Details --> Static list entries --> Target) i have set the
Request as ?Test_List=#Test_List#
Note: Here Test_List is my list name.

Also i have tried

Request as ?Test_List=&Test_List.

But nothing seems to be working...

View 8 Replies View Related

Application Express :: Computation To Trim Off First Part Of String Within List Manager Item Values

Jul 1, 2013

A computation after submit pl/sql function process to trim off the first part of the string (CQ..) within the list manager values. Support for example the list manager contains values such as

 CQ..SAMPLE1..TEST1CQ..SAMPLE2..TEST2CQ..SAMPLE1..TEST2 

The computation process should trim off the first part(CQ..) and should return the list manager value as SAMPLE1..TEST1SAMPLE2..TEST2SAMPLE1..TEST2 Oracle APEX 4.0.2 is the version and Oracle 10g r2 is the database. 

View 7 Replies View Related

Forms :: Margins In Button Labels

Mar 20, 2012

I have a question related to margins in button labels. Is it possible to change left / right or top/bottom margin space in that kind of elements ?

View 1 Replies View Related

Forms :: Excel Charts / How To Set Title And Labels

Apr 13, 2012

im still trying to create workcharts into an Excel sheet (see thread "How to create pie chart in Excel sheet"). I could not be able to create pie chart, but I got to create a histogram chart. Now, I wish to customize labels and legend.

The issue is that the data range is made by non-contigouous cells, and some of them are merged. So, I tried to create by hand a pie chart, and this is the code behind:

Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("SUMMARY COSTS 2011-2012-2026").Select

[code]....

how can I implement this code in Forms 10g using OLE2? In details, how does SeriesCollection work?

View 3 Replies View Related

Application Express :: Chart Axes Labels Under The Tick Marks

Mar 14, 2013

I'm trying to create a histogram based on time range using a bar chart. I made the query correctly and the bar chart displays the histogram.

However I want to make the axes labels on the x-axis go under the tick marks of the axis. Right now they are under the corresponding bar. This doesn't convey the notion of a range. For e.g. if I have 23 observations between 10 and 20 seconds, I need to show 10 on the left of the bar and 20 on the right. In other words the bar is between two tick marks. I want to show 10 under the left tick mark and 20 under the right tick mark.

How do I do this? I tried using the attributes of the label tag under x_axis in the chart xml, but couldn't get it to work.

View 1 Replies View Related

Application Express :: Flash Chart In 3.1 - How Many Labels Can Be Get Horizontally (Limitations)

Jun 22, 2012

I am trying to do a Flash Chart in APEX 3.1. Is there a limitation on how many labels I can get horizontally. No matter what I do the number of labels I get horizontally is 15. We are trying to show the amount of days in a month.... Can I do that? If so how?

View 5 Replies View Related

Application Express :: Prevent Combining Labels Into Another Category In Charts

May 31, 2013

Is there a way to prevent Apex from combining labels into an "other" category in the charts?

View 4 Replies View Related

Forms :: How To Avoid (no List Elements Defined For List Item) Error

Sep 27, 2011

I am creating the Dynamic list but when i am compiling the form it gives the compilation error "No list elements defined for the list item".

I can eliminate it by entering the dummy list element but this dummy value will be displayed at form run time.

View 1 Replies View Related

List Products List Of Client Grouped By Type Of Product?

Dec 14, 2011

Im trying to list the products list of a client grouped by type of the product. Ex:

product type

prod.A acid
prod.B flavour
prod.C acid
prod.D cleaner
prod.E flavour

I want to list something as:

Acid

Prod.A
Prod.C

Cleaner

prod.D

Flavour

prod.B
prod.E

View 1 Replies View Related

Forms :: FRM-30351 / No List Elements Defined For List Item

Oct 30, 2011

DECLARE
CURSOR GRP IS
SELECT RowNum rn, Letter_Group_ID||'-'||A_Desc AName,Letter_Group_ID
FROM Hrs_Group;
BEGIN
Clear_list('Letter_Group_ID');
FOR I IN GRP LOOP
Add_List_Element('Letter_Group_ID',I.rn,I.AName,I.Letter_Group_ID);
end loop;
END;

FRM-30351: No list elements defined for list item.

List LETTER_GROUP_ID

View 4 Replies View Related

SQL & PL/SQL :: List All Tables Connected To Each Other With Constraints And List All Together

Apr 22, 2013

I just want to list and group all my tables that are linked together by constraints. I just want my tables to be able to be listed together as one particular database. my tables are , CUSTOMER, ORDER_INFO, ORDER_LINE, PRODUCT. They're all linked together by way of constraint and I want to list and print them all together as one DB. HOW DO I put them all in one schema and then also list them all together and print/illustrate them as one. also, I tried to import them into their own scheme but i ran into a series of probs regaurding the .dmp file being read.

View 2 Replies View Related

ORA-02085 - Database Link String Connects To String

Jun 19, 2012

I have this error (and solution):

ORA-02085: database link string connects to string

Cause: a database link connected to a database with a different name. The connection is rejected.

Action: create a database link with the same name as the database it connects to, or set global_names=false.
Where should I set global_names=false ?

View 7 Replies View Related

SQL & PL/SQL :: How To Find Whether Exact String Is Present / Not In Given String

Mar 14, 2013

I'm facing some problem even after using INSTR function in Oracle.The problem is I have written the logic in the PL/SQL block which appends all the values fetched in a loop on the basis of whether the string is present or not.

For ex:

The first value fetched from the select query first is ABCDEFG which gets appended to a variable
The next value fetched is AB even this has to be appended to the variable since this exactly doesn't match with ABCDEFG.
The next value fetched is BCDEF even this has to be appended to the variable since this exactly doesn't match with ABCDEFG.
The third Value fetched is ABCDEFG this will not get appended presently according to the logic which is correct.

writing that piece of code to append the value fetched which doesn't exactly match with the existing string

View 3 Replies View Related

How To Use String Buffer Instead Of String Query

May 9, 2008

show an ex to use string buffer for select statemnt

View 1 Replies View Related

SQL & PL/SQL :: Get List Of Values Which Is Not The Given List?

Sep 1, 2013

I want to get the list of values which is not the given list .

I have the below data in my emp table

SQL> select emp_id from emp;

EMP_ID
----------
101
102
103
104
105
106
108
110
120
220
225

11 rows selected.

But I need to display the values from the list of values which are not in the emp table . So the result will be '3000,3002,3003'.

SQL> select emp_id from emp where emp_id ?;
EMP_ID
----------
3000
3002
3003

View 9 Replies View Related

SQL & PL/SQL :: Remove String Before And After Pipeline To Get String Between Pipeline?

May 10, 2010

I have a string like below:

string = 'HEADER||MEAL||15'

How to get 'MEAL' string? The length of the string can be various. Means, 'MEAL' can be 'INFLIGHT'. So, i cant use the substr. Is there a function that can recognize the pipeline? so that i can remove all the string before the pipeline and after the pipeline to get the string between the pipeline?

View 9 Replies View Related

How To Convert Row As Column

Apr 8, 2011

how can i change row as column in oracle.

I wrote the one query which is return the following output..

Query:

SELECT RMC_N_ID,NVL(DISCOUNT_N_ID,NULL) AS DISCOUNT_N_ID,NVL(NULL,'') AS LOADINGS_N_ID,NVL(NULL,'') AS WARCOMB_N_ID,NVL(NULL,'') AS ENDORSECOMB_N_ID FROM UWRMC_DISCOUNT WHERE RMC_N_ID =224 AND DISCOUNT_N_ID IS NOT NULL
UNION
SELECT RMC_N_ID,NVL(NULL,'') AS DISCOUNT_N_ID,NVL(LOADING_N_ID,NULL) AS LOADING_N_ID ,NVL(NULL,'') AS WARCOMB_N_ID,NVL(NULL,'') AS ENDORSECOMB_N_ID FROM UWRMC_LOADING WHERE RMC_N_ID =224
UNION
SELECT RMC_N_ID,NVL(NULL,'') AS DISCOUNT_N_ID,NVL(NULL,NULL) AS LOADING_N_ID ,WARCOMB_N_ID,NVL(NULL,'') AS ENDORSECOMB_N_ID FROM UWRMC_WARCOMB WHERE RMC_N_ID =224
UNION
SELECT RMC_N_ID,NVL(NULL,'') AS DISCOUNT_N_ID,NVL(NULL,NULL) AS LOADING_N_ID ,NVL(NULL,'') AS WARCOMB_N_ID, ENDORSECOMB_N_ID FROM UWRMC_ENDORSECOMB WHERE RMC_N_ID =224

Result:

RMC_N_ID DISCOUNT_N_ID LOADINGS_N_ID WARCOMB_N_ID ENDORSECOMB_N_ID
---------- ------------- ------------- ------------ ----------------
224 0 87 0 0
224 0 88 0 0
224 0 0 0 93
224 0 0 0 94
224 0 0 88 0
224 0 0 89 0
224 82 0 0 0
224 83 0 0 0

I want the result like below

RMC_N_ID DISCOUNT_N_ID LOADINGS_N_ID WARCOMB_N_ID ENDORSECOMB_N_ID
---------- ------------- ------------- ------------ ----------------
224 82 87 88 93
224 83 88 89 94

How can i get this..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved