User Profile

Collapse

Profile Sidebar

Collapse
getmeidea
getmeidea
Last Activity: Nov 21 '08, 01:12 PM
Joined: Feb 28 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • getmeidea
    started a topic Prepare statement allows only global variables?

    Prepare statement allows only global variables?

    [CODE=mysql]SET @qry = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
    PREPARE stmt2 FROM @s;
    SET @first_param = 6;
    SET @sec_param = 8;
    EXECUTE stmt2 USING @first_param, @sec_param;
    [/CODE]

    These are few lines in my stored procedure. Here if I change the identifiers @qry, @first_param, @sec_param to qry, first_param, sec_param respectively
    mysql doesn't allow to compile the stored procedure....
    See more | Go to post
    Last edited by Atli; Oct 7 '08, 01:35 AM. Reason: Added [code] tags.

  • getmeidea
    replied to Custom Report
    For joins you can specify multiple join conditions between two tables
    for eg:
    select * from table1 inner join table2 on (table1.id = table2.id and table1.name = table2.name)
    See more | Go to post

    Leave a comment:


  • getmeidea
    replied to maximum query
    Here I assume application_no is unique, table name is "test_resul t"

    select * from
    (select qualification, application, max(obtainedmar ks) obtainedmarks
    from test_result group by qualification, application) summary
    inner join test_result details
    on summary.qualifi cation = details.qualifi cation and summary.obtaine dmarks = details.obtaine dmarks and summary.applica tion= details.applica tion...
    See more | Go to post

    Leave a comment:


  • As I understand,
    In first method all the rows in the first table is taken into joining, so all the records of employee_master table has to be joined with salary_payment. Then it does the filtering out of emp_rid to match 10234.

    In the second method only one record from employee_master table will be considered and then the join operation is less expensive.

    So the second method will be better. I have no solid idea...
    See more | Go to post

    Leave a comment:


  • Querry optimization to have better performance

    I have the folowing two tables.

    employee_master (
    emp_rid int primary key identity,
    emp_no char(20) not null,
    emp_name varchar(100)
    );

    salary_payment(
    sp_rid int primary key,
    sp_emp_rid int COMMENT 'Maping employee_master .emp_rid',
    sp_pay_date date COMMENT 'Payment Date',
    sp_amount varchar(100)
    );
    Assume in index is created on the fields salary_payment( sp_emp_rid)....
    See more | Go to post

  • I am doing to work on IE 6.0.
    First I tried with dynamically loading then I include initially itself. The error populates when the script inclusion happens....
    See more | Go to post

    Leave a comment:


  • getmeidea
    started a topic In line comment //@@ gives Invalid character

    In line comment //@@ gives Invalid character

    I have the following function in my javascript file
    CODE:

    [CODE=javascript]function displayFullName (firstName, lastName) {
    if(lastName != null) { //@@ Appnds only when last name exists
    return (firstName + ' ' + lastName);
    } else {
    return firstName;
    }
    }
    [/CODE]
    Here the inline comment gives me error "Invalid character".
    When I remove @@ it...
    See more | Go to post
    Last edited by gits; May 16 '08, 07:41 AM. Reason: added code tags

  • getmeidea
    started a topic Function to refresh the screen

    Function to refresh the screen

    CODE:

    function checkAll() {
    var now = new Date();
    var chkBoxes = document.getEle mentsByName('ch kMe');

    for (var limit = 0; limit < chkBoxes.length ; limit ++) {
    while(((new Date()).getTime () - now.getTime()) < 1000) {} //Delay 1 sec.
    chkBoxes[limit].checked = true;
    }
    }

    I have so many check boxes in my screen, the above function will check the check...
    See more | Go to post

  • Hello,

    For running a script file we can give commands in different ways,
    My command: mysql -u<user name> -p<password> -D<database> < "<file name in same directory>"
    The command i have given is right, also the your syntax is correct.
    If you still doubt you can try with the command I have given.

    But my doubt is not about "how to execute a script file"....
    See more | Go to post

    Leave a comment:


  • getmeidea
    started a topic Zero rows fetch error when executing dump file

    Zero rows fetch error when executing dump file

    Hi all,

    I have run a batch file contains,
    mysql -uroot -proot -Dsample_db < "create_sp. sql"

    The "create_sp. sql" file contains definition for the stored procedure by the name get_account_det ails()

    Now i opened SQLyog and when I executed get_account_det ails() it generates error with message "zero rows fetched, selected, or processed"

    But when i move...
    See more | Go to post

  • getmeidea
    replied to Printing document in text mode
    Thanks for your solution.

    I don't have very good idea in specifying print medial through style sheet. I have searched for it in web but i couldn't find out.

    Can you send me some examples that specifies print media through stylesheet , or some url for the reference.
    See more | Go to post

    Leave a comment:


  • getmeidea
    started a topic Printing document in text mode

    Printing document in text mode

    Hi all,

    [CODE=javascript]function printReport() {
    frames['iframeReport'].print();
    }[/CODE]

    The function printReport prints the specified iframe, iframeReport.
    I am using dot matrix printer. I want it to be printed in text mode so that the printing will be done much faster.

    How can i print this in text mode.

    Thank you,
    See more | Go to post
    Last edited by gits; Dec 22 '07, 11:43 AM. Reason: added code tags

  • Is there any function that escapes the special characters

    Hi All,

    select '\';
    The above will give me error because mysql uses '\' as escape character.

    So i changed the query to,
    select '\\';

    Here i don't want to worry with escape character stuff. So i need a function
    which takes the parameter
    1> parameter value = '\'
    return value = '\\'
    2> parameter value = '\t'
    return value = '\t'
    2>...
    See more | Go to post

  • getmeidea
    started a topic Replace all "\\" substring with "\\\\"
    in Java

    Replace all "\\" substring with "\\\\"

    Hi all,

    String x = "\\";

    This string will have the value \.
    Now for any string contains \, i need to replace with \\.

    But when i use x = x.replaceAll("\ \", "\\\\");
    I am getting runtime exception.

    How can i replace this.
    See more | Go to post

  • To print directly without showing the window

    Hi,

    I have a code like this

    [CODE=javascript]function printDocument(u rl) {

    var newWindow = window.open(<ur l>, '_blank');
    newWindow.print ();
    setTimeout(<fun ction name>,2000); // code for delaying to complete printing
    newWindow.close ();
    }
    [/CODE]
    Here the specified window gets opened and printed. But I actually need to just print the window(newly...
    See more | Go to post
    Last edited by acoder; Dec 6 '07, 08:44 AM. Reason: Added code tags

  • Thank you very much for your solution.

    Can you send me the proper code on vbscript which will do this functionality (Working only in IE is fine)....
    See more | Go to post

    Leave a comment:


  • Print the window without opening Printer Dialogue Box

    Hi All,

    In javascript i am using the code window.print().
    It opens the printer dialogue box and user has to confirm.
    I need the code to print the page directly without promoting Printer Dialogue Box.

    Thanking you,
    See more | Go to post

  • getmeidea
    started a topic Which querry will give more performance

    Which querry will give more performance

    I have the following tables,

    1> employee_master (emp_id int primary key, emp_name varchar(100));
    2> employee_salary _payment(salary _rid int primary key, emp_id int, sal_date date, paid_amt int);

    The tables, employee_master and employee_salary _payment have one to many relation.
    I need to list the salary payment done for the employee having id = 10. Here I use two different querry to work.
    ...
    See more | Go to post
    Last edited by mwasif; Nov 19 '07, 11:32 AM. Reason: Added [CODE=mysql]/[/CODE] tags

  • Yes, I know this is not the right way of designing. But it was already made.
    Here i need the solution with query....
    See more | Go to post

    Leave a comment:


  • How to get datetime from both date and time fields

    Hi all,

    I have a table,
    account_transac tions(trans_rid int primary key COMMENT 'Transaction ID',
    trans_date date COMMENT 'Date of transaction',
    trans_time time COMMENT 'Time of transaction')

    I need a query which returns me two fields "Transactio n ID" and "Transactio n Date" time.

    The "Transactio n...
    See more | Go to post
No activity results to display
Show More
Working...