User Profile

Collapse

Profile Sidebar

Collapse
gjain12
gjain12
Last Activity: Jan 15 '10, 02:48 AM
Joined: Jun 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gjain12
    started a topic Query to Search Data
    in DB2

    Query to Search Data

    Hi All,

    I have a table in which there is no primary key.
    It can contain multiple values for a single id.
    e.g. suppose the structure of the table is :
    empid emptype lastupdatetimes tamp
    1 temp 2009-12-01
    2 perm 2009-12-02
    1 perm 2009-12-02

    So, I have to write a query that should return the row that has the latest timestamp. e.g. in the...
    See more | Go to post

  • gjain12
    started a topic Problem in fetching procedure text
    in DB2

    Problem in fetching procedure text

    Hi I am trying fetch the text of procedure from unix propmt using the below command
    Code:
    db2 "select text from sysibm.sysprocedures where procname='<procedure name>'"
    but if the size of procedure is big then this command is not fetching the complete text of the procedure. Even if I redirect the output to a file also the output is same.
    Is there any other method to fetch the procedure text.
    See more | Go to post

  • gjain12
    started a topic Problem with cursors
    in DB2

    Problem with cursors

    When i am trying to loop through cursor using a not found continue handler I am facing a problem, for a select staement inside cursor loop the not found condition is getting true and hence the cursor loop is also getting completed

    Code:
       DECLARE CONTINUE HANDLER FOR NOT FOUND 
       SET at_end=1;
       OPEN C1;     
       FETCH C1 INTO perm;
       WHILE at_end = 0 DO
        <some select statement   which returns
    ...
    See more | Go to post

  • gjain12
    started a topic Using Regex in java
    in Java

    Using Regex in java

    Hi All,

    I have to find all the commas in a string except the one that comes inside double quotes and then replace this comma and double quotes with "|"

    e.g. "Gaurav,jain",g aurav,jain has to be converted into
    |Gaurav,jain|ga urav|jain

    I have been suggested that regex is a better option for the same.
    I have used regex before but only very simple one.

    So, if...
    See more | Go to post

  • gjain12
    replied to error in Stored procedure while using cursor
    in DB2
    I checked the statement but couldn't find any error but still m getting same error in the line
    [code]DECLARE C1 CURSOR FOR
    SELECT PERM_ID_TEMP
    from SESSION.TEMP_TA BLE;[\code]
    See more | Go to post

    Leave a comment:


  • gjain12
    started a topic error in Stored procedure while using cursor
    in DB2

    error in Stored procedure while using cursor

    When I am trying to declare a cursor over a temproay table in my stored procedure I am getting some errors.
    Below are the piece of code from my stored procedure in which I am getting error.

    Code:
    DECLARE GLOBAL TEMPORARY TABLE
       		SESSION.TEMP_TABLE(PERM_ID_TEMP VARCHAR(50));
        INSERT INTO SESSION.TEMP_TABLE(PERM_ID_TEMP) VALUES(SELECT VARCHAR(elem, 50) FROM TABLE ( teimt00.elements(PERMISSIONS) ) AS t(elem));
    ...
    See more | Go to post

  • gjain12
    started a topic A long string as a Input parameter in procedure
    in DB2

    A long string as a Input parameter in procedure

    Hi All,
    I want to create an Input Parameter in my procedure which can take a long string of 3000 or more characters.
    The strored procedure then use this input parameter as clob type to a function which would do further processing.
    But I am not able to find how to create input parameter for such a long string haivng 3000 or more characters.
    Any pointers would be very helpful.

    Thanks,
    Abhishek Chow...
    See more | Go to post

  • gjain12
    replied to Using Regular Expression in java
    in Java
    Thanks a lot..
    It works perfectly...
    But I couldn't iunderstand how this regex is working.
    Means how should I read this expression.
    If you can explain it also it will be a great leraning experience.
    See more | Go to post

    Leave a comment:


  • gjain12
    replied to Using Regular Expression in java
    in Java
    Actually I am very novice to regular expression.
    If you can provide me some exampl sort of for the same, it will be really helpful.
    See more | Go to post

    Leave a comment:


  • gjain12
    started a topic Using Regular Expression in java
    in Java

    Using Regular Expression in java

    Hi All,

    I have a string in which I have to find all the commas except the one which is followed by "space". I have tried ",[^ ], but it finds the patterns that start with , and one character.
    e.g If my string is abc,bef, ghi,jkl,,mno
    the it returns ',b' ',j' and ',,' while I want only ',' so that it can search from the next element in the string. Means it should return ',' ',' ','.

    Thanks...
    See more | Go to post

  • gjain12
    replied to Printing a java object value
    in Java
    ok..thanks I think I have to get back to them and ask for docs.
    See more | Go to post

    Leave a comment:


  • gjain12
    replied to Printing a java object value
    in Java
    Actually this makes use of custom APIs that has been developed by third party and I don't have the API docs but I know that whatever attribute I have set using set methods have corresponding get methods also.

    Actually my concern is to see the complete XML with tags creted by those methods.
    See more | Go to post

    Leave a comment:


  • gjain12
    replied to Printing a java object value
    in Java
    Printing a java object value

    Actually, the thing is that using APIs I have created this object and I am not sure whether it has been created correct or not. Thats why I wanted to print it.

    This should create some xml. Do you have any idea how can I know whether the format of my xml is correct or not?
    See more | Go to post

    Leave a comment:


  • gjain12
    started a topic Printing a java object value
    in Java

    Printing a java object value

    Hi all,

    I have created a java object that contains some xml tags. When I print it using obj.toString(), it displays some hashed value something like objecttype@1234 5. But I want to display the exact value that it contains. Does anybody know how to do this?

    Thanks
    See more | Go to post

  • Hi,

    Thanks for such a quick and accurate response.
    Can you please also tell me how can I disable the right click and copy/paste option from the Edit menu of explorer for the same field.

    Thanks
    Gaurav Jain...
    See more | Go to post

    Leave a comment:


  • gjain12
    started a topic Problem regarding onkeypress and onkeydown

    Problem regarding onkeypress and onkeydown

    Hi all,

    I am using the following code to disable the ctrl+a/c/v/x keys.

    Code:
    <html>
    <head>
    <script language="JavaScript" type="text/javascript">
    function disableCtrlKeyCombination(e)
    {
    //list all CTRL + key combinations you want to disable
    
    var forbiddenKeys = new Array('a', 'c', 'x', 'v');
    var key;
    var isCtrl;
    ...
    See more | Go to post

  • gjain12
    replied to Restrict user to copy/paste Issue
    Hi,

    Thanks for reply.
    Actually I could not understand the flow of code, i.e.how it will work, posted by mrhoo. And I am not using the plain html code ( I am using a tool SIM 7.1), thats why I have to look into how will it work in my case and that is possible only if I can understand the code.

    If you,mrhoo or anyone else can elaborate it, then it will be really helpful to me.

    Thanks
    Gaura...
    See more | Go to post

    Leave a comment:


  • gjain12
    replied to Restrict user to copy/paste Issue
    Hi,
    Thanks for reply.
    I am able to achieve the required functionality using the following code.
    Code:
    var el; 
    onload=function()
    { 
    	el = document.forms[0].elements; 
    	for(var i=0;i<el.length;i++)
    	{ 
    		if(el[i].name=='confirmEmail')
    		{
    			el[i].onpaste=function(){return false; } 
    		} 
    	} 
    }
    But the problem is that it is working only for...
    See more | Go to post

    Leave a comment:


  • gjain12
    started a topic Restrict user to copy/paste Issue

    Restrict user to copy/paste Issue

    Hi all,
    I have a form with fields email and confirm email. I want to restrict the user not to copy the value from email field and paste it into the other one.

    I think this is possible through javascript, thats why i am posting my problem here.

    Anyone who can give some idea on how it can be achieved, please post it here as it is really urgent.

    Thanks
    See more | Go to post
No activity results to display
Show More
Working...