Reading columns with '#' in name

I want to read some Oracle specific info using:
@Entity
@NamedNativeQuery(
name="sessionInfo",
query="SELECT sid, serial# AS session_serial FROM V$SESSION WHERE audsid = sys_context('userenv', 'sessionid')",
And get following exception:
Exception Description: Query argument not found in list of parameters provided during query execution.
Problem is, that character # is recongized as parameter prefix. Is any workaround for this ?
Thanks

something like
select t1.table_name
     , t1.column_name
     , t1.data_type
     , t1.data_length
     , t2.table_name
     , t2.column_name
     , t2.data_type
     , t2.data_length
  from user_tab_columns t1
     , user_tab_columns t2
where t1.table_name != t2.table_name
   and t1.column_name = t2.column_name
   and t1.data_type = t2.data_type
   and t1.data_length != t2.data_length... could be a starting point.

Similar Messages

  • Automatically populate custom list column with site name when list is created

    Hi All,
    I am using a CQWP to display selected contacts on subsites from one master contact list on the parent site. Each subsite is for a different project and is named according to the project number. In the master contact list I have a custom column called Projects
    that is populated with the various different project numbers that an individual contact is involved with.
    The CQWP on the subsite filters the results based on the Projects column of the master contact list. As it stands I have to manually input this job number into the CQWP's properties. What I would like to happen is for the project number (the subsite name)
    to automatically be input to the filter value.
    The closet I have come to reaching my desired behaviour is by adding a column to the Site Pages list called Title and setting the filter value to [PageFieldValue:Title]. This still doesn't get the automatic behaviour I require because I still have to input
    the project number into the Title column manually, but it is quicker than editing the CQWP properties.
    What I need to achieve is either a way of automatically populating this column with the subsite name or find a way for the CQWP to pick up the subsite name and filter its results accordingly.
    I have found this article http://www.andrewconnell.com/blog/Subclassing-the-Content-Query-Web-Part-Adding-Dynamic-Filtering which seems to be along the lines of what I want to achieve, but it is by no means a walk through and while I'm not completely
    unfamiliar with coding, I don't know enough to implement it without help.
    Any help would be greatly appreciated, I've been working on this for weeks on and off!
    Thanks in advance,
    Dan

    Hi,
    I believe the "Description" field type is Multiple Lines of Text. Sorting doesn't allow in this field type. In order to do the sorting, you would require to create additional column like single line of text column (note that it supports only 255
    chars and require to truncate the data if more than 255) and update the data using event receiver or workflow. and do the sorting with that column.
    kmhsad

  • New Column Still Defaulting To Value From Deleted Column With Same Name

    This is strange. I had a managed metadata column called "Document Category" attached to multiple content types and set to a default value (different in each library). Then I deleted the column (all instances from libraries and references from
    content types as well), and created a new site column with the same name, but a Choice field instead. The libraries that had a default value for the original column, are still populating new documents using the original default value, and it's showing up as
    something like 88;#Hospital Correspondence|4b1e8da6-8653-492a-3e45e6c56c38 . The column is still a choice field, so I don't even know why it allows this value. Does anyone know why this is happening or how to fix it?

    Hi  Vince,
    Thank you very much for sharing your solution here. It  would be helpful for others who encounter similar issue.
    Thanks again,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • Check which table has no column with specific name over number of tables

    Hello,
    Withing my schema I have 66 tables, all of them have column last_update_date. Though not all have the column program_update_date. The problem is I want to go through all the tables and know which tables does not have the program_update_date column. It is to be noted that if the table does not have the program_update_date column query 2 will be used instead of query 1.
    query1:
    select last_extract_date,
    to_char(min(greatest(nvl(*last_update_date*,'01-Jan-10'),nvl(*program_update_date*,'01-Jan-10'))),'DD-MON-YY HH24:MI:SS') mi,
    to_char(max(greatest(nvl(*last_update_date*,'01-Jan-10'),nvl(*program_update_date*,'01-Jan-10'))),'DD-MON-YY HH24:MI:SS') ma
    from table_names
    group by last_extract_date
    order by last_extract_date desc;
    query2:
    select last_extract_date,
         to_char(min(nvl(last_update_date,'01-Jan-10')),'DD-MON-YY HH24:MI:SS') mi,
         to_char(max(nvl(last_update_date,'01-Jan-10')),'DD-MON-YY HH24:MI:SS') ma
         from mispa_events
         group by last_extract_date
         order by last_extract_date desc ;
    Please find the PLSQL code that should be used:
    Declare
    cursor C_1 is
    select unique table_name from user_tables; table_names varchar2(240); Begin Open C_1; Loop Fetch C_1 into table_names; EXIT WHEN C_1%NOTFOUND;
    EXECUTE IMMEDIATE('select last_extract_date,
    to_char(min(greatest(nvl(last_update_date,''01-Jan-10''),nvl(program_update_date,''01-Jan-10''))),''DD-MON-YY HH24:MI:SS'') mi,
    to_char(max(greatest(nvl(last_update_date,''01-Jan-10''),nvl(program_update_date,''01-Jan-10''))),''DD-MON-YY HH24:MI:SS'') ma
    from ' || table_names ||'
    group by last_extract_date
    order by last_extract_date desc');
    End Loop;
    Close C_1;
    COMMIT;
    End;
    Please help.
    Thanks in advance.
    Edited by: P.Sam on Jun 14, 2010 5:00 PM

    why not use user_tab_columns
    SQL> desc user_tab_columns
    Name                                                              Null?    Type
    TABLE_NAME                                                        NOT NULL VARCHAR2(30)
    COLUMN_NAME                                                       NOT NULL VARCHAR2(30)
    DATA_TYPE                                                                  VARCHAR2(106)
    DATA_TYPE_MOD                                                              VARCHAR2(3)
    DATA_TYPE_OWNER                                                            VARCHAR2(30)
    DATA_LENGTH                                                       NOT NULL NUMBER
    DATA_PRECISION                                                             NUMBER
    DATA_SCALE                                                                 NUMBER
    NULLABLE                                                                   VARCHAR2(1)
    COLUMN_ID                                                                  NUMBER
    DEFAULT_LENGTH                                                             NUMBER
    DATA_DEFAULT                                                               LONG
    NUM_DISTINCT                                                               NUMBER
    LOW_VALUE                                                                  RAW(32)
    HIGH_VALUE                                                                 RAW(32)
    DENSITY                                                                    NUMBER
    NUM_NULLS                                                                  NUMBER
    NUM_BUCKETS                                                                NUMBER
    LAST_ANALYZED                                                              DATE
    SAMPLE_SIZE                                                                NUMBER
    CHARACTER_SET_NAME                                                         VARCHAR2(44)
    CHAR_COL_DECL_LENGTH                                                       NUMBER
    GLOBAL_STATS                                                               VARCHAR2(3)
    USER_STATS                                                                 VARCHAR2(3)
    AVG_COL_LEN                                                                NUMBER
    CHAR_LENGTH                                                                NUMBER
    CHAR_USED                                                                  VARCHAR2(1)
    V80_FMT_IMAGE                                                              VARCHAR2(3)
    DATA_UPGRADED                                                              VARCHAR2(3)
    HISTOGRAM                                                                  VARCHAR2(15)

  • Topic: How to refer columns with same name in jdbc

    I have a join statement :
    Select a.col1, a.col2, b.col3, b.col2 from TABLE1 a, TABLE2 b where a.col1 = b.col1
    how do I refer with same column name suppose I want to get b.col2
    I get error when I try rs.getString("b.col2") or
    rs.getString("TABLE2.COL2")..
    note I donot want positional retrieval i.e rs.getString(x) , where x is column number.
    can you suggest how to refer the b.col2 uniquely.

    Select a.col1, a.col2, b.col3, b.col2 from TABLE1 a,
    TABLE2 b where a.col1 = b.col1You can use a column alias, like below. They "as" keyword isn't always necessary, depends on your database.
    Select
        a.col1 as a_col1,
        a.col2 as a_col2,
        b.col3 as b_col3,
        b.col2 as b_col2
    from
        TABLE1 a,
        TABLE2 b
    where
        a.col1 = b.col1

  • Column with the name Null

    Hi,
    I have a strange issue.  I am calling a stored procedure on a SQL server DB.  All is working fine.  I define which columns should be displayed in the output.  All works fine.  When I then run it, an additional column called null appears at the end.  I can't work out how to get rid of it.
    Anyone had this before?
    Thanks
    Paul

    Hi Paul,
    Did you checked your Layout tab for that Table in VC.
    if that Colum is not there in the Layout then its not Problem with Desingingthen its Problem with Compiler which your useing for Runtime.
    Which Compiler your are working.
    Come backwith me again if not solved.
    Regards,
    Govindu

  • SharePoint 2013 unable to create new column with existing column name

    Hi Support,
    I'm currently having a problem in creating my first custom list in my SharePoint site. When I tried to create a new columns with existing name,  e. g "date reported" = Date/Time , "Due Date" =
    Date/Time 
    It's prompt the error like this " The page at sharepoint.itechdomain.com says: The Column name that you entered is already in use or reserved. Choose another name." I've read some forum, someone say's they need javascript command
    to fixs the problem. If these the solution for my problem, I'm not familiar on how to used javascript in my sharepoint. 
    Kindly help me how to fixs my problem as soon as possible.
    Your comment or any suggestion would be greatly appreciated.
    Thank you 
    Best Regards,
    Bishelp

    I already tried this procedure, but it doesn't work. Still the prompt says " The
    Column name that you entered is already in use or reserved. Choose another name". Is there any solution for this kind of problem?
    Let me know, 
    Thank you

  • Databound Drop Down List combine two or more column with customize format

    Hi all
    I am writing a project have Databound Drop Down List like example in http://www.oracle.com/technology/products/jdev/tips/mills/databound_lists.html, but my Databound Drop Down List combine 2 column with format "Name | DepartName" or something like that. I mean how can I change format when I combine two or more column display value in drop down (default is space between columns, ex: "Name DepartName")

    You could add a transient (calculated) attribute to your view object and use this one in your list binding.
    hth, Markus

  • I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?

    I would also recommend to write the description into the meta data. This would allow to place a text frame above the image and it is possible to add meta information and file name automatically together with the image, when you place it or even in a prepared template.
    Meta data information can be written easily in Bridge in the Meta File Workspace.

  • BCS New Item creation - Column with Name 'ID' does not exist.

    Hello All
    I´m creating a BCS and i´m getting a strange error. I have created all the operations and created a list based on the external contente type. In my table the column ID is the primary key with identity.
    When I use the new item form I get the following error. But the new item is created.
    [ArgumentException: Column with Name 'ID' does not exist.]
       Microsoft.SharePoint.BusinessData.Infrastructure.GenericAdapterObject.get_Item(String key) +19563585
       Microsoft.SharePoint.BusinessData.Infrastructure.RuleInterpretingTypeReflector.Get(ITypeDescriptor typeDescriptor, ITypeDescriptor instanceRootTypeDescriptor, Object instance) +59
       Microsoft.SharePoint.BusinessData.Infrastructure.CompositeIdentifier.GetIdentity() +668
       Microsoft.SharePoint.BusinessData.Runtime.EntityRuntime.Create(IEntity thisEntity, IFieldValueDictionary fieldValues, Identity identity, AssociationEntityInstancesDictionary associationInfo, ILobSystemInstance lobSystemInstance) +2386
       Microsoft.SharePoint.BusinessData.MetadataModel.Static.Entity.Create(IFieldValueDictionary fieldValues, ILobSystemInstance lsi) +82
       Microsoft.SharePoint.SPListDataSource.InsertItem(SPListItem itemToInsert, IDictionary dictValues) +1671
    [SPException: Failed to create a list item for this external list based on the Entity (External Content Type) '...' in EntityNamespace '....'. Details: Column with Name 'ID' does not exist.]
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex) +23989128
       System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +4064980
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit() +378
       Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e) +24
       Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +691
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
    Thanks for the help,
    Regards,
    André

    Hello All,
    I already found the problem and it was an error in a trigger in the database.
    Thanks.
    Regards,
    André

  • Stuck - load the Excel file dynamically with different columns and worksheet names

     I have a situation where I want to load the Excel file dynamically, and the excel file have different columns or even worksheet name. Any idea how I could
    approach this? I believe there's no way to modify the meta data (specifically the mapping) in the data flow.

    Hi Chimumu,
    The SSIS stock adapters don't supporting dynamic column mapping, to achieve your goal, you need to use Script Task/Component to read the Excel sheet name and the columns in the worksheet, and then map to the output columns of the script component. You can
    also refer to the following blogs:
    http://micktechblog.blogspot.com/2011/06/ssis-excel-import-with-unknown-number.html
    http://wikiprogrammer.wordpress.com/2011/04/08/dynamic-column-mapping-in-ssis-part-1/
    Regards,
    Mike Yin
    TechNet Community Support

  • How to read the data from a file in another computer with user name and password login

    How to read read the data from a file in anohter computer which need to login with user name and password?

    duplicate post:  http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2061478
    duplicate post:  http://forums.ni.com/t5/LabVIEW/do-need-to-enter-the-user-name-and-password-when-TCP-ip/m-p/2061612
    duplicate post   http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2060682

  • Error when opening XLSX file with Excel 2003 SP3, file does open but in read only mode with temporary name

    I am using Excel 2003 SP3 and have the Office 2007 compatibility pack installed.  When I open Office 2007 formatted Excel files (XSLX) directly in Windows Explorer, I receive the following error if I do not have Excel already opened:
    "Windows cannot find '<path to file>'.  Make sure you typed the name correctly, and then try again.  To search for a file, click the Start button, and then click Search."
    Even though I receive the error, the file does open; however, it opens in Read Only mode with a name such as "Xl0000024.xls".  The number seems to increment up each time it happens.
    Now here is the strange part.  If I have Excel already open and try to open the file in Windows Explorer, the file opens fine in Modify mode with no error and with the correct file name.
    I Googled the error I was getting and found KB211494.  It says I should uncheck the box in Options on the General tab that says "Ignore other applications", but this box is already unchecked in my case.  Any other ideas?  This is
    really frustrating as a small percentage of our company has upgraded to Office 2007 with the rest still on Office 2003.

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • Extract specific value of a Clob column with multiple nodes,similar name

    Hi,
    There is a clob column in the table USER_DETAILS which hold the values similar to the one given below, i would like to form a query which should fetch the entire record where the age<30, as all the child nodes are with similar name i couldn't fetch it out using xmltype.extract. Also the order of the node values may change for eg. age may follow salary or age can be the first node in the list. Please help me to fetch the desired details.
    <Details>
    <parameter>
    <enter>
    <value>name</value>
    <value>jacob</value>
    </enter>
    <enter>
    <value>Age</value>
    <value>30</value>
    </enter>
    <enter>
    <value>Salary</value>
    <value>20000</value>
    </enter>
    <enter>
    <value>DOB</value>
    <value>12091980</value>
    </enter>
    Thanks, gilbert

    Let's start with the easy part.
    Cells on a Numbers table can contain data entered directly, or can contain a formula. They can't contain both. That means you cannot 'type the conditions into a single cell' in column A ("the left header" cell) AND have a formula which sets that cell to TRUE if the typed in data contains an "A".
    There's no problem doing this using column A as the key holder and columns B:Z to hold the TRUE/FALSE results, staring in both cases on row 2.
    Here's an example
    The column header cells (row 1) contain the letter corresponding to that column.
    The row header cells (starting at row 2) contain the 'bunch of letters' you describe. Note (A4) that the letters do not have to be entered in any particular order, and that extraneous characters (eg. a space) are ignored.
    The formula shown is entered B2, and filled down and right from there.
    =IFERROR(FIND(B$1,$A2)>0,FALSE)
    FIND returns the position of the first occurrence of the target string (in this case, the single letter at the top of the column) in the search string, then compares that with the value zero. For any letter that is included in the search string, the find value will be at least 1, so the comparison will return TRUE. If the target letter is not found, FIND returns an error. IFERROR traps this and returns FALSE.
    Since the target depends on the letter at the top of the column, all that's needed to extend the range of possible letters to the full alphabet is to enter an A in cell B1, then run through the alphabet A to Z, with Z in cell AA1.
    Depending what you want to do with the TRUE or FALSE values in these 26 columns, it may be possible to skip the auxiliary column step and use a formula similar to the one above as the condition argument of an IF(condition,do-if-true,do-if-false) statement.
    Regards,
    Barry

  • Csv input adapter - read rows with different # of columns

    I have a csv file which includes rows with different number of columns. I want to read all the rows( of different # of cols)  into ONE stream only and then split into separate streams afterwards.
    I saw that CSV File Input Adapter does not add missing columns with nulls by default. Is it possible somehow? How can I generate a workaround?
    Thanks.

    Hello,
    The CSV Input Adapter expects to find a fixed number of fields.  If you attach the input adapter to a stream/window with 3 fields, it will always try to read three fields.  You can have missing data and this will be read into a column as a NULL value but the delimiters must still be there.  For example:
    1,1,1
    2,2,2
    3,3,3
    4,,4
    5,5,5
    CREATE INPUT WINDOW inWindow SCHEMA (c1 integer, c2 integer, c3 integer) PRIMARY KEY (c1);
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input2 TYPE toolkit_file_csv_input TO inWindow PROPERTIES csvExpectStreamNameOpcode = FALSE ,
      dir = 'c:/temp' ,
      file = 'test.csv' ,
      csvDelimiter = ',' ;
    A workaround you might consider is reading an entire line from your file into a stream with a single string column.  The trick is that you have to choose a character for the column delimiter that you are certain will never show up in your data.  Than once you have read that line into a stream, you can use the string functions to parse out the columns as needed:
    CREATE INPUT STREAM csv_instream SCHEMA (
      log_line_message string
    // Choose a character that is certain to never show up in the data in order to read the entire line
    // from the CSV file into a single column
    ATTACH INPUT ADAPTER File_Hadoop_CSV_Input1 TYPE toolkit_file_csv_input TO csv_instream PROPERTIES
      csvExpectStreamNameOpcode = FALSE ,
      dir = 'C:/temp' ,
      file = 'error_log' ,
      csvDelimiter = '@' ;
    // Parse out the individual columns
    CREATE OUTPUT STREAM csv_outstream SCHEMA (
      log_datetime timestamp ,
      debug_level string ,
      host string ,
      message string ) AS SELECT
      to_timestamp(substr(CI.log_line_message, 1, 24), 'DY MON DD HH24:MI:SS YYYY') as log_datetime,
      substr(CI.log_line_message, patindex(CI.log_line_message, '[', 2)+1, (patindex(CI.log_line_message, ']', 2) - patindex(CI.log_line_message, '[', 2))-1) AS debug_level,
      replace(substr(CI.log_line_message, patindex(CI.log_line_message, '[', 3)+1, (patindex(CI.log_line_message, ']', 3) - patindex(CI.log_line_message, '[', 3))-1), 'client ', '') AS host,
      substr(CI.log_line_message, patindex(CI.log_line_message, ']', 3)+1, 500) AS message
      FROM csv_instream CI
      WHERE CI.log_line_message IS NOT NULL;
    Thanks,
    Neal

Maybe you are looking for

  • Unico Drive serial interface error

    1) I am trying to talk to a Unico drive via a serial port. I receive a -1073807339 error in the Vesa Read in the Drive Send VI. However, the VISA write doesn't seem to be getting to the drive properly as it should effect the speed even though the rea

  • ICal and subscribed calendars with MobileMe using AppleScript

    I am having the same problem as many of you; I have a MobileMe account which does not sync the calendars I have in iCal that are subscriptions. I found this great script online which I'll post below. I don't know anything about AppleScript so I'm jus

  • Do The Settings Stay With The Ipod Or The Computer?

    If I go to another computer and enable disk use under Ipod options in Itunes will it still be like that when I take it back to the original computer? Windows XP

  • How to re-install software for i pad

    i loose 3G so i have been informed that it need software although its software is updated IOS 6.1.3 so how to re-install the software?

  • Motion 5 won't install

    Was working,  now doesn't.  If I try to reinstall from app store it will completely download,  then poof....nothing.  Any ideas?