Type casting problem

Hi all

I have a problem of Type casting. Could yu if you please help me solve.
I am trying to initialize the variable v with sysdate (' Mon - dd - yy:hh:mi:ss'), but was unable to initialize. I've been able to do in the body, but is it not possible to do so in the context of the statement?
I could do it like this
DECLARE 
  v varchar2(25);
BEGIN
  SELECT to_char(sysdate,'mon-dd-yy:hh:mi:ss') INTO v FROM dual;
  DBMS_OUTPUT.PUT_LINE(v);
END;

Output looks like this: jan-19-12:04:32:11
But how to do it as part of the declaration?
DECLARE 
  v varchar2(25);
  v := to_date(sysdate, 'mon-dd-...') ? ? ?
BEGIN
    DBMS_OUTPUT.PUT_LINE(v);
END;
THX
Rod.

Hello

I think you want something like this:

DECLARE
  v varchar2(25):= to_char(sysdate, 'mon-dd-yyyy');

BEGIN
    DBMS_OUTPUT.PUT_LINE(v);
END;

Tags: Database

Similar Questions

  • Impossible object type cast 'System.Boolean' to type 'System.String '.

    Whenever I boot, I get the message on the impossible object of type casting office "System.Boolean" in type 'System.String '. How can I erase this?

    It's because of one of your applications at startup, open start and find MSCONFIG or MSCONFIG.msc and in boot menu deselection those applications that you may think caused this problem and restart your PC.

  • Impossible object type cast 'VMware.Vim.ClusterVmHostRuleInf o' type 'VMware.Vim.ClusterAntiAffinityRuleSpec '.

    Hello

    I was surprised by this error. Any who see it this way? I was doing some affinity for the cluster rules. At the beginning when there was no vmgroups, hostgroups, no virtual machine to the rules of the host, this command worked very well, that no errors were generated. According to the rules of antiaffinity of vm-virtual machine, I did a few groups of MV, the host groups and created AA rules for this cluster as well via the api.  Everything has not worked well, no errors when creating. But after a few days, I wanted to add 1 more AA machine vm-virtual rule. And I received this error, no idea why this would come to the top? This error appears, but the rule is created anyway.

    PowerCLI C:\ > XYZ New-DrsRule-Cluster - name AA-vm1-vm2 - KeepTogether: $false VM - vm1, vm2
    New-DrsRule: 14/05/2012 09:30:23 impossible object type cast New-DrsRule ' VMware.Vim.ClusterVmHostRuleInf
    o ' to type 'VMware.Vim.ClusterAntiAffinityRuleSpec '.
    Online: 1 character: 12
    + New-DrsRule < < < < - XYZ - name AA-vm1-vm2 Cluster - KeepTogether: $false VM - vm1, vm2
    + CategoryInfo: NotSpecified: (:)) [new DrsRule], ViError)
    + FullyQualifiedErrorId: Client20_ClientSideTaskImpl_ThreadProc_UnhandledException, VMware.VimAutomation.ViCore.Cm
    dlets.Commands.NewDrsRule

    Thank you

    Greg

    BTW.

    Why he would mount "VMware.Vim.ClusterVmHostRuleInfo"?

    "An object of ClusterVmHostRuleInfo identifies virtual machines and the host groups that determine the position of the virtual machine. Virtual machines and the host referenced by a rule of VM-host must be in the same cluster. »

    But it is a rule antiaffinity VM - VM, not a vm host rule.  I still have no idea why the error comes out but I used onyx to see if I have the same problem when you do it with the api:

    $spec = new-Object VMware.Vim.ClusterConfigSpecEx
    $spec.rulesSpec = new-Object VMware.Vim.ClusterRuleSpec [] (2)
    $spec.rulesSpec [0] = new-Object VMware.Vim.ClusterRuleSpec
    $spec.rulesSpec [0] .operation = 'Add '.
    $spec.rulesSpec [0] = new-Object VMware.Vim.ClusterAffinityRuleSpec .info
    $spec.rulesSpec [0].info.enabled = $true
    $spec.rulesSpec [0].info.name = "AA-vm1-vm2.
    $spec.rulesSpec [0].info.userCreated = $true
    $spec.rulesSpec [0].info.vm = new-Object VMware.Vim.ManagedObjectReference [] (2)
    $spec.rulesSpec [0].info.vm [0] = new-Object VMware.Vim.ManagedObjectReference
    $spec.rulesSpec [0].info.vm [0] = 'VirtualMachine' game
    $spec.rulesSpec [0].info.vm [0] .value = "vm-xxxxxxx".
    $spec.rulesSpec [0].info.vm [1] = new-Object VMware.Vim.ManagedObjectReference
    $spec.rulesSpec [0].info.vm [1] = 'VirtualMachine' game
    $spec.rulesSpec [0].info.vm [1] .value = "vm-yyyyyyy.

    _this $ = get-view-Id "ClusterComputeResource-domain-c345645464.
    _this $. ReconfigureComputeResource_Task ($spec, $true)

    It works without errors

    Hi Greg,.

    Thank you for reporting this issue. I can also confirm that it is a bug that is caused by vm-to-host rules. We already fixed for the next version.

    Kind regards

    Yasen

  • bad type cast to nested interpreter

    Hi all

    I am currently doing one more specefic type cast of selection of ext msr test.  Ext MSR is a direct descendant of test selection and the selection test is a descendant of the actor class. I start the selection as a player embedded, test and then run it send a message to run the vi in the image below. I get error 1448.

    Any suggestions?

    Thank you

    Matt

    TMSC cannot be used to convert an object of a class to another, than to change the type of wire. Casting work, the object inherits from the VI must be ext msr must launch an ext msr player, not a player in test selection and then this code should work.

  • How to get a number of participants of type cast

    Refer to TCPIP given simple client.vi using examples of Labview. I try to get data digital display after the type cast but cannot connect to the service. I tried to use unbundle, cannot work.

    I typed the string connection hoping to see some digital data in it, but I see something like '@'.

    I expect a server.vi of simple data conversions, how to display numbers in the display of digital data without going through the waveform table?

    Thanks in advance

    You have typecasted your string in an array of double (or single, I can't tell from the picture of the chart), but try to connect to a scalar indicator.  You must either use a table or Index table indicator for one particular item out of the array to send the digital scalar indicator.

    Regarding your '@', I don't know who.  It all depends on what data the other end of your TCP/IP sends communications.  Put some sensors on the channel, as well as the number coming out casting bytes.

  • An array of type cast to the cluster

    Is there a real difference between 'table of cluster' function, and simply type casting to a cluster?  The image below shows a simple example.  Apart from providing the names of each element of the cluster, type cast function automatically sets the size of cluster, which is a nice feature when you work with a typedef.  I really wonder if there is any downside to type casting when elements of array and cluster are the same type of data.

    Thanks in advance.

    Type casting man knows where I live, so my opinion is biased.  When I have to do such a conversion, which is hardly ever, but does not match ever, so I'm going with the Type Cast.  You hit the bigger points, meaningful labels and ease to spend six to seven to eleven elements with Type FED.  When I do this conversion it is usually because I have to do a magic of property whose tables do not permit (all components need to share properties with the exception of value).  Creating a table of function control Cluster is say a Clusterflop, according to the Type casting, exactly what I'm looking for.  In addition, table in the Cluster service performs a code obfuscation, is always maintained at 9 elements, and otherwise must disappear, or at least that:

    http://forums.NI.com/T5/LabVIEW-idea-exchange/remove-default-behavior-from-array-to-cluster/Idi-p/17...

    First of all, ask yourself if you really should do this, if the answer is Yes, then I say Cast of Type.

  • all the functioning.what to stop USB ports causes this type of problem & how do I fix him?

    Can someone help me please, all ports USB to my pc stops functioning and im having problems using flash & Internet communication. I want to know what causes this type of problem & how can I fix him?

    Hello

    · What happens when you use the USB ports?

    · You receive an error message or error code?

    · What is the number and the model of the computer?

    · Do you remember any recent changes on the computer?

    See: advanced troubleshooting tips for General USB for Windows XP problems: http://support.microsoft.com/kb/310575

  • How to use Type Casting in the JSF Expression Language

    I have a CategoryId attribute in my original Version of type oracle.jbo.domain.Number. I am using the expression of the Boolean element in JSF as #{rank. CategoryId! = 4}
    Here the JSF code:
                          <af:column id="s141NewItem3Col" noWrap="true" width="100"
                                     rowHeader="false">
                            <f:facet name="header">
                              <af:outputLabel value="CAtIDDeq4" showRequired="false"
                                              id="ol18"/>
                            </f:facet>
                            <af:inputText id="s141NewItem3"
                                          value="#{row.CategoryId != 4}"
                                          label="CAtIDDeq4" required="false"
                                          readOnly="#{((pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn']))) or ((!pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn'])))}"></af:inputText>
                          </af:column>
    I get the run-time exception "Cannot convert type oracle.jbo.domain.Number class 4 to class java.lang.Long".

    I wonder how the line. CategoryId is considered to be Long? Please notify. Also, I'll be able to use type cast expressions in the JSF Expression Language?

    Thank you, Pradeep

    Use the attributeValue
    Try * #{row.bindings.CategoryId.attributeValue! = 4} *?

    Check this thread for more details dealing with roughly the same:
    El expression to enable or disable

    Thank you
    Nini

  • Unflatten string or Type Cast?

    Hello.

    I send you an array of unsigned integer 8 bit with size 19203 since a TCP server in a c for a TCP client program in LabVIEW. I managed to receive the data, as shown in the image below. The first byte, which is sent by the c program is the header. The second and the third byte represent the size of the array, which is actually 160 x 120. Then the rest of 19200 bytes are the actual values for the table.

    My client TCP code looks like this:

    This problem occurs when I am replacing the cast of Type with the Unflatten to the string function and adding a dimension to two tables. The first two values in the table (120 and 160) must inform the Unflatten to the string of the size of the array function, but I don't get all the data of the table indicator.  Is there a way to create a 160 x 120 size chart from data in 8-bit uint 2d?.

    Orlando,

    Your client with the table 1 d code gets the data, but not in the format 2D, right? If so, use Array reshape. It also can automatically adapt to any size of 2D array where the first two elements of the 1 d array contains the dimensions of the 2D table.  I put the code outside the loop just because there was space on the comic it. It can be moved inside if you receive multiple messages.

    Lynn

  • the type cast or something of the sort

    This may sound stupid, but I have a 25 characters something like:

    $1hjfu7y4 y * 3fji2389561 ##k

    and I don't know what type it is. It is not a string but, and this is the problem. Is there some kind of equivalent with respect to the type of c cast ++? A kind of way to make this dynamic in a string?

    typeof():

    trace (typeof(1hjfu7y4$y*3fji2389561##k));

  • SignalExpress-Sweep type configuration problems

    Hello

    I am creating an analog signal with a sweep to make the change in the frequency of my signal.

    I chose "Sine wave" as a type of signal.

    Then, configuration of the scan, I have a problem.

    Indeed, the type of configuration, I have chosen is "exponential" (so that the frequency varies from exponentialy). But the graph on the right side of the window as if I had chosen linear.

    When I'm runing the VI, does the frequency varies from exponentialy but the graph remains as if it were varying linearly.

    Is this a bug?

    Is anyway to remedy?

    Thank you very much for your answers.

    Hello

    This is the normal behavior.

    If you take a look whenever you change between exponential and linear from the point to the graphic evolution. For example, if 1 k to the exponential value, the value of iteration is 400, Linear 1 k the value of iteration is completely different. In fact, this graph does not show you values like a curve, because when you assign exponential the y-axis becomes exponential, so the graphic scale variations becomes exponential but not the curve.

    Please let me know if you have any doubt.

    Thank you.

    Best regards.

  • cast problem

    In the extract VI I joined, I have two questions.  (1) why is the data of the two different poles (Brown/pink) pipe, and (2) why can't I cataloged in the type of VXI_Data?

    The Brown wire means that the cluster has a set size.  All the elements that are of known size.  The pink wire means that the cluster size is not known.  Because a string can (also) have a variable duration, there is no way of knowing the size of the cluster.  This is probably why the second instance may not be used in a cast.

    What are you really trying to do?  Perhaps you could flatten your data to a string and then he unflatten leave a string.

  • Cannot type, hardware problem?

    When the connection of the user, I couldn't type my password because the computer type the letter H continuous. My friend thought it was a problem of a bad keyboard, then it deleted physically from the laptop. I plugged a USB, same problem keyboard. Until I have a chance to press a key, the letter H is displayed continuously & backspace will not remove. Then I reinstalled windows xp, but when the time comes to enter the product key, I can't because of the letter HARMAN etc. Now I'm stuck in an endless install because the message "the file 'asms' on windows xp professional service pack 1 cd is necessary." "The type pathname file is located and click ok." In the box that I have would seize the file, HAROLD constantly. Command button will remove HHH, but when I'm not pressing strand CNTRL of h. The laptop is a Sony Viao pcg-8m3l. Keyboard still deleted cell phone fr. changed the hard drive, tried to reinstall, same prob. Start beeps continuously. Have that before the removal of the keyboard & before you reinstall attempt. Please let me know what hardware problem, I looked over. Thanx

    Hi KaliTender,

    Follow these methods.

    Method 1: Disconnect any external devices to the laptop and see if the problem still occurs.

    Method 2: Boot into the bios and reset

    Note: Change (CMOS) BIOS/complementary metal oxide semiconductor settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    If the problem still persists, then contact the manufacturer for more help and information.

    http://eSupport.Sony.com/

  • Shortcut type tool problem

    In InDesign CC, I use the T key on my keyboard to switch to the type tool. Occasionally (not always) it goes back to the previous tool, which means that if I had selected before the selection tool, and I have to switch to Type T tool, it switches back to the selection tool a moment later. It's infuriating!

    Things I noticed:

    • Can I have more than one document open, and the issue may arise in only 1 / some of the documents - not all
    • Selecting the type tool in the Tools window allows you to work around the problem (so, seems to be that the keyboard shortcut)
    • Have not seen this error reproduced for ANY other tool.
    • Double-clicking a box of text always works to automatically change the text
    • The program of closing and reopening it fixes usually, but sometimes does not work

    I'm trying to figure out if anyone else has noticed this problem. I can't find anything in the face of this problem. Y at - it a solution?

    InDesign CC 20141 / 10.1.0.70 x 64 build / Windows 7 Enterprise

    This kind of bad behavior comes ofter damaged prefs. See replace your preferences

  • WS-xmlrpc Java cast problems

    Draft standard xmlrpc except data I return I can't find a way to translate it.

    the result, I'll be back according to Debug is:

    HashMap result
    .. Hash table entry [0]
    .. .key: string
    .. [.value: object]
    ........ HashMap [0]
    .. .key: string
    ... value: string, Boolean, integer, etc
    ........ [*] HashMap
    .. .key
    .. .value
    .. [1] entry hash table
    .. .key: string
    .. .value: string



    I can easily get the value required for the first use of HashMap:

    Object untypedresult = (HashMap) client.execute ("conference.enumerate", params);
    HashMap result = untypedresult (HashMap);
    Object a = result.get ("Conference");


    I broke it down to the individual lines until I learned what is happening. But beyond that, I can't find any way to cast of the HashMap outside. I tried lists, tables, collectors, games, etc nothing works. There is only one key in the HashMap parent I care and will always, which is "conferences".

    What I read there is only two types of structures, Java.util.map and Java.util.List

    Suggestions, your help will save me a head bald beginning ;)

    Thank you
    -Dan

    Published by: 866463 on June 16, 2011 13:44
    Object conferences = result.get("conferences");
    Object[] hashMaps = (Object[])conferences;
    for (int i = 0; i < hashMaps.length; i++)
    {
      HashMap hm = (HashMap)hashMaps;// etc ...}
    
    
    This is really not difficult stuff. The exception message tells you everything you need to know.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    

Maybe you are looking for

  • Anyone else having programs crash after installation of Sierra?

    I just installed Sierra on an iMac mid-2012. A lot of programs crash after installing Sierra, of Apple's native applications. Anyone else having similar problems? All possible solutions? Thank you

  • Bounce output file names do not correspond to the name of the project

    It must be a common scenario. I started a project called "forgotten Garden" and saved the project. Later, I decided that I wanted my song to be called "Voice of the forest" instead. So I renamed my project (File-> management-> rename). When I made a

  • distortion of margin Officejet 7000 borderless printing

    Engineering, drawing on 11 x 17. "The standard of drawing itself has a border rectangular 10.25x15.875 ', for. 75' margin on the left. 375' others. Borderless printing with no scaling gives (1:1) (from Autocad, Adobe Acrobat and PDF Creator) a. 625 "

  • Curve Smartphones blackBerry freezes when used Facebook app used

    BB messenger, email and browser will freeze on my curve once I have upload a photo on Facebook.  It has been upgrading the FB app.  (At least that is when I noticed this).  I get an "uncaught exception error" and the battery must be pulled to reset t

  • Remove operation does not work

    HelloJDev 11.1.2.4Once more a strange ADF issue. I select a row in a table (founded iterator VO/OS), and click a button that invokes an action binding method remove which was created by selecting the iterator, then the Delete operation. When you clic