How to display each character in a string of entry in different lines
Dear members,I want to write a SQL or PL/SQL where in I can separate and display each character in a string of entry in several lines.
For example, the input string is TEST, I want the result is displayed as follows:
1 T
2 E
3 S
1 1
5 I
5 m
8: 00
I know that we can use substr, but it returns me one or more than one characters consecutively.
Please help me to get the desired result.
Thanks in advance.
Hello
Maybe
with a as
(
select 'TESTING' text from dual
)
select level, substr(a.text,level,1)
from a
connect by level <= length(a.text)
Tags: Database
Similar Questions
-
How to display time in 010403 format if the entry is transmitted as ' 1 hour, 4 minutes, 3 seconds"sql query @.
Hello
You can try:
Select lpad (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] + ""), 2, '0')
|| LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +', 1, 2), 2, '0')
|| LPAD (regexp_substr ('1 hour, 4 minutes, 3 seconds ',' [[: digit:]] +' 1, 3), 2, '0')
Double;
but this requires maximum 99 hours/minutes/seconds ago in your entry.
-
Insert a space character between each character in a string
I have an array of length variant. Each element of the array contains a string. I want to put a space character "" between each character of each string in the array. The length of the string in each element of the array varies.
I played with nested for loops with registers to lag and feedback without success and began to think that I do it's too difficult.
Thank you
Mike
(Lucither: your code will make any element of the array to an empty string.) It does not insert space between characters as needed.)
There are nice solutions already posted above, here's another at random.
-
How to replace each--------with / in a string
I have a link to a local file and befor flash sends out it converts the web path.
var link: string = c:\\somewher\file.jpg
TO
www.somesite.com/Somewhere/file.jpg
How to replace the------with / in the link?
:
var pat: RegExp = / \ / g;
Link.Replace (pat, "/"); -
How to display this character for the field 2 date (------------)
Hi friends
It is possible to display the format of characters in the text field after running the form
Please I need your help
Thank youHello
If you mean for the date field to show slashes by default. I don't think that the forms will support that kind of thing.
BTW I know what is the purpose of show like that?
If you are using the normal format is DD/MM/RRRR it will automatically add the slashes. When the user enters a date like this 01012010.-Clément
-
How to display each month between the date range
I want a query that gives me the number of months between two dates given for example, if I going January 1, 2009 and April 1, 2009 then I should get on February 1, 2009 and March 1, 2009 in my trips
Thank you very muchSrix wrote:
Thanks for the requestIt is not working do not when the effective date is differs from that in a year i.e start date January 1, 2009 and end date February 1, 2009, that it does not give u then required result
I don't know what you mean? The dates are in the same year.
-
How to check an ascii value of the character in the string
Hi all
I have a string that contain alphanumeric values.
I want only numeric values in this string.
FRO this purpose.
I created a varry
;TYPE tab IS VARRAY(10) OF VARCHAR2(10) ; var tab
variable var of type varray contain this string
and now I want to check each character in this string at end of validation
How can I check this particular string
can I use loop?Hello
If str is a string, then
REGEXP_LIKE ( str , '^[[:digit:]]+$' )
Returns TRUE if and only if str contains digits (0 ith 9) and nothing else.
Here's a way you can use REGEXP_LIKE in PL/SQL:SET SERVEROUTPUT ON DECLARE str VARCHAR2 (10) := '123.4'; BEGIN IF REGEXP_LIKE ( str , '^[[:digit:]]+$' ) THEN dbms_output.put_line ( str || ' is all digits.' ); ELSE dbms_output.put_line ( str || ' contains something besides digits, or is NULL' ); END IF; END; /
Published by: Frank Kulash, December 12, 2011 09:13
Added PL/SQL example -
Display the results in the String form: dosen't work based on the example
Hello
To understand How to display the results as a string, I tried to reproduce this:
[http://apex.oracle.com/pls/otn/f?p=31517:84 | http://apex.oracle.com/pls/otn/f?p=31517:84]
I have my emp table
I've created with the wizard, on my page, a new AREA of REPORTEMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7839 KING PRESIDENT - 81-11-17 5000 - 10 7698 BLAKE MANAGER 7839 81-05-01 2850 - 30 7782 CLARK MANAGER 7839 81-06-09 2450 - 10 7566 JONES MANAGER 7839 81-04-02 2975 - 20 7788 SCOTT ANALYST 7566 82-12-09 3000 - 20 7902 FORD ANALYST 7566 81-12-03 3000 - 20 7369 SMITH CLERK 7902 80-12-17 800 - 20 7499 ALLEN SALESMAN 7698 81-02-20 1600 300 30 7521 WARD SALESMAN 7698 81-02-22 1250 500 30 7654 MARTIN SALESMAN 7698 81-09-28 1250 1400 30 7844 TURNER SALESMAN 7698 81-09-08 1500 0 30 7876 ADAMS CLERK 7788 83-01-12 1100 - 20 7900 JAMES CLERK 7698 81-12-03 950 - 30 7934 MILLER CLERK 7782 82-01-23 1300 - 10
-Selected SQL - RESULTS
-Name: Test
-Area Source Type: SQL Query
-Model region: region report
IN function enter SQL Query or PL/SQL returns a SQL query, I COPY-PASTE the following code to [http://apex.oracle.com/pls/otn/f?p=31517:84 | http://apex.oracle.com/pls/otn/f?p=31517:84]
AND I have this error:DECLARE p_vc_arr2 htmldb_application_global.vc_arr2; p_string VARCHAR2 (2000); BEGIN SELECT ename BULK COLLECT INTO p_vc_arr2 FROM emp WHERE deptno = :p84_select_deptno; p_string := HTMLDB_UTIL.table_to_string (p_vc_arr2, ':'); HTP.p (p_string); END;
+ 1 error has occurred.
Invalid query, no found select statement
Is not a PL/SQP selected?
Do I did wrong?
Thank you
Roseline Paquin
Montreal, Canada1 error has occurred
Invalid query, no found select statementWhat happens if you try
DECLARE p_vc_arr2 htmldb_application_global.vc_arr2; p_string VARCHAR2 (2000); BEGIN SELECT ename BULK COLLECT INTO p_vc_arr2 FROM emp WHERE deptno = :p84_select_deptno; return 'select ''' || HTMLDB_UTIL.table_to_string (p_vc_arr2, ':') || ''' str from dual'; END;
??
-
SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.
Hello
You can use REGEXP_SUBSTR Oracle/PLSQL: REGEXP_SUBSTR function
Select the function double REGEXP_SUBSTR('PUBLIC RELATION REPRESENTATIVE ','[^]+',1,2);
Do you have any value of the column as no 2nd string?
-
How to display the parameter string registered by DBMS_XMLINDEX?
This is probably a stupid question, but I can't seem to find any function to display the setting of a parameter string that was recorded by DBMX_XMLINDEX. REGISTERPARAMETER.
For example,.
If I have:
How to display the value of 'indexParam' after creation?BEGIN DBMX_XMLINDEX.REGISTERPARAMETER('indexParam', 'xxxxxxxx'); END; /
SQL> set long 1000 SQL> SQL> select paramstr 2 from xdb.xdb$xidx_param_t 3 where param_name = 'MYINDEXPARAM' 4 ; PARAMSTR -------------------------------------------------------------------------------- PATH TABLE po_ptab PATH ID INDEX po_pidx ORDER KEY INDEX po_oidx VALUE INDEX po_vidx PATHS(NAMESPACE MAPPING(xmlns:p="http://www.example.com/IPO")) GROUP MASTERGROUP XMLTABLE PO_TAB ('/p:PurchaseOrder' COLUMNS REFERENCE VARCHAR2(30) PATH 'p:Reference', REQUESTOR VARCHAR2(30) PATH 'p:Requestor' ) GROUP ITEMGROUP XMLTABLE ITEMGROUP_TAB ('/p:PurchaseOrder/p:LineItems/p:LineItem' COLUMNS LINENUMBER NUMBER(38) PATH '@p:ItemNumber', QUANTITY NUMBER(38) PATH '@p:Quantity', DESCRIPTION VARCHAR2(256) PATH 'p:Description')
After you add it to an index, you can also view the content in USER_XML_INDEXES. PARAMETERS (XML format).
-
How to display a list of categories of products with images of each category?
How to display a list of categories of products with images of each category? I want each category in the list to display a thumbnail of this category, as such: http://bevisco.businesscatalyst.com/thumbnail%20hover%20test/product%20menu%20look.jpg
I have my categories and some loan products from, but could not get the categories to display an image list. I tried to make a web application and that has worked, as such, but I don't want to have to do all my web app Articles, ecommerce products gives me more features for images like poplets. I am able to style the list with css myself, but don't know how to create a tag that displays the names of the categories with a relevant image for each.
Is the test site for now: http://bevisco.BusinessCatalyst.com/home
http://bevisco.BusinessCatalyst.com/product-menu-test
I would really appreciate if someone could help point me in the right direction.
Hello
When you create a catalog, you have the option to set a thumbnail for it. What list of catalogues BC offers 2 choices:
-{module_catalogue, #}-this generates a single catalog with its associated image, see http://bevisco.businesscatalyst.com/product-menu-test
-{module_cataloguelistdump, #}-as its name suggests, it's just a standard dump, view items in a list, so you can't really do much to customize this with other bc tags
(indeed, you are free of this style somehow you choose via css and javascript. Then you might have a script that reads the contents of each item in the list (for example seats/accessories/shop) and uses it to call the appropriate image in the folder where you store all the images in the catalogue (yourdomaing.com/catalogueimages/ for example) then the script just add 'accessories' or 'shop' to
# If scripts of your way to do it is too much hassle, simply listing each catalog separately can be the best option, because it is actually completely in the interface of British Colombia through a few clicks.
-
How to display a string in number?
I have a table with a colunm containing country names (countryVis). I'm creating a query to return the details in the table, but for the columns of this I want to go back to the following: USA as '1', '2' India, China as '3' and the Spain as "4".
At present, the countryVis data type is varchar2. I try to use a decode statement to display each country as a number. This is my attempt so far. I try only for a change of the USA in number in this case.
From what I've read on the decode my statement should do the following:select "IT220_HOLIDAYDETAILS"."HOLCODE" as "HOLCODE", "IT220_HOLIDAYDETAILS"."HOLDESCRIP" as "HOLDESCRIP", "IT220_HOLIDAYDETAILS"."COUNTRYVIS" as "COUNTRYVIS" from "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS" decode (CountryVis,'USA','USA'='1');
If column = USA CountryVis may
USA = 1
Otherwise do nothing.
Is this correct or am I wrong? The error I get from this code is > > > > ORA-00933: SQL not correctly completed command
Thanks in advance!Hello
Try aliasing instruction box like that...
SELECT hdt.HOLCODE, hdt.HOLDESCRIP, hdt.COUNTRYVIS, CASE hdt.COUNTRYVIS WHEN 'USA' THEN '1' WHEN 'India' THEN '2' WHEN 'China' THEN '3' ELSE '?' END me_country FROM IT220_HOLIDAYDETAILS hdt
Your original SQL was wrong because you had your decode incorrect syntax and that's after the from clause.
See you soon
Ben
-
Displays each result on its own page?
I create a blog based on a guestbook format.
Basically at the moment I have a page 'Add Post', that stores the details of the message in a database and then when you go to the index page, all posts, including the name of the author etc. are dumped into the order.
But I want it to be more like a blog, how do I do to display each individual entry on its own page. So, positions are listed on the home page, you click on the title and it will take you to a page with only this post?
And another question, how would I go on display five posts on the index rather than each page? And then being able to click on "older posts" link to see the previous five positions?
Thank you.
Hello
You create a new page of cfm, whose responsibility is only to display the post... lets call it display.cfm.
This page has the ID of the post... need an ID that is linked to the entry of the database (can be as a primary key in the table that you store messages).
All you have to do for this page to have the necessary info to display the message is to pass a parameter in the URL (called query string)... something like this \display.cfm?id=1
You get this ID... Select the post with this ID from the database and you're done.
On your home page, you must create the link to this page dynamically as the id will change for each entry.
If the display page is always the same, but the content changes according to the code passed to the query string.
With regard to the display of five post...
You can do it in the select database... or if you have a table of entries display you only the first 5
Then you have a link to the same page, perhaps with a different query string that displays all the...
If you have any other questions just ask.
Kind regards.
-
Should how to display my thumbnail image I choose?
I have a mySql database with a few of many records for each of my images. One of the data fields is thumbnail url: I want to view all the thumbnails on the screen.
It is best to do A or B:
A
Use a datagrid control and a custom converter to display each image
or B
get all the data in a table, browse and view thumbnails on the screen.
all advice is appreciated, I already had the url string thumbnails appear in the data grid, but how do I get the actual thumbnail to appear instead?
Your TileList might look like this:
Then in a script block, you can have a function like this:
private void setImages(thumbnailURLs:ArrayCollection): void {}
var ac:ArrayCollection = new ArrayColleciton();
for each {(var URL: String en thumbnailURLs)}
var image: Image = new Image();
image.source = URL;ac.addItem (image);
}_myImages = ac;
}with a variable like this:
[Bindable]
private var _myImages:ArrayCollection = new ArrayCollection();Hope this helps,
T.K.
-
DIAdem programming - how to access each data cell in the table?
How access us each cell in the file of PDM current access using the script of DIAdem environment? Could someone send me a code example?
Thank you
Hi NiCoder,
If you can load these channels as digital channels instead of the string channels, then you can use the function "G" use in the channel Finder to retrieve a specific bit value of a digital channel (which contains integers). You can alternatively convert all strings string channels to digital channels, and then use the function 'G' out of all the values 0 or 1 of the 5th bit of the values of each channel. Running this command with ChnCalculate() runs much faster than access to each value of the layer one at a time, although you can use the GetB() function with each value in a loop of the channel.
Brad Turpin
Tiara Product Support Engineer
National Instruments
Maybe you are looking for
-
Non-administrator iTunes install
Hi all I am a network administrator and all our users have no administrator rights. Also, it is not possible to give them Admin rights. With the latest version of iTunes, the installation seems to require a little final configuration at the start of
-
Bookmark profile on empty office, cannot sync mobile
I got the MixiDJ research/toolbar malware on my desk with tracks in windows 7. I deleted the program from the Control Panel, but she came back. After reading a lot of info forum, I ended up resetting Firefox but... they do not mention that you need t
-
Need SD Card reader Driver for my Satellite A200-21dts
HelloI would like to get the Texas Instruments divrer to my laptop SD card reader.My laptop is Toshiba Satellite A200-21dts. Thank you
-
Vista - Error Code: 80041006 (could not install KB970158)
Original title: 80041006, KB970158 I try several time to install the update KB970158 through windows update, but after restart, it said installation was unsuccessful and begins to roll back. Vista Home 32-bit operating system Thank you
-
Programs endangered after the installation/use when the computer is restarted.
I just got this Acer laptop with Vista Home Basic Edition about 4 weeks ago. For the first two weeks, everything worked well, could download, install and run programs without any problems. However, I now have problems. I can download, install and run