How to get the correct length...removing appended extra ascii characters
I have a table fs_lg_partgroups, having the columns description,subgroupname.
I have a query like this..
select description,length(description) from fs_lg_partgroups where subgroupname='FORMULA226';
Then i got the output as
formula226 and the length is 42. Even though there are 10 characters only.
I came to know that some ascii characters are appended to description values, so it is showing the length like this.
But i don't know how to remove those ASCII characters from description column for all rows to get the exact length.
Please can u help me..
If you have used char data type then use varchar2 datatype instead of char datatype for description column.
Learn about char and varchar2 datatypes here.
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c13datyp.htm#7223
Similar Messages
-
The dates my photos were taken are not incorrect. Any suggestions on how to get the correct dates back?
Thank you Winston. This works and I can adjust several photos at the same time.
-
How to get the correct size of the loaded swf file?
final public class main extends Sprite
public function main()
loaderInfo.addEventListener(Event.COMPLETE, _onLoadCompleted);
private function _onLoadCompleted(event: Event): void
var tw: int = stage.width;
var th: int = stage.height;
var tsw: int = stage.stageWidth;
var tsh: int = stage.stageHeight;
Above is my simple as3 project in flex builder 3.
My screen resolution is 1920*1080, when debugging, the swf is stretched to the full client area of the IE, but the stage.stageWidth is 500 and the stage.stageHeight is 375, both the stage.widht and stage.height are 0, who can tell me why and how to get the right size of the swf file, named the client area size of the IE in this situation?
Thanks very much!The HTML wrapper might resize the SWF later, so wait a frame and check stageWidth/stageHeight again.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
How to get the correct value from check box
hi guys,
here is a program to read data from IKPF.
with the user tick on the check box, the program will retrive
corresponding records based on the inventory counted (zstat) status.
however i don't get the correct output with the following selection.
Please advise where is going wrong. Thank you.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
b~menge into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat3 OR
a~zstat = v_zstat2 OR
a~zstat = v_zstat1 )
and a~gjahr = p_gjahr.hi guys,
i'll use the following to get the desire result. This is a bit "stupid" but at least it gives me the correct result.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
IF ph_ncnt = SPACE AND ph_pcnt = SPACE
AND ph_acnt = SPACE.
message I799(SA) with 'Which data to print?'.
stop.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'
AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat2 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat2 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat1
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat2
and a~gjahr = p_gjahr.
ELSEIF ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat3
and a~gjahr = p_gjahr.
ENDIF. -
How to get the time length from send record command to record video really?
I have two buttons. Record/Stop
I press Record button to record the video and press Stop
button to stop recording.Now,I spend 1986 ms from press Record
button to press Stop button.
But the flv file's length is 1920 or 1910 or 1915 ms.
So I want to get the time length from send record command to
record video really.
Can you give me some suggests.
Thanks!maybe you have lag in publishing.... are you try watch de
NetStream.liveDelay() method?
or start counting when NetStream.onStatus has
"NetStream.Record.Start" and "NetStream.Record.Stop" in information
objects.... -
How to get the real length of a 3D room
Hi, I want to built a 3d room. When I import a obj file, the vector3f length does not equal to the real length(much longer than the real one), I know there must be relation between them, but how I can get the relation?
for example:
T3Droom.setTranslation(new Vector3f(0.7f,1f,0.5f));
How many metres the 0.7f equals to?
thanks a lotjavax.mail.Address[] addrs= m.getFrom();
Address a = addrs[0];
if (a instanceof InternetAddress &&
((pers = ((InternetAddress)a).getPersonal()) != null)) {
String addr = ((InternetAddress)a).getPersonal();
} else
addr = a.toString();
this 'getPersonal()' is the thing you need. -
How to get the correct client certificate used in the two way ssl
how to export the certificate in browser to the correct client certificate format needed by the WLSSSLAdaptor?
I can export the certificate in browser to p12 or pfx format, but how to retrieve the private key from it and convert to PKCS#8?
anyone did this before?
ThanksHi,
Use the event after_user_command.When the user clicks any other buttons in the toolbar,this event will be triggered after the processing and you can handle the sub-total for % columns here.
Regards,
Archna Raja -
How to get the correct stored procedure in oracle
Hi sir,
i am having one stored procedure which i converted from sql it's compiled successfully.
create or replace
PROCEDURE Spvalidateholiday1
v_pidate1 IN Date DEFAULT NULL ,
v_piEmpid IN VARCHAR2 DEFAULT NULL ,
v_pidate2 IN Date DEFAULT NULL ,
v_poRetVal OUT Number
--RETURN NUMBER
AS
v_date3 VARCHAR2(20);
v_date4 VARCHAR2(20);
v_date5 VARCHAR2(40);
v_date6 VARCHAR2(40);
v_scode VARCHAR2(10);
v_dayoff1 VARCHAR2(20);
v_dayoff2 VARCHAR2(20);
BEGIN
v_date5 := To_Char(To_Date(v_pidate1,'YYYY-MM-DD','D'));
v_date6 := To_Char(To_Date(v_pidate2,'YYYY-MM-DD','D')) ;
SELECT Shift_Code
INTO v_scode
FROM Employee
WHERE Emp_ID = v_piEmpid;
SELECT WeeklyOff1
INTO v_dayoff1
FROM Shift
WHERE Shift_Code = v_scode;
SELECT WeeklyOff2
INTO v_dayoff2
FROM Shift
WHERE Shift_Code = v_scode;
SELECT dayid
INTO v_date3
FROM Weekly
WHERE dayss = v_dayoff1;
SELECT dayid
INTO v_date4
FROM Weekly
WHERE dayss = v_dayoff2;
--select @date3=dayid from Weekly w join Site_Param s on w.dayss=s.WeeklyOff1
--select @date4=dayid from Weekly w join Site_Param s on w.dayss=s.WeeklyOff2
IF ( v_date5 = v_date3
OR v_date6 = v_date4
OR v_date4 = v_date5
OR v_date3 = v_date6 ) THEN
BEGIN
v_poRetVal := 0 ;
END;
ELSE
BEGIN
v_poRetVal := 1 ;
END;
END IF;
RETURN; --v_poRetVal;
END;
but getting error:
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SPVALIDATEHOLIDAY1' ORA-06550: line 1, column 7: PL/SQL: Statement
could u check the stored procedure?
thanksHi sir,
i am calling it my application
that is used like this
Dim hshParam As New Hashtable
hshParam.Add("Empid", '00000002')
hshParam.Add("date1", '2012-10-25')
hshParam.Add("date2", '2012-10-27')
intRetProc = objDataTier.ExecuteStoredProcedureWithReturnT("Spvalidateholiday1", hshParam)
and here is this method written:
Public Function ExecuteStoredProcedureWithReturnT(ByVal sStroredProcedureName As String, ByVal phshTbl As Hashtable) As Integer
Dim cmdCommand As OracleCommand
Dim prmParmOutput As OracleParameter
Dim pParam As IDictionaryEnumerator = phshTbl.GetEnumerator
Dim sKey As String, sValue As String
Try
ExecuteStoredProcedureWithReturnT = True
OpenDbConnection()
cmdCommand = New OracleCommand(sStroredProcedureName, conConnection)
cmdCommand.CommandType = CommandType.StoredProcedure
cmdCommand.CommandTimeout = 0
While pParam.MoveNext
sKey = "v_pi" & pParam.Key
sValue = pParam.Value
cmdCommand.Parameters.Add(New OracleParameter(sKey, sValue))
End While
prmParmOutput = New OracleParameter
cmdCommand.Parameters.Add(New OracleParameter("v_poRetVal", SqlDbType.Int)).Direction = ParameterDirection.Output
' If
cmdCommand.ExecuteNonQuery()
ExecuteStoredProcedureWithReturnT = CInt(cmdCommand.Parameters("v_poRetVal").Value)
Catch ex As Exception
ExecuteStoredProcedureWithReturnT = 2
Throw ex
End Try
End Function
now tell me is it correct? -
How to get the Subject of Mail Greater than 50 Characters length
Hi Friends,
I am sending a mail by using the Class Interface cl_document_bcs and method create_document
there the Parameter i_subject is of 50 characters length
but the client need the subject of the mail nearly 100 chars lenght
Please guide me how to go furthur
are there any other Methods to go furthur to have subject of the mail greator than 50 characters lenght
Thanks in Advance
GaneshHi Ganesh
Its not possible to use more thatn 50 characters in send mail step for subject. May be you can try with the FM SO_NEW_DOCUMENT_ATT_SEND_API1 with more than 50 line in the subject.
Regards
vijay -
How to get the correct sql command in oracle?
Hi sir,
i am using this query in sql that is :
SELECT C.*,ISNULL(P.Comp_Name,'') + ' (' + ISNULL(P.Comp_ID,'') + ')' Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID Where C.Comp_ID='004'
so i am getting in parent column value like this: "PARIS GROUP (001)"
but the same command i converted in sql developer that is:
SELECT C.* ,NVL(P.Comp_Name, ' ') || ' (' || NVL(P.Comp_ID, ' ') || ')' as Parent FROM Comp_Master C LEFT JOIN Comp_Master P ON C.Parent_ID = P.Comp_ID WHERE C.Comp_ID ='004'
but not getting in parent column value its coming only ( )
help me.
thanksWelcome to Oracle.
It has manuals.
http://tahiti.oracle.com/
Choose your version, which you continue to keep a mystery
E.g.
http://www.oracle.com/pls/db112/homepage
Including Oracle SQL syntax
http://docs.oracle.com/cd/E11882_01/server.112/e26088/toc.htm
Which you will find useful since Oracle does not run Microsoft SQL as you continue to find over and over again.
And there is a 2 day getting started as a developer guide, which you appear to desperately need,
http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm
If you have any specific questions about anything you read in there, come back in a couple of days after you have finished reading them. -
Urgent Please regarding how to get the correct name from it,
I have asome input values say {a=1,b=2,c=3,d=4} in bag A .Now I need to display the name "a" in one column of the table and its value "1" in another column in a jTable so can some one help me out as I have to turn in the stuff tomorrow.
Thanks in advance.I have asome input values say {a=1,b=2,c=3,d=4} in
bag A .Now I need to display the name "a" in one
column of the table and its value "1" in another
column in a jTable so can some one help me out as I
have to turn in the stuff tomorrow.
Thanks in advance.Looks like you have spent too much time in the pub! The only way you will get this done is if someone does it for you. Since your specification is so poor (you don't say what form your bag takes) I suspect nobody will even attempt to do it for you.
Cut your losses. Go back to the pub and accept that you will fail this particular assignment.
P.S. Start the next assignment in plenty of time.
P.P.S. Marking something as 'urgent' is normally counter productive. -
How to get the correct result when I access mxml file in address bar in IE?
os: windows xp
web server: tomcat 5.5
lcds version: 2.6
One week ago, I installed lcds2.5 in my coumputer. At that time, when I type address http://localhost/lcds/test.mxml in address bar of Internet Explorer, the web server return the result of test.swf.
I upgraded lcds from 2.5 to 2.6 this morning, and then when I type http://localhost/lcds/test.mxml in IE address bar again, the server return the source code of text.mxml in the web page, which is not I expected.
Why the web server don't handle the *.mxml file like in lcds2.5? How can I resolve this problem?Hi,
Webtier Compiler is which is no longer part of LCDS starting with the version 2.6. However you can install it if you want, read the instructions from this link http://labs.adobe.com/wiki/index.php/LiveCycle_Data_Services:Setting_up_an_SDK,_Compilers ,_and_Flex_Builder -
How to get the real client ip from HttpClusterServlet?
Hi All,
WL 6.0 sp2 on Linux.
When HttpClusterServlet is used, invoking HttpServletRequest.getServerName()
will return the server name of the proxy server where HttpClusterServlet
installed,
rather than the actual client's ip which we are interested in.
Anybody knows how to get the correct client ip through the proxy server? Any
workaround? Or does a patch exist?
Any help will be appreciated,
Lynch
Sorry I mean HTTPServlet.getRemoteAddr()
"Lynch" <[email protected]> ¼¶¼g©ó¶l¥ó
news:3baea0c5$[email protected]..
> Hi All,
>
> WL 6.0 sp2 on Linux.
>
> When HttpClusterServlet is used, invoking
HttpServletRequest.getServerName()
> will return the server name of the proxy server where HttpClusterServlet
> installed,
> rather than the actual client's ip which we are interested in.
>
> Anybody knows how to get the correct client ip through the proxy server?
Any
> workaround? Or does a patch exist?
>
> Any help will be appreciated,
> Lynch
>
>
-
How to get the corract accrual for OID: Bonds Premium&Discount amortization
Hi
I would like to know if somebody knows how to get the correct accrual values for the OID amounts. As you know is easy to get the correct position flows for the base amount, the discount and the monthly interest for each paid but I cant get the correct amortization for the discount. Following the FAS91, the correct amortization for this discount (OID) is getting the calculation of the effective interest amount with base: Total amount minus the effective interest amount with base incluying the discount of it.
I hope one of you knows how to do it.
Regards
CarlosHi
I would like to know if somebody knows how to get the correct accrual values for the OID amounts. As you know is easy to get the correct position flows for the base amount, the discount and the monthly interest for each paid but I cant get the correct amortization for the discount. Following the FAS91, the correct amortization for this discount (OID) is getting the calculation of the effective interest amount with base: Total amount minus the effective interest amount with base incluying the discount of it.
I hope one of you knows how to do it.
Regards
Carlos -
How to get the string's byte length?
I have some string,I want to get the string's byte length,how
can do it?
for example:
<cfoutput>#len('hihi,这是测试')#</cfoutput>
output is 9
I want to get the byte length is 14, how can i get it?
Thanks.>> Fair cop. I didn't realise that asc() returned the
codepoint rather than the
> actual character code.
>
> and what would be the difference?
Oh, sorry, whatever the term is (I'm crap with jargon). The
value returned
by asc() for those chars was only two bytes (ie: four hex
digits). I
didn't realise there was more to it than that, and that
2-byte value maps
to some other THREE byte value. I need to do some reading...
> that's what both cf & java counted as the length.
CHARACTER length, sure. No-one's disputing that. On the other
hand,
no-one's asking about it, either.
> by adding a BOM you've already effected the encoding,
which may or may not
> match the original. so you still don't know how many
bytes were in the original
> string.
[groan]
Yes, that's a reasonable strawman there. I was only putting
it in a file
so I could save it and check the number of bytes occupied by
the data.
Clearly... CLEARLY... the OP is not asking for a character
length of that
string. They've said as much.
I copy and pasted the string from their post, and used it as
a
demonstration of how "nine" is not the right answer for the
BYTE LENGTH of
that string. Whether or not the original string was UTF-8,
UTF-16 or
special-marmoset-encoding, it almost certainly was NOT in a
fictitious kind
encoding in which each of those particular characters only
occupied one
byte each, which would mean that "nine" is the correct answer
to the
question.
When I copied those characters from either the web browser
for from my
text-based news agent, notepad identified them (and rendered
them
correctly) as UTF-8, so I'm fairly confident they ARE UTF-8.
Of course
this could be down to some intermediary encoding (pasting
them in to the
original posting, for example, via some encoding-transforming
mechanism),
but Occam's Razor suggests the original question was from a
UTF-8 POV.
But maybe we should quit speculating and ask the OP. Unless
they've
buggered off in despair of how drawn out all this is getting.
For which I
would not blame them.
Adam
Maybe you are looking for
-
Why won't my MacBook connect to my wireless internet at home?
I'll try to give as many details as I can: I'm a freshman in highschool & have a MacBook from my school that I use for the year. It's just a regular MacBook, not an air or anything. In class the other day, my computer froze up completely, so I used t
-
How to update a table of contents when the feature "update table of contents" is unavailable?
Hello folks, I've been struggling all morning with this issue and am completely desperate. First, some info: - I am making a spanish versions of an english documents: everything in the original doc was then edited, including TOCs. What I got at first
-
we have installed SRM SERVER and could login it but couldn't create purchase order,purchase request and so on. even no business menu. now, I want know how can I logon srm and have business menu. tks best regard!
-
E-Mail processing error every 60 seconds, but still mails are handled?
Hi Guys, My "Operations Mnager" Event log file on the SCSM 2012 R2 Server is filling with the one error: Log Name: Operations Manager Source: SvcMgr Inbound Email Event ID: 27017 Task Category: None Level: Error Keywords:
-
Could an iWeb blog page be modified to...
...parse wordpress entries so that they appear "iWeb'sh" even though being created and maintained in Wordpress?