Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2014
    Posts
    3

    Unanswered: Execute 2 sybase query in single line

    I would like to execute 2 query in a single line:

    1. sp_monitorconfig "open objects","temp_table"
    go
    2. select Num_active from temp_table
    go

    I would like to run these 2 query in single line from C++ code.

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    myDB.exec("sp_monitorconfig \"open objects\",\"temp_table\""); myDB.exec("select Num_active from temp_table");
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Feb 2014
    Posts
    3
    I use sybase ASE 15.7

    sp_monitorconfig "open objects"
    2> go
    Usage information at date and time: Feb 19 2014 11:00AM.

    Name Num_free Num_active Pct_act Max_Used Reuse_cnt Instance_Name
    -------------------------------------------------- ----------- ----------- ------------ ----------- ----------- ------------------------------------------------------------
    number of open objects 438 62 12.40 62 0 NULL

    (1 row affected)
    (return status = 0)


    I want a single line query to run this procedure and return me only Num_active

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •