Trim function not working in PL/SQL ( XE 11g R2 )
----PLSQL-----------------------------------------------------------------------------------------------------------
create or replace
procedure import_artikli
as
v_pos number;
v_t number;
v_str varchar2(10000);
v_trm varchar2(10000);
begin
for c1 in (select * from brisi_import_artikli order by rbr) loop
v_t := instr(c1.text,chr(9));
dbms_output.put_line(to_char(v_t));
v_str := substr(c1.text,0,v_t);
v_trm := trim(v_str);
dbms_output.put_line(replace(v_trm,' ','|'));
end loop;
end;
--------DBMS OUTPUT-----------------------------------
19
W|940/25||||||||||
19
13.0460-7194.2||||
v_trm variable never gets trimmed. Checked with debugger too. It just leaves whitespaces.
Help!
Obviously. You search for CHR(9) - tab. Then you do substr and specify length as tab position. Therefore substring includes tab - ends with a tab. Obviously trim spaces will not remote them. Anyway, change:
v_str := substr(c1.text,0,v_t);to
v_str := substr(c1.text,1,v_t - 1);and you'll be OK.
SY.
Similar Messages
-
Substr function not working in coldfusion sql
Hi all,
I am using coldfusion 7.0.2 with oracle 10g. I've the
following simple query
select substr(colname,1,3) from tablename
this query works fine if i run it using TOAD or SQLPLUS but
when i run this query in coldfusion script i get the following
error
[Table (rows 9 columns SUBSTR(colname,1,3)):
[SUBSTR(colname,1,3): coldfusion.sql.QueryColumn@fc7be7] ] is not
indexable by SUBSTR(colname
can anybody tell me why it doesn't work in coldfusion but
works fine in sqlplus?
thank youThere's no such thing as "coldfusion sql" (sic). Everything
between the
<cfquery> tags is simply resolved (ie: CF runtime
statements between
pound-signs) and passed straight to the DB drivers, and
thence to the DB
itself. CF does no SQL processing at all.
Your error kind of suggests a syntac error AFTER the query
has been
executed though.
Could you post some code, and point out which precise line is
erroring?
Adam -
Not able to sign into Blackberry Protect. Backup and Restore function not working. Message is: "Your device isn't associated with a Blackberry ID." My Blackberry Messenger and Blackberry World is working fine so I am sure its not an ID issue on the phone. I can sign into Link, Blackberry.com and Protect. I see my device in Protect but cannot send messages or view it on a map. Times out with cannot reach device message. BB Protect on Device has a swirling circle beside the on/of switch. Cannot turn off.
I have deleted Link and re-installed.
I have reset phone to default(factory) and signed in.
OS level is 10.2.1.3062
BB Link is 1.2.3.56
Solved!
Go to Solution.I managed to figure this out myself. I had to delete the device from the Blackberry Protect website. protect.blackberry.com. I wiped my device again and signed in with my Blackberry ID. I dont know if the step of wiping was necessary as I did not try my backup with the current configuration on the device following the delete. Restore is in progress for me!
-
HTML not working in PL/SQL block..Help me ASAP
declare
l_col VARCHAR2(30) :=to_number(to_char(to_date('01-feb-2011','dd-mon-yyyy'),'dd'));
CURSOR name_cur IS
select name
from od_shift_schedule
where year=2011
and (month)=('Feb')
and decode(l_col,1,"01",2,"02",3,"03",4,"04",5,"05",6,"06",7,
"07",8,"08",9,"09",10,"10",11,"11",12,"12",13,"13",14,"14",15,"15",16,"16",17,"17",18,"18",19,"19",20,"20",
21,"21",22,"22",23,"23",24,"24",25,"25",26,"26",
27,"27",28,"28",29,"29",30,"30",31,"31")='W';
BEGIN
DELETE FROM nam;
commit;
FOR i IN name_cur
LOOP
dbms_output.put_line(i.name);
htp.p('<b>Employee '||i.name||' has been ticked.
</b><br/>');
EXECUTE IMMEDIATE 'insert into nam(name) values('''||i.name||''')';
commit;
END LOOP;
end;Kindly help me with this
If i'm wrong here kindly help me that how can i place a display messageRe: HTML not working in PL/SQL block..Help me ASAP
Using the community discussion forums for urgent issues is rude and a violation of the terms and conditions.
http://www.oracle.com/html/terms.html
>
4. Use of Community Services
Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle
>
Also please read the FAQ on how to ask questions.
SQL and PL/SQL FAQ
>
2) Thread Subject line
Give your thread a meaningful subject, not just "help please", "Query help" or "SQL". This is the SQL and PL/SQL forum. We know your question is going to be about those things, make it meaningful to the type of question so that people with the right sort of knowledge can pick it up and those without can ignore it. Never, EVER, mark your subject as "URGENT" or "ASAP"; this forum is manned by volunteers giving their own time to help and your question is never urgent or more important than their own work or than other people's questions. It may be urgent to you, but that's not forum members issue. -
Copy/paste function not working in Firefox 22. Always good in previous versions
Copy/paste function not working in Firefox 22. Always good in previous versions editions
Well I've uninstalled FF22, thanks for the suggestion.
Chrome works perfectly with ZA and C&P. -
Why is the scroll function not working after accessing the voice feature in settings?
Why is the scroll function not working after accessing the voice feature in settings?
For some prerecorded audio files the Transpose slider will not work reliably. I found no clear pattern, when it does and when not.
If all fails, create a loop from the audio file. Select the region in the track and use the command "File: Add region to Loop library".
Set the current key and tempo, name the loop, and save the loop.
Now add it from the loop browser to a new track and delete your old track. The search field in the Loop browser will help you to find the loop quickly.
You will be able to transpose the sample as described above, like a regular loop.
For example - a audio file turned into a loop and transposed: -
Syntax highlighting not working on PL/SQL developer tool
Hello,
Syntax highlighting is not working on PL/SQL developer tool using the beautifier. When I go set Syntax highlighting parameters (from EDIT>PL/SQL Developer Beautifier Options > User Interface> Editor> Syntax Highlighting ) and click apply, the changes are not reflected in SQL code in the SQL window. Other feautures in the beautifier such as Fonts, Window types are working fine.
Please help me with this issue.
Thanks!!
ShreejitAs this is not an Oracle related question (let alone Oracle SQL or PL/SQL), and as you've been given a link to the relevant website... I'll now lock this thread.
-
MDX -Children count function Not working in Case statement
Hi,
I am trying to create set when you slice with the Hierarchy member is leaf level , I want a output only that Leaf level .
and When I slice with the parent level , it has to give all the members below that parent level.
But the problem here is when I select child member or leaf member , The first condition in the Case is not working
WITH SET
TESTSET AS
CASE
WHEN
[Dimension].[Hierarchy].currentmember.children.count<0
THEN
[Dimension].[Hierarchy].currentmember
ELSE
DESCENDANTS([Dimension].[Hierarchy].Currentmember,,AFTER)
END
SELECT
WBSSET ON 1,
{} on 0
FROM
(SELECT {[Dimension].[Hierarchy].&[10]} ON COLUMNS FROM [CubeName])
Thanks,
SantoshHi Santosh,
I don't think Children count function not working in case statement, I have tested it on my local environment, here s the sample query for you reference.
with member
testset as
case
when
[Geography].[Geography].currentmember.children.count<10
then "X"
else "OK"
end
select testset on 0,
{[Geography].[Geography].[Country].members} on 1
from
[Adventure Works]
In your scenario, the issue might be caused by the query isself, you can try to use IsLeaf Funcion to achieve your requirement. Please refer to the links below.
http://msdn.microsoft.com/en-us/library/ms144932.aspx
http://www.databasejournal.com/features/mssql/article.php/3633696/MDX-Operators-The-IsLeaf-Operator--Conditional-Logic-within--Calculations.htm
http://www.mdxpert.com/Functions/MDXFunction.aspx?f=22
Regards,
Charlie Liao
TechNet Community Support -
Palm Desktop 6.2.2. and Lookup function not working in Windows 7
Palm Desktop's lookup function not working in Windows 7 64bit. Please help.
Post relates to: Centro (Verizon)
This question was solved.
View Solution.I was able to solve this by unchecking compatibility mode and setting the application to run as administrative.
-
Send & Recieve functionality not working with WebDav after installing Acrobat XI
Send & Recieve functionality not working with WebDav after installing Acrobat XI for PDF. Acrobat XI is complete installations(Trial Version).
Hi Kiro ,
Did you try opening that file in any other browser ?If not ,please try doing that once and see if that works for you.
Try Repairing Acrobat once and see if that helps.
Launch Acrobat>Navigate to Help>Repair Acrobat Installation.
Regards
Sukrit Dhingra -
Keyboard + mouse functions not working
After updating InDesign CC 6-days ago started to have issue with all keyboard + mouse functions not working ex. shift key does not constrain proportions when scaling. A restart fixed the issue thr first time. Today I have installed latest update and shut down and restarted several times does not fix issue. On a MacBook pro running OS X Mavericks 10.9.2.
Disconnected extrenal devices ie keyboard and Wacom Bamboo tablet and restarted computer seemed to correct the issue.
-
In my ipad zoom function not working..some day before it worked,but when i double pinch with my three fingers it zooms negligible, wat to do?plzz help me..
It works when I reset my all settings...
Settings>general>reset>reset all settings
It never delete ur all contacts and any others,but ur wallpaper and wifi connection will change..it can be as before... -
HT204168 touch screen function not working when using facetime
Why is my iPad touch screen function not working when using FaceTime?
Hi megascones,
I apologize, I'm a bit unclear on the exact nature or scope of the issue you are describing. If you are having issues with the touch screen on your iPad, you may find the troubleshooting steps outlined in the following article helpful:
If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
Regards,
- Brenden -
Why is my touch screen function not working when using facetime
Why is my touch screen function not working when using facetime
Hello megascones,
After reviewing your post, it sounds like the screen is not responding to touch in one app. I would recommend that you read this article, it may be able to help the issue.
If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
Restart your device. If you can't restart, reset your device.
Thanks for using Apple Support Communities.
Have a nice day,
Mario -
I purchase some apps, my son deleted some. But I have download again from cloud. But some functions not working ask me to pay again. How can I use functions without paying again. Thank you
Search around on the app settings and see if there's a "Restore purchases" option.
Maybe you are looking for
-
Tag found instead of tag IDOC BEGIN=
I am doing file to IDOC. I see this error in SXMB_moni. Error: MSGGUID 55F5AB4083AC11DDA9030050569C7B40 Tag found instead of tag IDOC BEGIN= What could be the issue.... Edited by: Harsha reddy on Sep 17, 2008 4:39 AM
-
Double Accounting enteries during invoice cancellation
Hi, we are following the below mentioned sales process: VA01-VL01N-VF01-J1IIN. Accounting enteries passed are: 1.From VF01 Customer Dr To Sales revenue To Excise Suspense Ac To Edu cess To SECess 2.From J1IIN Excis epayable Dr To Excise duty payable
-
Differences between javacard 2.1.2 and 2.2.0
Hi to all, Does anyone of you may list the differences between the releases 2.1.2 and 2.2.0 IMy question is all due to the fact that I found two cards that use these two diffrent releases. Their cost is similar...but I which is best? Are there big di
-
My iPhone been in water and as know shut off what's the best course of action
My iPhone as been in water what's the best course of action it as shut down
-
I have been following these chrome and flash issues for over 6 months. All the problems and fixes that have been previously mentioned in threads I have personally tried, some worked and all reappeared within a a few days or hours. I did notice one th