• RELEVANCY SCORE 3.80

    DB:3.80:Re: Totals At Group Level Required a7




    Use CUBE/ROLLUP clause in your SQL query

    DB:3.80:Re: Totals At Group Level Required a7

    Hi,
    Zahid Rahim wrote:
    The query is:

    select coa_accode,sum(ob)
    from act_coa,(
    select vd_account_code,sum(vd_dr_amount-vd_cr_amount) ob
    from act_voucher_header,act_voucher_detail
    where vh_trans_id = vd_trans_id
    and vh_voucher_date '30-MAR-2010'
    group by vd_account_code) v

    where coa_accode = vd_account_code(+)
    group by coa_accode
    order by coa_accode;

    The table v only produces totals at detail level accounts something line
    code------------------------Amount
    01
    0101
    010101
    0101010001------------50,0000

    I want the query should show totals for 01, 0101, 010101 the prent codes.Instead of the join condition
    where coa_accode = vd_account_code(+)in the main query, you probably want something like
    WHERE vd_account_code (+) LIKE coa-acode || '%'but I can't say for sure unless you post CREATE TABLE and INSERT statements for your sample dats, and the results you want from that data. (If the results are exactly the same as something you posted earlier, just copy them.)

  • RELEVANCY SCORE 3.80

    DB:3.80:Re: Sql Query Required ks




    What have you tried yourself?
    What is the logic?

    DB:3.80:Re: Sql Query Required ks

    Asks an inaccurate and muddled question, and doesn't know a right answer when he/she sees it! :(

  • RELEVANCY SCORE 3.80

    DB:3.80:Database Query (Sql, Mysql) cp




    Hello,

    i need to periodically request data from a database (SQL). Do i need the CVI
    Enterprise Connectivity Toolkit to connect to the database and to request
    the required data or is there another "simple" way to do it?

    Thanks for any hint

    Norbert Rieper

    DB:3.80:Database Query (Sql, Mysql) cp


    Hi Norbert,

    The reason you are getting only one "record" when you do DBNumberOfRecordson a "SELECT COUNT(*) ..." statement is that that Select statement only returns one row, the row contains a single value which has the number of records.

    You can either use "SELECT * FROM ..." and then call DBNumberOfRecords as you seem to be doing, or you can examine the value that "SELECT COUNT(*)" returns.

    Kevin
    NIMessage Edited by Kevin B. on 06-25-2008 06:48 PM



    Kevin B.National Instruments

  • RELEVANCY SCORE 3.72

    DB:3.72:Required Sql Query ak


    Hi All,
    I have data like
    -------------------------------
    select 'king' name,100 id ,'A:B:C' mail from dual;
    ------------------------------
    i need above query mail column need to Split and required out put like
    --------------------
    name id mail
    -----------------
    king 100 A
    king 100 B
    king 100 C
    -------------------------

    DB:3.72:Required Sql Query ak

    Total Questions: 70 (70 unresolved)

    Top N query then :)

  • RELEVANCY SCORE 3.54

    DB:3.54:Need Help With Sql ks



    Hi I have this SQL that gives results for data per monthly but I want the SQL to give me the option to call chosen dates including for the very first recordentered even if it was a few years ago? At the moment this does for the last 12 months.I would like
    the User to be able to select dates required. But I dont know how to incorporate this into the SQL?

    SELECT Format([Date:],"yyyymm") AS RequestMonth, Sum([TickRaDTri1])/Count([RaDTri1])*100 AS Ri1
    FROM [Enter Talyform Data Query]
    WHERE ((([Enter Talyform Data Query].[Date:])=DateSerial(Year(Date())-1,1,1)))
    GROUP BY Format([Date:],"yyyymm"), [Enter Talyform Data Query].Channel
    HAVING ((([Enter Talyform Data Query].Channel)="pc2"));

    DB:3.54:Need Help With Sql ks

    Thank you thats perfect

    Happy holidays!

  • RELEVANCY SCORE 3.53

    DB:3.53:Sql Query Plugin Not Detected By Hyperic c1


    hi, I'm new to Hyperic. I wrote a simple SQL query plugin to select some data from a database table. I followed the instructions from another thread in this forum.The contents of seemasqlplugin.xml are!-- Seema Testing HQ -- plugin service name="Seema Test1" !-- "sql:" domain required to proxy through sqlquery-plugin -- filter name="template" value="sql:${query}:${name}"/ !-- config defined by the sqlquery-plugin -- config include="sql"/ metric name="StudCount" query="SELECT COUNT(*) FROM STUDENT_DETAILS" indicator="true"/ metric name="StateCount" query="SELECT COUNT(*) FROM EMPLOYEE" indicator="true"/ /service /plugin I have put the xml file in both locations.D:\hyperic\agent-2.7.0\pdk\pluginsD:\hyperic\server-2.7.0\hq-engine\server\default\deploy\hq.ear\hq-pluginsI chose the resource(name of my machine), clicked on Inventory tab, clicked on New Platform Service. But this service is not there in the list of Service Types.Is there anything I'm missing out?Thanks,Seema

    DB:3.53:Sql Query Plugin Not Detected By Hyperic c1

    Hi Seema,The plugin deployer looks for files that match the pattern *-plugin.xml and *-plugin.jar. It's likely the server is not picking up your plugin because of the name. Try renaming it to seemasql-plugin.xml on both the server and agent. The server should hot deploy the new plugin, so you'll see something like:.. seemasql unknown -- registeringIn your server.log file.You'll need to restart the agent for it to pick up the new plugin.Hope this helps,-Ryan

  • RELEVANCY SCORE 3.52

    DB:3.52:Sql Server 2008 7a


    Hi,
    I have created a sql user , which has only public role,But what is confusing is
    1.From the object browser iam able to restart the sql server.
    2.If i type shutdown in query analyser it says don't have required permissions.
    First of all iam not able to understand why a user with no sysadmin,serveradmin .How he can shutdown SQL Server.
    Thanks Sandeep
    Display name

    DB:3.52:Sql Server 2008 7a

    So from Windows (services.msc or SQL Server Configuration Manager), the users privileges in Windows are being evaluated.Windows is initiating the shutdown. From within SQL Server, the SQL Server login permissions are being evaluated. SQL Server is
    initiating the shutdown.Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty

  • RELEVANCY SCORE 3.45

    DB:3.45:How To Use Plugin Properties In Sql Query p9


    Given the following plugin, which works when unmasked, how do I use metric.interval in the SQL? right now we have the interval in the SQL but would like to make it configurable.plugin service name="Mysql Test" !-- "sql:" domain required to proxy through sqlquery-plugin -- filter name="template" value="sql:${query}:${name}"/ !-- config defined by the sqlquery-plugin -- config include="sql"/ metric name="failed attempts" query="select count(*) from table1 where col10 = 1 and created_at (now() - INTERVAL 5 MINUTE);" indicator="true" interval="300000" / /service/plugin

    DB:3.45:How To Use Plugin Properties In Sql Query p9

    Ah, I misunderstood what the drupal plugin was doing. I had thought the jdbcQuery was setting the values of the option variables since they all had the same name. I guess this will do.

  • RELEVANCY SCORE 3.45

    DB:3.45:Covert Character Value To Date dx


    Hi Experts

    Sql Query Issue ...

    I have date in character format Like

    Mar-2008
    Apr-2008
    May-2008

    from this i only required 4,5,6 month of the years can u please suggest me how can i do this in a query.

    Mar - 4
    Apr -5
    May- 6
    June-7

    Thanks in Advance
    Mani

    DB:3.45:Covert Character Value To Date dx

    It is not quite clear what you want to do, but I understood this:

    Taking the first case as an example:

    SQL select to_char(to_date('Mar-2008','Mon-YYYY') + 3, 'Mon-dd') from dual;

    TO_CHA
    ------
    Mar-04

    ~ Madrid

    http://hrivera99.blogspot.com/

  • RELEVANCY SCORE 3.44

    DB:3.44:Re: Sql Query Help 3f


    I guess - you are talking about current table scenario and now you should tell the logic of your required output.

    Or, am i missing anything?

    Regards.

    Satyaki De.

    DB:3.44:Re: Sql Query Help 3f

    with 10g and up, but Frank's solution works in 9i and up.
    regards Salim.

  • RELEVANCY SCORE 3.39

    DB:3.39:Need Help To Write Sql Query For Convert One String To Multiple Rows? 89



    I required SQL query for to handle below scenario

    One string to multiple rows

    Input
    VENKAT

    O/p
    V
    E
    N
    K
    A
    T

    If you have any idea means would you please share me

    NOTE: Without `LEVEL `

    Thanks for your help.

    Regards,

    Venkat

  • RELEVANCY SCORE 3.38

    DB:3.38:Query To Get Which User Assign To What Group In Oid j1


    Hi All,Can you please help me out to get the details of users assigned to which groups in OID.I required sql query for the same.Please suggest for such query.Thanks-P

    DB:3.38:Query To Get Which User Assign To What Group In Oid j1

    You can also use ODSM for searching users group. Go to Advanced=Enter the node for seraching such dc=location,dc=com and in the field select uniquemember contains value "joe"I need this quite often to see users groups

  • RELEVANCY SCORE 3.36

    DB:3.36:Need Sql Query To Get The Result. 77


    RegionMonthTrx TypeResolution SummaryAMERICASMay-13AdjustmentsCorrectEMEAMay-13AdjustmentsIncorrectAMERICASMay-13Credit MemoIncorrectEMEAMay-13InvoiceCorrectAMERICASMay-13Credit MemoCorrectOFDMay-13AdjustmentsCorrectAMERICASMay-13InvoiceIncorrectLADMay-13AdjustmentsCorrectLADMay-13AdjustmentsCorrectOFDMay-13AdjustmentsCorrectAbove is my Table and find below the required result.Similarly for other regions as well. Can anyone help me with the SQL Query?RegionResolution SummaryAdjustmentCredit MemoInvoiceGrand TotalAMERICASCorrect11 2 Incorrect0112

    DB:3.36:Need Sql Query To Get The Result. 77

    Since I am to new to SQL it would be helpful if you explain your code as when I ran it says no Tables exist.Thanks

  • RELEVANCY SCORE 3.36

    DB:3.36:Sql Query Required sj


    SELECT a.reference_no, a.version_no, a.product_code,
    b.portfolio_id,b.portfolio_type, b.portfolio_customer_id, b.portfolio_description,b.portfolio_ccy_code, a.field_name, a.field_value

    FROM userdef_fields a,
    portfolio_master b

    WHERE a.reference_no = b.portfolio_ref_no
    ORDER BY portfolio_id DESC

    Table A userdef_fields has multiple rows.
    Other table B has one row

    We would like to present, one row in output with all values from table A in single SQL query.

    Thanks in Advance.

    _____________________

    DB:3.36:Sql Query Required sj

    You're welcome, just be aware that the single row you're getting back there is the maximum values associated with that reference number.

  • RELEVANCY SCORE 3.36

    DB:3.36:Sql Query Req aa


    Hello,

    I request everyone to help me in solving the below problem:

    I have a table and the data and the desired output required is as below:

    Col1 Col2
    -------------------------------------------
    I1 C1
    I2 C1
    I3 C1
    I4 C2
    I5 C2
    I6 C2
    I7 C2
    I8 C3
    I9 C3

    Output required:
    -------------------------------------------

    col1 col2
    ------------------------
    I1 C1
    I4 C2
    I8 C3
    I2 C1
    I5 C2
    I9 C3
    I3 C1
    I6 C2
    I7 C2

    Please can anyone help me in writing the sql query for the above.

    Thanks,
    Santhosh.S

    DB:3.36:Sql Query Req aa

    Thanks a lot for the solution...

  • RELEVANCY SCORE 3.31

    DB:3.31:Connection Fails With Remote Sql Server, Sqlstate: 01000 j7


    Hi
    When I run a query like below against one remote SQL Server then it works fine and returns the required data;
    SELECT * FROM [ODBC;Driver=SQL Server;SERVER=Server1.com;DATABASE=MyDatabase;UID=MyUser;PWD=MyPass].MyTable
    However when I run the same query against a second remote SQL Server it gives me below error;
    Connection failed:
    SQLState: '01000'
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()).
    Connection failed:
    SQLState: '08001'
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.
    I can otherwise access the second SQL Server fine. So it would seem there is something minor missing in the second server configuration that blocks running the query in this way. What is it I need to do on the problematic SQL Server to have me run the query
    fine?
    Many Thanks
    Regards

    DB:3.31:Connection Fails With Remote Sql Server, Sqlstate: 01000 j7

    Hi Tom
    Many thanks. When I try below it works. You are a star.
    SELECT *
    FROM [ODBC;Driver=SQL Server;SERVER=Server1.com\sql2008,1433;DATABASE=MyDatabase;UID=MyUser;PWD=MyPass].MyTable
    Thanks
    Regards

  • RELEVANCY SCORE 3.31

    DB:3.31:T-Sql Query Required - Urgent jf


    Hi Guys,
    I need a T-SQL query to get below output,

    InputData:
    Column name Destination
    tbl name:Temp_OldFileStore
    \\fw-sql01\E\TestFolder1\ProductCatalog_193094_20100813011122.csv

    Output Require only:
    ProductCatalog_193094_20100813011122.csv

    DataType (NVARCHAR) (250)

    Thanks,
    D

  • RELEVANCY SCORE 3.29

    DB:3.29:Help In Below Scenario - Check For Sql Query Output In A Cycle 99



    Hi,

    I have a requirement as below:

    I need to hit SQL server database to run a select query. If a get the desired output then I have to run the mapping otherwise I need to wait for some time and run the sql query again. The mapping cant be run without getting the required output from the SQL query. Our Informatica server is windows server.

    Any help is highly appreciated.

    Thanks!

    DB:3.29:Help In Below Scenario - Check For Sql Query Output In A Cycle 99


    Hi Fasiuddin,

    Please modify the below query as per your requirement and use it in SQL Transformation:

    BEGIN

    DECLARE @Tries INT

    SET @Tries=1

    WHILE @Tries=3

    BEGIN

    BEGIN TRY

    BEGIN TRANSACTION

    SQL Stmt

    COMMIT

    BREAK

    END TRY

    BEGIN CATCH

    ROLLBACK

    WAITFOR DELAY '00:00:10'

    SET @Tries=@Tries+1

    CONTINUE

    END CATCH

    END

    END

    Thanks,

    Ramesh.

  • RELEVANCY SCORE 3.29

    DB:3.29:Sql Results As Input For Oracle sm


    Hi,
    I have sql Query as follows:
    select customernum from customers where category='AM'
    I need to update the table fetching the required fields from oracle using linked server.
    Select * from openquery(oralink,'select value from oracustomer where customernum in (The results which i got from intial query which is SQL query)')
    Does we have any better way to update other then inserting the sql results to #temp table and fetching all oracle into other #temp table and join them to update.
    No while loops.
    No temp tables.
    NO SSIS.
    Regards,
    Navin

    Navin.D http://dnavin.wordpress.com

    DB:3.29:Sql Results As Input For Oracle sm

    This depends on the amnout of data. SSIS can handle large amounts better and faster then a normal linked server.

  • RELEVANCY SCORE 3.29

    DB:3.29:Sql Server Stored Proc - Bcs - External List - Caml Query - Silverlight Web Part dm


    I am able to retrieve data from BCS External List using C# CAML Query and display it in a silverlight web part. However passing the comparison filter parameter (finder parameter to Stored proc) via CAML Query is not providing the required output on the silverlight
    grid. For example if there isa sql stored procthat takes department as parameter to providea list of all employees.Passing the finder(departmentfilter) parameterusing where clause on CAML query to the BCS external
    list does not give required output. Interestingly the BDC Business List webpart is able to pass on the department parameter and get the required filtered results. Thanks for any help.

    DB:3.29:Sql Server Stored Proc - Bcs - External List - Caml Query - Silverlight Web Part dm

    Thanks a lot Porter. Your suggestion helped in arriving at the CAML for the required output.
    Method Name=sp_Get_Users_List
    Filter Name=DeptFilter Value=Finance/
    /Method
    Query
    OrderBy
    FieldRef Name=Date_Created/
    /OrderBy
    /Query
    ViewFields
    FieldRef Name=Department.....
    ......

  • RELEVANCY SCORE 3.29

    DB:3.29:How To Replace Variable Value Of A Sql Query Dynamically 73


    Hi all,

    Trying to execute sql queries present in Oracle table and the query it self contains the ODI variable #EMP_NO.
    At the run time we thought of passing the variable values.

    table contains query like

    update table table name set column name= 5000 where emp_no = #EMP_NO

    We need to execute the sql query using a ODI procedure, to pick the sql query from table we use another variable #varSQLID and in the command on source tab wrote like

    select sql_query varSQL from emp_sql where query_id=#varSQLID

    Command on target
    -----------------------------
    #varSQL

    when ever I tried to execute I am getting error please let me know what changes are required .

    The question is whether it's possible to replace the variable value present in the above sql ?

    regards,
    Palash Chatterjee

    DB:3.29:How To Replace Variable Value Of A Sql Query Dynamically 73

    In that case, write a user-defined-function because teradata's string library is somewhat weak!!!

  • RELEVANCY SCORE 3.29

    DB:3.29:Parse A Sql Query ss


    I have a simple SQL query :
    select t1.name from t1,t2
    where t1.roll=t2.roll
    and t1.dept="COMP"
    and t2.hall="RP"

    I just want to parse the above query enough to know about the tables used, columns required and the where clause.
    God please don't tell me 'bout JavaCC/Lex Yacc.
    I just want to use simple String functions.

    Thank You

    DB:3.29:Parse A Sql Query ss

    If it is always very simple then you can use a regex.

    If it isn't then you will have to use a parser. JavaCC has a SQL grammar.

  • RELEVANCY SCORE 3.28

    DB:3.28:Sql Query Generator From Xml Data pz


    Hi,

    I am looking for an open source tool in java which would generate the sql query with an xml configuration file as input. The xml configuration file schema would be defined by the tool and and would provide placeholders for giving the various information required to build the sql query.
    Are there any available?
    Please let me know.

    /
    Anshuk

    DB:3.28:Sql Query Generator From Xml Data pz

    Hi,

    I am looking for an open source tool in java which would generate the sql query with an xml configuration file as input. The xml configuration file schema would be defined by the tool and and would provide placeholders for giving the various information required to build the sql query.
    Are there any available?
    Please let me know.

    /
    Anshuk

  • RELEVANCY SCORE 3.27

    DB:3.27:Error- No Value Given For One Or More Required Parameters Exception For Sql Query. kp


    I am having a table Movies with columnsID(primary key),Name,Director,Genre1,Genre2 etc. Another table GenreTable with GenreID(primary key),ID(foreign Key),Genre.
    i am using a query-SELECT Movies.[Genre1] FROM Movies in C# .net .
    But it is throwing an exception:no value given for one or more required parameters exception for sql query.
    this query give me results when i run in Access's query window but throws exception when i try to run itprogrammatically. it is throwing exception only when i am trying to retrieve Genre1 and Genre2.

    My code:
    conn=connectionstring

    string query_Movie = SELECT Movies.[Gnere1] FROM [Movies];
    System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(query_Movie, conn);
    System.Data.OleDb.OleDbDataReader rdr = cmd.ExecuteReader(); /// Throws exception here

    DB:3.27:Error- No Value Given For One Or More Required Parameters Exception For Sql Query. kp


    string query_Movie = SELECT Movies.[Gnere1] FROM [Movies];

    Hi abc2088,
    Is [Gnere1] just a typing error in this message, or THE error?

    Imb.

  • RELEVANCY SCORE 3.27

    DB:3.27:File To Jdbc f1



    using the Xslt mapping how the sql query is generated.

    I have used all the required fields.

    Thanks,

    srini

    DB:3.27:File To Jdbc f1


    Hi,

    I think you are talking about the target JDBC structure right? Please post the entier scenario with source and the target strcuture and what is the problem you are facing.

    Thanks,

    Prakash

  • RELEVANCY SCORE 3.27

    DB:3.27:How To Determine What Index Is Required By A Query ? 3a


    Hi all,

    In our application, we create some complex View with complex query.

    The question is : How to determine what Index is required by the query ?

    I try using SQL Tuning Advisor, but it seems I can only use it After running TOP SQL.

    Is there aniway to determine the Index even Before the query under heavy load/ top sql ?

    Thank you very much,
    xtanto

    DB:3.27:How To Determine What Index Is Required By A Query ? 3a

    You can run your explain plan to check the table access path. You can create an index and see if the optimizer is using the index. Then compare the costs. Creating index will help only in some occassion and you need to provide complete details of the requirement to come to a conclusion of which type of INDEX as well. In some occassions, B*Tree index is useful, in few DW applications, bitmap will work efficiently with columns of low cardinality.

    So it is again the task for you to look into this.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/toc.htm

    Cheers
    Sarma.

  • RELEVANCY SCORE 3.27

    DB:3.27:Sql Query Help Required cc


    Hi All,

    I need a query that will extrcat the time value from a date field. Suppose say that we A COLUMN date_val is defined with timestamp data type.

    I want a query that will only display the time values from the column.

    Kindly help.

    DB:3.27:Sql Query Help Required cc

    select to_char(systimestamp, 'HH24:MI:SS') time from dual

    TIME
    --------
    15:27:54
    1 row selected.

  • RELEVANCY SCORE 3.27

    DB:3.27:Sql Query Required 9m


    Hi Everyone,We have a requirement that entitlements gets provisioned to user on request. So once approver approves the request that entitlement gets provisioned to the user. So we are looking for a sql query where on entitlement gets provisioned it should provide the complete details of the request and the approvers details who had approved the request.Thanks.

    DB:3.27:Sql Query Required 9m

    Approvers are in the SOAINFRA tablespace. Check the WF_TASK table for the approvers. Or you can use the SOA Server APIs to retrieve them.-Kevin

  • RELEVANCY SCORE 3.27

    DB:3.27:Variable Required, But Value Found. 13


    We are running a jsp that runs a sql query and posts the results to the screen. we keep getting the error message "Variable required, but value found." It doesn't have a line number where the error is either. Any idea what this means? Thanks in advance

    DB:3.27:Variable Required, But Value Found. 13

    We are running a jsp that runs a sql query and posts the results to the screen. we keep getting the error message "Variable required, but value found." It doesn't have a line number where the error is either. Any idea what this means? Thanks in advance

  • RELEVANCY SCORE 3.26

    DB:3.26:Issue With Lookup Query Oim9.1 ca


    Guys,

    I am trying to set lookup query for my object form, but its giving me error "Required property not set". I have ran the query in sql client and its working perfectly fine.

    Thanks in advance.

    Thanks.

    DB:3.26:Issue With Lookup Query Oim9.1 ca

    Check this: LookupField with Lookup Query
    and Re: Lookup Column name
    and Re: Conditional forms
    and Re: Lookup Queries doesn't work when the source column is a ComboBox

    -Bikash

    Edited by: Bikash Bagaria on Dec 19, 2012 10:24 AM

  • RELEVANCY SCORE 3.26

    DB:3.26:Sorting Report 73


    I've made a query which has got order by clause and executing it on sql prompt so it sorting the data as required but when I am making a matrix report and using the same query then it doesn't returns the desired sorting result ,
    please guide,
    Thanks in advance.

    DB:3.26:Sorting Report 73

    perhaps not with the wizard, but with setting the properties ...

  • RELEVANCY SCORE 3.26

    DB:3.26:Re: Help Required Query Tuning In Sql x8


    Use explain plan with DBMS_XPLAN to tune the query.

    http://www.psoug.org
    click on Morgan's Library
    click on Explain Plan

    DB:3.26:Re: Help Required Query Tuning In Sql x8

    Hi all,

    I have the following function which is taking a lot of time to execute.
    Please find function below.Appreciate ur time and effort on this.

    CREATE OR REPLACE FUNCTION GetProjectStatus
    (
    p_DSS_PRJ_KEY IN VARCHAR2,
    p_YEAR IN NUMBER,
    p_CAL_ID IN VARCHAR2,
    p_QTR IN VARCHAR2 := 'ALL'
    )
    RETURN NUMBER IS

    l_PrjCount NUMBER := 0; --A Flag which is 1 when project exist in that year and 0 when not present

    BEGIN
    select count into l_prjCount from
    (select decode(count(*), 0, 0, 1) as count
    from DSS_PRJ_FSYR_D a, dss_period_d b
    where b.CAL_ID = p_CAL_ID
    and b.fy_year = p_YEAR
    and (b.FY_QTR = p_QTR OR 'ALL'=p_QTR)
    and a.TRANS_DT = b.TRANS_DT
    AND a.DSS_PRJ_KEY = p_DSS_PRJ_KEY);

    Return nvl(l_PrjCount,0);

    END;
    /

    null

  • RELEVANCY SCORE 3.26

    DB:3.26:Sync Exchange Meetings To A Sql Server fa


    What is the amount of effort required to synchronize Exchange meetings to an external SQL database.

    We would like to query for a specific group of users and keep a SQL databse populated with their meetings and update the SQL database when meetings are changed or deleted.

    thanks

    Dean

    DB:3.26:Sync Exchange Meetings To A Sql Server fa

    Hi
    Maybe a third part app as below can assist you?
    http://www.exchangewise.com/Products/MXSync/

  • RELEVANCY SCORE 3.26

    DB:3.26:Sql Query To Format Numbers zj


    Hi all,

    Need assistance in building sql server query to format numbers as dont want to handle this formatting in front end.

    required format as under:
    format-number(@field,'###,##0')

    DB:3.26:Sql Query To Format Numbers zj

    It gives me below error:
    Incorrect syntax near the keyword 'NULL'.

  • RELEVANCY SCORE 3.26

    DB:3.26:How Can Sql 2000 Query Analyser Connect Sql Servet 2008? as


    Hi,
    In our company, we are planning a upgrade from SQL Server 2000 to SQL Server 2008.
    As we are using SQL 2000 query analyzer to connect database, we have setup two
    testing SQL Server 2008 database, one is standard edition, another is express edition.
    Two servers are setup by different parties. But we found that we can use SQL 2000 query
    analyzer to connect the standard edition but it is failed to connect to the express edition
    database. Does any expert know the behind reason for this? Any configuration required
    in allowing the old client to connect to the new SQL Server 2008 database?
    Very appreciate if you can give me some hints on it.
    Thanks a lot,
    Raymond

    DB:3.26:How Can Sql 2000 Query Analyser Connect Sql Servet 2008? as

    Hi Raymond,
    According to your error message, please refer to this
    similar thread.Best Regards,
    Peja

    Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 3.26

    DB:3.26:Sql Query cp


    Hi my requirement is : write a query for
    Input is : SURESH
    required output is : S
    U
    R
    E
    S
    H
    Please send me the solution.

    DB:3.26:Sql Query cp

    I face this question in an interview. that's why I want to learn more things from this . But I will follow ur suggestion. You r 100% correct. But to develop my knowledge I am asking the queries which i have faced.

    Thank you.

  • RELEVANCY SCORE 3.25

    DB:3.25:Query For Sorting m9


    Hi All,

    I need a PL SQL query which helps me to retrive the data in the sorted fashion mentioned in required output.

    Table Data :-

    IDrack_details
    1A
    2B
    1B
    3A
    2C
    4C
    1C
    4A
    3B

    Required Output :-

    IDrack_details
    1A ,B,C
    2B,C
    3A,B
    4A,C

    Thanks in Advance

    DB:3.25:Query For Sorting m9

    Thanks a lot centinul ur links was reply helpful.. have a great day ahead...

  • RELEVANCY SCORE 3.24

    DB:3.24:Authenticate Oracle Userid &Amp; Password ds


    I have a requirement wherein i need to authenticate the oracle username password
    similar authentication functionality (maybe using PL/SQL or check using SQL query) is required as when a user connects to DB using sqlplus or any tool.
    ANy leads/suggestions at the earliest will be very much appreciated
    Cheers
    Rajesh

    DB:3.24:Authenticate Oracle Userid &Amp; Password ds

    If all you want to do is ensure that the user is a valid Oracle user, then simply login using the username and password supplied by the user, You appication would then need to trap the ORA-01017: invalid username/password; logon denied error returned if either the username or the password were invalid.

    John

  • RELEVANCY SCORE 3.23

    DB:3.23:Make List Of Values For Required Bind Variables pk


    In the SQL query for my View Object, I have a bind variable, which I set to "required". In the search form resulting from a View Criteria, a textbox shows up asking the user for the value of that variable. Is there a way to make it a List of Values instead?

    DB:3.23:Make List Of Values For Required Bind Variables pk

    for the bind variable you can provide the attribute name in the Expression. This will set the value of the bind variable to the transient attribute

  • RELEVANCY SCORE 3.23

    DB:3.23:Re: Inline Select Statement And Sql Optimizatino m8


    You should execute your statements in SQL*Plus and gather the information required as described in the following links...

    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting

    This is required if you want to determine performance differences.

    DB:3.23:Re: Inline Select Statement And Sql Optimizatino m8


    starts calling his coffee 'optimizatino' from now on and receives wary/suspicious looks from collegues

    I'm with you there! Every Oracle developer should start their day with a warm mug of Optimizatino! :D

  • RELEVANCY SCORE 3.22

    DB:3.22:T-Sql Help zp


    Hi Guys,

    My input column

    Data Types
    aur_storeidInteger
    SaleDate Date

    Table Name: SalesFacttable
    aur_id SaleDate
    1500 2010-02-10
    Date Output Required in string using SUBSTRING:
    2010-09-10

    I want T-SQL query to convert date to string

    Thanks in advance

    D

    DB:3.22:T-Sql Help zp


    I want T-SQL query to convert date to string

    The following pages deal with datetime conversions:
    http://www.sqlusa.com/bestpractices2005/centurydateformat/
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    http://sqlusa.com/bestpractices2005/sqlserverstringtodate/
    Let us know if helpful.Kalman Toth, SQL Server Business Intelligence Training; SQL 2008 GRAND SLAM

  • RELEVANCY SCORE 3.21

    DB:3.21:Sql-Like Query On A Datatable / Dataview Object ax


     
    Hello all,
     
    I am writing a service that queries a DB once each time a timer elpases, returning the data to a DataTable. From this table I am creating multiple DataView's for various purposes. One view I need to create required the use of am aggregate function, namely COUNT.
    This is what the SQL query would look like:-
     

    Code Snippet

    DB:3.21:Sql-Like Query On A Datatable / Dataview Object ax

    Apologies I was careless when giving the SQL example.
    The point is I need to run aggregate functions on DataTable objects.
     
    I'll give that a try.
    Thanks,
    Sean

  • RELEVANCY SCORE 3.21

    DB:3.21:Re: Help Required.....Nested Bean ax


    Use a SQL JOIN query (advantage: single query, disadvantage: duplicate data) or a SQL IN query (disadvantage: two queries, advantage: no duplicate data). Which to use depends on how large the duplicate data is and how it can be weighted against the cost of a 2nd query. How to handle the resultset for each is pretty straightforward.

    DB:3.21:Re: Help Required.....Nested Bean ax

    Hello All I have two tables(Account, Info) respectively. their table structure would be as follows Account_ Accont_Number Number(10) Primary Key BankNamve Varchar2(30) Info_ Accont_Number Number(10) Forign Key Details Varchar2(300) ________________________________________________________________________________________________________________________________ So for each value of Account_number(in Account table) there exixts multiple entries in info table. And i need info table bean as an arraylist in Account table bean. How do i proceed with this? the solution i am trying to write individual beans. i want an arraylist for the Info table bean. How can i do this? How to call info table bean from Account bean? AccountTableBean{ int AccNumber; String Bank; Arraylist infoTableBean; } InfoTableBean{ int AccNumber; String Details; } Thanks Diana

  • RELEVANCY SCORE 3.20

    DB:3.20:Size Of Sql Query Before Execution And After Execution pk


    hi all
    I need help on how can i find out the size of SQL query before execution and after execution
    The query can be any query select / insert / update

    Can anyone help me if any system tables help to find out the required size i mentioned

    Urgent help is required

    Thanking in advance

    DB:3.20:Size Of Sql Query Before Execution And After Execution pk

    what do you mean by:
    before execution and after execution

  • RELEVANCY SCORE 3.20

    DB:3.20:Sql Query Required d8


    I have a table lets say table_1
    which has two columns
    col1, col2.
    Now I want a query which should do the following:
    1. Check where col1=col2 eg. data 1=1, 5=5
    2. Check the values retrieved in step 1 in both columns col1 and col2 throughout the table_1

    thanks,
    aks

    DB:3.20:Sql Query Required d8

    Hi Sarma,
    You have created right table, data and solution for this.
    This is really very helpful. let me give it a try

    thanks
    aks

  • RELEVANCY SCORE 3.18

    DB:3.18:What Can Be Ram Requirements For Using Sql Server 2012 In Window Server 2012 8f


    Hello

    I have 8GB RAM, Processor Intel(R) zeon(R) CPU E5-2609 Processor.
    OS Is Window Server 2012. In that I am using sql server 2012.
    I have also check minimum hardware requirement for sql server 2012.
    that Part I already know.

    But I have analyse that WindowServer 2012 also required 8GB RAM sql Server 2012 also required 8 GB RAM.

    At my side sql server is working very slow. ITs query fetching performance is very slow.
    So my doubt is that Is the RAM is the reasoo solve this issue?
    on that's why it is slow?
    Because WindowServer 2012 also required 8 GB RAM sql Server 2012 also required 8 GB RAM.

    So can anyone clear my doubt help me to solve this issue?

    DB:3.18:What Can Be Ram Requirements For Using Sql Server 2012 In Window Server 2012 8f

    I think you need to check and first learn how to change the configuration using sp_configure. This should perfectly work in any scenario.
    You answer doesn't say whether you have followed the procedure as requested.

  • RELEVANCY SCORE 3.18

    DB:3.18:Sql Query 3x


    Hi ,

    I have Table A and Table B

    Table A data:
    fid yid
    ---------------
    5460 1
    5460 2
    5412 2
    5460 3
    ..............
    ..............

    Like this I have more than 50k records(with other columns also...here not required)

    Table B data :

    yid value
    --------------
    1 500
    2 400
    3 700
    ............
    ...........

    Here yid and value is not repeated.

    I want a SQL query that can retrieve output like this:
    fid value
    --------------------------------
    5460 400,500,700
    5412 400
    ..........................
    .........................

    How to write this query? Is it possible in SQL.

    DB:3.18:Sql Query 3x

    Thanks Tolentino......After a little modification.....its all working...

    Thanks a lot.

  • RELEVANCY SCORE 3.18

    DB:3.18:Re: What Sql Or Pl/Sql Required For This Query? 98


    But there are 40000 records with all 40000 different values for XXXXXXX.

    DB:3.18:Re: What Sql Or Pl/Sql Required For This Query? 98

    There are about 40k rows with 974 country code while the remaining 250k rows are from other countries. Your query will update all the rows. But only for +974 means I should give where condition with 'WHERE TEL LIKE '+974%';

    I ran this query on test but it is taking a lot of time. Anyways thanks everybody for the help I will work on running this query faster.

  • RELEVANCY SCORE 3.18

    DB:3.18:Query Does Not Uses Indices mm


    I am using 10.2.0.1 database instance and wrote a SQL query which involves several tables but I had made sure all columns in where clause has got proper indexes. The query is fairly simple does not use any function etc. in where clause but inner joins.

    I have analyzed schema statistics using dbms_stats.gather_schema_stats... procedure and also added new required indexes to support this query.

    Now when I see explain plain for this query it still does full table scan? I do not understand why it is not using indices and does full table scan.

    Any comments?

    DB:3.18:Query Does Not Uses Indices mm

    Pgoel,
    The plan that you posted with the proper tags to help when reading the plan:
    ----------------------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes | Cost | Time |
    ----------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | | | | 279 | |
    | 1 | HASH UNIQUE | | 692 | 130K | 279 | 00:00:04 |
    | 2 | NESTED LOOPS | | 692 | 130K | 247 | 00:00:03 |
    | 3 | HASH JOIN | | 12 | 2184 | 223 | 00:00:03 |
    | 4 | HASH JOIN | | 12 | 2028 | 212 | 00:00:03 |
    | 5 | HASH JOIN | | 12 | 1608 | 203 | 00:00:03 |
    | 6 | HASH JOIN | | 3855 | 248K | 45 | 00:00:01 |
    | 7 | HASH JOIN | | 3855 | 132K | 20 | 00:00:01 |
    | 8 | TABLE ACCESS FULL | COD_SCHED_ITEMS | 3970 | 39K | 6 | 00:00:01 |
    | 9 | HASH JOIN | | 3064 | 75K | 13 | 00:00:01 |
    | 10 | INDEX FAST FULL SCAN | COD_SCHED_POLICY_PK| 3064 | 24K | 3 | 00:00:01 |
    | 11 | TABLE ACCESS FULL | COD_SCHEDULE | 3155 | 52K | 9 | 00:00:01 |
    | 12 | TABLE ACCESS FULL | COD_ASSET | 4982 | 151K | 25 | 00:00:01 |
    | 13 | TABLE ACCESS FULL | COR_ACL | 46K | 3124K | 157 | 00:00:02 |
    | 14 | TABLE ACCESS FULL | COR_POLGROUP | 3236 | 111K | 8 | 00:00:01 |
    | 15 | TABLE ACCESS FULL | COR_BASE_PRICE | 3247 | 41K | 11 | 00:00:01 |
    | 16 | INDEX RANGE SCAN | QAM_LOG_URI_IX | 58 | 580 | 2 | 00:00:01 |
    ----------------------------------------------------------------------------------------------Obtaining the plan from the 10053 trace was likely a minor goal of Sybrand when he suggested activating the trace. The plan implies that the cost based optimizer determined that Oracle would require 0.04 seconds to execute the plan and return the data. Does it take much longer than 0.04 seconds for the query to execute?

    As Sybrand pointed out, the 10053 trace shows the decisions made by the cost based optimizer when trying to determine the most efficient plan. If a potential step in the plan is determined to be more expensive (costly, assumed to require more time to execute) than a previously found method, the potential plan step is aborted. This process continues until one of:
    * All join order possibilities have been tried (8! = 40,320 possible)
    * 2,000 join order possibities have been tried
    * The continued examination of join combinations will require more time than Oracle predicts for the execution of the query.
    * And probably something else.

    The process and decisions made by the cost based optimizer are included in the 10053 trace. For some reason, possibily bad statistics, inappropriate initialization parameters, cardiality calcuation problems, or something else, Oracle calculated that retrieving the data from the tables using a full tablescan is less costly than an index access path. The 10053 trace will show why that happened.

    Charles Hooper
    IT Manager/Oracle DBA
    KM Machine-Fabricating, Inc.

  • RELEVANCY SCORE 3.15

    DB:3.15:Powershell Odbc + Postgresql + Insert Query cf


    Hi!
    I would like to send INSERT query to Postgre SQL. I've installed psqlODBC_x64 and configured System DSN ODBC Connection.
    My powershell v3 function for query like SELECT works well:
    function Get-ODBC-Data{
    param([string]$query=$(throw 'query is required.'))
    $conn=New-Object System.Data.Odbc.OdbcConnection
    $connStr = Driver={PostgreSQL Unicode(x64)};Server=SOMENAME;Port=5432;Database=DBNAME;Uid=SOMEUSER;Pwd=SOMEPASS;
    $conn.ConnectionString= $connStr
    $conn.open
    $cmd=new-object System.Data.Odbc.OdbcCommand($query,$conn)
    $cmd.CommandTimeout=15
    $ds=New-Object system.Data.DataSet
    $da=New-Object system.Data.odbc.odbcDataAdapter($cmd)
    [void]$da.fill($ds)
    $ds.Tables[0]
    $conn.close()
    }
    $query = select * from clients
    $result = Get-ODBC-Data -query $query
    But I can't write code that send INSERT query.
    Now I using workarouond with psql.exe from pgadmin. But this is two-ways method for one connection.
    I googled several times with different key word without effective result.Does enybody have experience with Powershell posgreSQL ?
    Thanks in advance.

    DB:3.15:Powershell Odbc + Postgresql + Insert Query cf

    Hi,
    Thanks for your sharing, this should be helpful for others!
    Regards,
    Yan LiCataleya Li
    TechNet Community Support

  • RELEVANCY SCORE 3.15

    DB:3.15:What Is Schema ? 11


    Hi,
    I am new to SQL Server and started it with SQL Server Express.
    I tried unfruitful to know about 'Schema' in SQL Server.
    I have to mention it as prefix for table name in SQL query. But if it is in dbo schema, it is not required.
    Please tell me about it..
    Thanks

    DB:3.15:What Is Schema ? 11

    http://msdn2.microsoft.com/en-us/library/ms190387.aspx

  • RELEVANCY SCORE 3.15

    DB:3.15:Connecting Sql Server 2005 Server From Sql Client 2000 (Query Analyzer) fk


    Hi, I was unable to connect SQL server 2005 server with SQL 2000 Query Analyzer client by providing the server name and the SQL credential required to connect it, though I was able to connect the same thru SQL server 2005 Managment studio and run the query.But while connectiing it from Query Analyzer(SQL 2000) if I provide port number with server name then I can connect it, please let me know the reason that why TCP/IP port number is required while connecting it from SQL server 2000 Query Analyzer.ThanksThanks!!
    MCP

    DB:3.15:Connecting Sql Server 2005 Server From Sql Client 2000 (Query Analyzer) fk

    See this MS support article help you
    How to connect to a named instance of SQL Server 2005 or SQL Server 2000 by using the client tools in the earlier version of SQL Server
    http://support.microsoft.com/kb/265808

  • RELEVANCY SCORE 3.15

    DB:3.15:Pass Field Name As Parameter To Query sj


    Hi,

    Following is SQL view of select query, which display data where [Station-A-1] is True. Is it possiblethat [Station-?-?] sent to query as parameter.

    SELECT Tool_Status.Master_Number, Tool_Status.Tool_Number, Tool_Status.[Station-A-1]
    FROM Tool_Status
    WHERE (((Tool_Status.[Station-A-1])=-1));

    There are four seprate fields to represent each station. On Form I want to send required Station name (A-1, A-2, B-3, B-4) to query which display datain subform.

    Is it possible, what is the alternate.

    Regards

    Atif

    DB:3.15:Pass Field Name As Parameter To Query sj

    There is no need to mess with QueryDefs etc.

    Let's say the name of the subform as a control on the main form is MySubform.

    Private Sub OutageList_AfterUpdate()
    Dim strSQL As String
    strSQL = "SELECT Tool_Status.Master_Number, Tool_Status.Tool_Number, Tool_Status.[" _
    Me.OutageList "]FROM Tool_StatusWHERE Tool_Status.[" Me.OutageList "]=-1"
    Me.MySubform.Form.RecordSource = strSQL
    End Sub

  • RELEVANCY SCORE 3.15

    DB:3.15:Reusing Sql d9


    I'm trying to write a function that will call an SQL query
    from a file, what I have works, but I was wondering if there was a
    more elegant way to do it? - I am particularly concerned with the
    "dump" part. another query to do the dump does not sit well with
    me.

    application.cfm
    application.ServerRoot = "#Replace(GetCurrentTemplatePath(),
    "/Application.cfm", "", "all")#";

    Call the function
    cfset #RunSql("GetAppVars","GetAppVars")#

    contents from sample sql file
    select * from app_ApplicationVars

    the function
    cffunction name="RunSql" returntype="any"
    output="yes"
    !--- the name of the query ---
    cfargument name="QueryName" type="string"
    required="yes"
    !--- the sql data file to get ---
    cfargument name="SqlData" type="string"
    required="yes"
    !--- whether or not to dump(debug) the query ---
    cfargument name="DumpVar" type="string"
    required="no"
    cfquery name="#QueryName#"
    datasource="#application.DataSource#"
    cfinclude
    template="#Application.ServerRoot#/assets_sql/#SqlData#.sql"
    /cfquery
    cfif IsDefined("DumpVar")
    cfquery name="DumpQuery"
    datasource="#application.DataSource#"
    cfinclude
    template="#Application.ServerRoot#/assets_sql/#SqlData#.sql"
    /cfquery
    cfdump var="#DumpQuery#"
    /cfif
    /cffunction

    DB:3.15:Reusing Sql d9

    Is there a reason you're not using CFCs for this?

  • RELEVANCY SCORE 3.15

    DB:3.15:Required Field pa


    Hi,

    I have some problems with my agenda. There are several activity during a month. If I click on an activity then I get a report with every activity in the database. I want to have a report that shows the details of that activity. In that report there is an URL link. So that report has to made from SQL query.

    But I can not find in a report from SQL query where I can set a Required field. I know that if you create a report from Query Wizard, you can set a required field.
    But I want also have that URL link in the report. That URL Link is only possible if I made a report based a SQL query.

    Does anyone know how to solve this problem ?

    Thanks a lot !!!!

    Chu Lam

    DB:3.15:Required Field pa

    Hi,

    I have some problems with my agenda. There are several activity during a month. If I click on an activity then I get a report with every activity in the database. I want to have a report that shows the details of that activity. In that report there is an URL link. So that report has to made from SQL query.

    But I can not find in a report from SQL query where I can set a Required field. I know that if you create a report from Query Wizard, you can set a required field.
    But I want also have that URL link in the report. That URL Link is only possible if I made a report based a SQL query.

    Does anyone know how to solve this problem ?

    Thanks a lot !!!!

    Chu Lam

  • RELEVANCY SCORE 3.15

    DB:3.15:How To Retrive World Server Time In Sql sd


    Hi all,

    I want to write a query in sql in which our system date matches with world server time.
    My question is which query is required in SQL to retrive world server time??

    Thanks in advance...
    Neerav

    DB:3.15:How To Retrive World Server Time In Sql sd

    World Server time
    Visit:http://www.worldtimeserver.com/current_time_in_US-NY.aspx
    i want this time to be displayed while executing sql query

  • RELEVANCY SCORE 3.15

    DB:3.15:Need A Sql Query dm


    Hi,If the Input is 123,4,5...The required output should be in separate rows like123--in one row4----in next row5---- in next rowAnd if the input is 'ABC,DEF,GYH', the required output should beABCDEFGYHThanks in advance

  • RELEVANCY SCORE 3.15

    DB:3.15:Problem Access Index Frm Sql Query 9j


    hi people.

    I need a little help.

    my table has 2 indexes (table01 and table02). My query doesn't
    make use of table01 (use table_02), but it uses all the fields
    that are required.

    please help me

    regards.

    DB:3.15:Problem Access Index Frm Sql Query 9j

    Ok. I'm agree but my query

    WHERE sucursal = 20 ---
    rut_cliente = 5 and
    digito_cliente = 10 and
    tipo_docto_pen = 35 and
    numero_docto_pen = 15

    I use the exact value that I required to find a especific row.
    And Oracle choose another Index (index_01) that it heven't the
    field sucursal.

    Why?

    I don't know.
    I'm re-create PK and indexes but nothing work.

    thanks for your help.

  • RELEVANCY SCORE 3.14

    DB:3.14:Sql*Developer 'Query Results' Not Displaying ma


    I have just recently installed SQL*Developer v3.2.2 and after I run a SQL query the tab 'Query Result' tab is not displayed. I have tried to show this tab and to use the arrow keys at the bottom of the screen to display this screen but I cannot view the query results. I have used v1.5.1 in the past and know that it should display when after running a query and can be resized if required but I cannot seem to show it is v3.2.2

    DB:3.14:Sql*Developer 'Query Results' Not Displaying ma

    Hi,
    Yes, I did install to a clean directory. I have even deleted all contents of the directory and re downloaded
    the software again to the same directory but this did not work either it still remembered the original settings.Keep in mind there are two locations that an installation updates:
    1. The SQL Developer installation directory (which you deleted).
    2. The User-Related Information (in your "user home" directory), which is updated by the settings migration

    Perhaps Jim meant you should also remove the user settings for the last SQL Developer version installed and possibly even avoid migrating the old 1.5.x settings when you first start SQL Developer after that. See the following forum thread, probably unrelated to your situation, but containing where to find the location of user-related information in the Help:
    Re: IDE issue - Query Result grid is not selectable or scrollable

    Hope this helps,
    Gary
    SQL Developer Team

  • RELEVANCY SCORE 3.14

    DB:3.14:Sql Query On Parallels 98





    Can we query (sql)the parallels database for getting the reports? if yes then how ?

    DB:3.14:Sql Query On Parallels 98




    Can we query (sql)the parallels database for getting the reports? if yes then how ?

  • RELEVANCY SCORE 3.14

    DB:3.14:Help On Missing Indexes 9x


    Hi All,
    We are using SQL Server2005 Enterprise Edition. When i have run the missing indexes query i got the missing indexes information. Is it required to recreate the index or any updations are required?Please guide me on this.
    Waiting for valuable replies.

    DB:3.14:Help On Missing Indexes 9x

    The following article is on optimization including missing indexes:
    http://www.sqlusa.com/articles/query-optimization/Kalman Toth SQL 2008 GRAND SLAM
    New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012

  • RELEVANCY SCORE 3.14

    DB:3.14:Dynamic Allocation Of Sql Report Attribute / Post-Query mz


    I need to display a derived value in a sql query region by calling a stored function. Numerous threads favor the inclusion of such a function in the SQL statement itself however my function does not (cannot) have the pragma (write no database state) required so that it may be called from a sql statement. What I need is "post-query" alike functionality.

    I have found other threads that questioned the feasability of my request by using a derived column, however none lead to a solution meeting my demand.

    Yves

    DB:3.14:Dynamic Allocation Of Sql Report Attribute / Post-Query mz

    I need to display a derived value in a sql query region by calling a stored function. Numerous threads favor the inclusion of such a function in the SQL statement itself however my function does not (cannot) have the pragma (write no database state) required so that it may be called from a sql statement. What I need is "post-query" alike functionality.

    I have found other threads that questioned the feasability of my request by using a derived column, however none lead to a solution meeting my demand.

    Yves

  • RELEVANCY SCORE 3.14

    DB:3.14:Sql Experts Please Help For A Query zm


    I have following table1.
    What query can give the result as given below, SQL experts please help on this.

    TABLE1

    Event DATETIME
    ----------------------------------
    in 2/JAN/2010
    out 2/JAN/2010
    in 13/JAN/2010
    out 13/JAN/2010
    in 5/JAN/2010
    out 5/JAN/2010

    RESULT REQUIRED FROM THE SQL QUERY

    COL1_IN COL2_OUT
    ------------------------------------------
    2/JAN/2010 2/JAN/2010
    13/JAN/2010 13/JAN/2010
    5/JAN/2010 5/JAN/2010

    DB:3.14:Sql Experts Please Help For A Query zm

    I tried to help, but this puzzles me.
    Why is this not returning pre-selected set of rows, why it's doing some merge join cartezian ?

    SQL select * from v$version;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    SQL select * from table1;

    EVENT DATETIME
    ---------- ---------------
    in 2/JAN/2010
    out 2/JAN/2010
    in 13/JAN/2010
    out 13/JAN/2010
    in 5/JAN/2010
    out 5/JAN/2010

    6 rows selected.

    SQL explain plan for
    2 with a as
    (select datetime from table1 where event='in'),
    b as
    (select datetime from table1 where event='out')
    select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;

    Explained.

    SQL set wrap off
    SQL set linesize 200
    SQL select * from table(dbms_xplan.display);

    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 185132177

    -------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    -------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | | 9 | 288 | 8 (0)| 00:00:01 |
    | 1 | MERGE JOIN CARTESIAN| | 9 | 288 | 8 (0)| 00:00:01 |
    |* 2 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 3 (0)| 00:00:01 |
    | 3 | BUFFER SORT | | 3 | 48 | 5 (0)| 00:00:01 |
    |* 4 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 2 (0)| 00:00:01 |
    -------------------------------------------------------------------------------

    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Predicate Information (identified by operation id):
    ---------------------------------------------------

    2 - filter("EVENT"='in')
    4 - filter("EVENT"='out')

    Note
    -----
    - dynamic sampling used for this statement

    21 rows selected.

    SQL with a as
    (select datetime from table1 where event='in'),
    b as
    (select datetime from table1 where event='out')
    select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;

    COL1_IN COL2_OUT
    --------------- ---------------
    2/JAN/2010 2/JAN/2010
    2/JAN/2010 13/JAN/2010
    2/JAN/2010 5/JAN/2010
    13/JAN/2010 2/JAN/2010
    13/JAN/2010 13/JAN/2010
    13/JAN/2010 5/JAN/2010
    5/JAN/2010 2/JAN/2010
    5/JAN/2010 13/JAN/2010
    5/JAN/2010 5/JAN/2010

    9 rows selected.

    SQL

  • RELEVANCY SCORE 3.14

    DB:3.14:Row Missing From Results Set Returned From Sql Query k7



    I've made a change to a Query Template adding an extra column to a Select; this works and returns the required data. This Query Template is used in an SQLQuery in a Business Logic Transaction. However, since my change to the Query Template I can no longer see the Rows beneath Results/Rowsets/Rowset under the SQL Query in the Transaction's Link Editor. In the SQL Query Configuration, I have reset and re-added the modified Query Template to no avail. The transaction still appears to be working correctly. I have also tried creating a new transaction containing nothing but an SQL Query linking to this template and this is also not showing the rows.

    Why can I no longer access the rows of the query? Is there something I need to do to make them re-appear?

    Thanks,

    John.

    DB:3.14:Row Missing From Results Set Returned From Sql Query k7


    I've realised what was wrong. My query was looking for rows that matched a specific set of criteria and there were none that matched at that time therefore no rows were displayed in the transaction - I thought it would still show the row structure even if the query returned nothing at the time. So I had to change the where clause in the query so that it returned some values until I had reloaded the Query Template in the transaction and Generated Sample XML. Once this was done I could see the rows. Then I changed the where clause in the query back the way it was.

    John.

  • RELEVANCY SCORE 3.14

    DB:3.14:Required Field pa


    Hi,

    I have some problems with my agenda. There are several activity during a month. If I click on an activity then I get a report with every activity in the database. I want to have a report that shows the details of that activity. In that report there is an URL link. So that report has to made from SQL query.

    But I can not find in a report from SQL query where I can set a Required field. I know that if you create a report from Query Wizard, you can set a required field.
    But I want also have that URL link in the report. That URL Link is only possible if I made a report based a SQL query.

    Does anyone know how to solve this problem ?

    Thanks a lot !!!!

    Chu Lam

    DB:3.14:Required Field pa

    Hi,

    I have some problems with my agenda. There are several activity during a month. If I click on an activity then I get a report with every activity in the database. I want to have a report that shows the details of that activity. In that report there is an URL link. So that report has to made from SQL query.

    But I can not find in a report from SQL query where I can set a Required field. I know that if you create a report from Query Wizard, you can set a required field.
    But I want also have that URL link in the report. That URL Link is only possible if I made a report based a SQL query.

    Does anyone know how to solve this problem ?

    Thanks a lot !!!!

    Chu Lam

  • RELEVANCY SCORE 3.14

    DB:3.14:Query Required px


    Hi,
    How to write a SQL select query to display output as shown below.

    COL_1 COL_2 COL_3
    -------------------------------------------------------------
    ABC 12.13 1
    PRQ 15.66 2
    --------------------------------------------------------
    OUTPUT: SUM(COL_2) count(col_3)
    -------------------------------------------------------------

    Please send me the select query for the same

    thanks,
    Santhosh.S

    DB:3.14:Query Required px

    Look at "COMPUTE" command of SQLPlus..
    Or for a fun:

    SQL select ename,to_char(sal) sal,to_char(comm) comm from emp
    2 union all select '------------','---------','--------' from dual
    3 union all select 'Total',to_char(sum(sal)),to_char(count(comm)) from emp;

    ENAME SAL COMM
    ------------ ---------- ----------
    SDF 800
    ALLEN 1600 300
    WARD 1250 500
    JONES 2975
    MARTIN 1250 1400
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500 0
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300
    ------------ --------- --------
    Total 29025 4

    16 rows selected.

    Or

    SQL select ename,sum(sal) sal,count(comm) comm
    2 from emp
    3 group by rollup(ename);

    ENAME SAL COMM
    ---------- ---------- ----------
    ADAMS 1100 0
    ALLEN 1600 1
    BLAKE 2850 0
    CLARK 2450 0
    FORD 3000 0
    JAMES 950 0
    JONES 2975 0
    KING 5000 0
    MARTIN 1250 1
    MILLER 1300 0
    SCOTT 3000 0
    SDF 800 0
    TURNER 1500 1
    WARD 1250 1
    29025 4

    15 rows selected.

  • RELEVANCY SCORE 3.14

    DB:3.14:Flashback Query Privilege p3


    What privileges are required to run table-level flashback queries using the "as of timestamp" clause in Oracle9i?

    Tapani Lindgren
    ---

    SQL select sysdate from dual;

    SYSDATE
    ---------
    27-OCT-04

    SQL select sysdate from dual as of timestamp sysdate;
    select sysdate from dual as of timestamp sysdate
    *
    ERROR at line 1:
    ORA-01031: insufficient privileges

    SQL

    DB:3.14:Flashback Query Privilege p3

    You also have to make sure that you have run the following on the table that you want to run the Flashback query against:

    ALTER TABLE tablename ENABLE ROW MOVEMENT;

    And you'll want to coordinate the size of your UNDO tablespace with the init parm value of UNDO_RETENTION, and perhaps even look into RETENTION GUARANTEE (available via the ALTER TABLESPACE commend against the UNDO tablespace).

    -Chuck

  • RELEVANCY SCORE 3.12

    DB:3.12:Sbs 2011 Standard With Premium Add-On x7


    Dear All,
    I have a query that SBS 2011 Standard with Premium Add-on required seperate hardware or can install SQL on SBS 2011 Standard edition.
    kindly update me if required seperate physical box for Standard and Premium.
    Thanks,

    DB:3.12:Sbs 2011 Standard With Premium Add-On x7

    Yes MS supported SBS 2008 and now 2011 as virtualized guests.
    Steve
    Bigteddy wrote in message news:4f59d5a1-d1cc-487a-b24b-e5f0048e9231@communitybridge.codeplex.com...

    Hi Larry,

    Although I've seen a lot of talk about virtualizing SBS, is it actually a Microsoft supported scenario? This is certainly one way to get the most out of your hardware, because all you need is more memory, really. (assuming you have a modern powerful server
    with enough disk space).

  • RELEVANCY SCORE 3.12

    DB:3.12:Sql Query For Free Disk Space 81


    Hi, I have a requirement to produce severalcustom free disk space reports basedaround groups. This will be on a 2012 R2 management group.For a given group, does anyone knowthe SQL tables and the joins required to produce
    both the free space % and free space MB in one query?
    Thanks in advance,
    Steve

    DB:3.12:Sql Query For Free Disk Space 81

    what did you means of free space % and free space MB?
    does it means the HD free or DB free space?
    I assume that its means DB free space and you may refer to the following SQL statement
    ********************

    select Path, displayname,ObjectName, CounterName, avg(SampleValue) as Value, getdate() as date

    from Perf.vPerfRaw pvpr
    inner join vManagedEntity vme on pvpr.ManagedEntityRowId = vme.ManagedEntityRowId

    inner join vPerformanceRuleInstance vpri on pvpr.PerformanceRuleInstanceRowId = vpri.PerformanceRuleInstanceRowId

    inner join vPerformanceRule vpr on vpr.RuleRowId = vpri.RuleRowId
    WHERE ObjectName = 'SQLServer : Database'
    AND CounterName like 'DB Total Free Space%'
    AND pvpr.DateTime DATEADD(minute, -60, GETUTCDATE())
    AND Path in (select DisplayName ';MSSQLSERVER' from OperationsManager.dbo.RelationShip r with (nolock) inner join OperationsManager.dbo.basemanagedentity bme

    with (nolock) on bme.BaseManagedEntityId = R.TargetEntityId
    Where SourceEntityId in ( select BaseManagedEntityId from OperationsManager.dbo.basemanagedentity with (nolock) where DisplayName LIKE

    '%SQL computer%') and r.IsDeleted=0)
    group by Path, displayname,ObjectName, CounterName
    *********************************************
    Roger

  • RELEVANCY SCORE 3.12

    DB:3.12:Re: Sql Query sm


    Duplicate:

    SQL Query help needed

    DB:3.12:Re: Sql Query sm

    Instead of messing up the forums posting duplicate version of the same question

    Re: SQL Query help needed

    It would be better if you spent your time reading the FAQ instead.

    SQL and PL/SQL FAQ

    Paying particular attention to *2. How do I ask a question on the forums?*

    SQL and PL/SQL FAQ

    *2) Thread Subject line*
    Give your thread a meaningful subject, not just "help please", "Query help" or "SQL". This is the SQL and PL/SQL forum.

    And also the sections on Sample Data, Expected Output and *Formatting with {noformat} {noformat} Tags*

  • RELEVANCY SCORE 3.12

    DB:3.12:Sql Server 2008 Query Execution Time Is Different If I Execute It In Management Studio Or From Code (.Net) dm


    When I execute query from software which i wrote in c# it required lots of time to complete but if I execute exactly the same query from management studio it will be done in seconds. In both cases execution plan is the same.

    DB:3.12:Sql Server 2008 Query Execution Time Is Different If I Execute It In Management Studio Or From Code (.Net) dm

    I probably confused this thread with another one. I thought I provided a link to Plamen's blog
    Check this one also
    Parameters Sniffing problem

    Premature optimization is the root of all evil in programming. (c) by Donald Knuth

    Naomi Nosonovsky, Sr. Programmer-Analyst

    My blog

  • RELEVANCY SCORE 3.11

    DB:3.11:Re: Help Required Query Tuning In Sql 88


    cant understand why you need a cursor here?

    DB:3.11:Re: Help Required Query Tuning In Sql 88

    Hi all,

    I have the following function which is taking a lot of time to execute.
    Please find function below.Appreciate ur time and effort on this.

    CREATE OR REPLACE FUNCTION GetProjHealth
    (
    p_PRJ_ID IN VARCHAR2,
    p_CurrPrev VARCHAR:= 'Curr'
    )
    RETURN VARCHAR2 IS

    l_ProjHealth VARCHAR2(25):= 'N/A';

    CURSOR Curr_ProjHealth IS
    SELECT HEALTH||' ('||to_char(weekend_dt,'dd-Mon-yy')||')'
    FROM(
    SELECT PRJ_ID
    ,weekend_dt
    ,DECODE (RED, 0, DECODE(YELLOW, 0, 'GREEN', 'YELLOW'),'RED') HEALTH
    FROM ( SELECT PRJ_ID
    ,weekend_dt
    ,SUM (DECODE(PARAMETER_HEALTH,'RED',1,0)) RED
    ,SUM (DECODE(PARAMETER_HEALTH,'GREEN',1,0)) GREEN
    ,SUM (DECODE(PARAMETER_HEALTH,'YELLOW',1,0)) YELLOW
    FROM DSS_iquest_prj_health_D

    WHERE PRJ_ID = p_PRJ_ID
    AND weekend_dt = (select max(weekend_dt) from dss_iquest_prj_health_d where prj_id=p_PRJ_ID)
    GROUP BY PRJ_ID ,weekend_dt
    ) );

    BEGIN

    OPEN Curr_ProjHealth;
    FETCH Curr_ProjHealth INTO l_ProjHealth;
    CLOSE Curr_ProjHealth;

    RETURN nvl(l_ProjHealth,'N/A');

    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);

    END;
    /

  • RELEVANCY SCORE 3.11

    DB:3.11:Generating Html k8


    Am using a servlet to generate HTML code, required to use a drop down box, and depending on the result generate an SQL query, am having problems getting the HTML value of the drop down box, referenced in the java code for the SQL query. Any suggesions very gratefully received...

    DB:3.11:Generating Html k8

    AlunJones,

    From the code you have posted it seems like you are trying to create your sql query (being a java String object) during the creating of your HTML page.

    You have to understand the diffrence between client side and server side code. Your client side code is your HTML code that is loaded up into your browser; and by the time that happens the String object containing your query will be destroyed anyways. While your server side code is the code that you have writen in your servlet; and this code can not determine what the client will select when the HTML page reaches the client.

    I think that what you want to do is, depending on what the client selects you want to load some data into some other select box or html component. Considering that is true I'll give you a few options that you can go about.

    Option 1:
    Load all possibilities of your data before creating your HTML page and put it into your HTML page in forms of javascript arrays. Then when the client selects an option your can have a javascript event to load the data from the array to where you want to place it.

    This solution will not require you to repost your page, BUT will have an overload because you will have to load all of your data into your HTML page.

    Option 2:
    Create your page in a way that when the client makes a selection on the drop down the page is posted, then on the server side you can read what selection the client made, run your query to get the appropreate data and return the same page back to the client with the data populated into the other components.

    Option 3:
    Use server side scripts, I dont have much information about this but one of my friends told me that he achieved this functionality useing server side scripting, you might want to look into that as well.

    Hope you find this material helpful
    Regards
    Omer

  • RELEVANCY SCORE 3.11

    DB:3.11:?How To Get The Sql Being Executed jm


    Hi, this is a 2 part question, note that I'm using 10.1.0.3:

    1) When running queries against a ROLAP cube (using BI Beans or the Excel addin), how can I trace the SQL that is being executed?

    2) When using a MOLAP cube, its no longer required to "enable" the cube for SQL access. However, my question is, if I want to query it using a standard SQL tool, how do I do this? It doesn't seem like there are any views, etc. that I can query against?

    Thanks!
    Scott

    DB:3.11:?How To Get The Sql Being Executed jm

    Mark, thanks for your feedback, I'll try to run with these. My high level problem is I'm an Oracle Express guy, so some of the inner workings of Oracle (i.e. how to trace sessions) are completely foreign.

    Thanks for pointing me in the right direction! I'll post back results when I'm able.

    Thx,
    Scott

  • RELEVANCY SCORE 3.11

    DB:3.11:Question About Querying Tables In Seperate Databases, Sql Server 2005. 3k


    Having successfully logged in to SQL Server 2005, and having the required permissions, what is the general syntax for running a query across two or more databases, and tables therein? --example: Select One.Name, Two.Surname from database1.tableOne as One, database2.table2 as Two;

    DB:3.11:Question About Querying Tables In Seperate Databases, Sql Server 2005. 3k

    In the following example, the database context is set to termpdb. Yet, with 3-parts naming, you can refer to tables in another database (on the same server - if server is different, it requires 4-parts naming: server.database.schema.table).If we set the database contect to AdventureWorks2008, we can use 2-parts naming, or if the schema is the default dbo, we can use 1-part naming (just the table name).
    USE tempdb;
    SELECT
    s.BusinessEntityID
    ,p.Title
    ,p.FirstName
    ,p.MiddleName
    ,p.LastName
    ,p.Suffix
    ,e.JobTitle
    ,pp.PhoneNumber
    ,pnt.Name AS PhoneNumberType
    ,ea.EmailAddress
    ,p.EmailPromotion
    ,a.AddressLine1
    ,a.AddressLine2
    ,a.City
    ,StateProvinceName = sp.Name
    ,a.PostalCode
    ,CountryRegionName = cr.Name
    ,TerritoryName = st.Name
    ,TerritoryGroup = st.[Group]
    ,s.SalesQuota
    ,s.SalesYTD
    ,s.SalesLastYear
    FROM AdventureWorks2008.Sales.SalesPerson s
    INNER JOIN AdventureWorks2008.HumanResources.Employee e
    ON e.BusinessEntityID = s.BusinessEntityID
    INNER JOIN AdventureWorks2008.Person.Person p
    ON p.BusinessEntityID = s.BusinessEntityID
    INNER JOIN AdventureWorks2008.Person.BusinessEntityAddress bea
    ON bea.BusinessEntityID = s.BusinessEntityID
    INNER JOIN AdventureWorks2008.Person.Address a
    ON a.AddressID = bea.AddressID
    INNER JOIN AdventureWorks2008.Person.StateProvince sp
    ON sp.StateProvinceID = a.StateProvinceID
    INNER JOIN AdventureWorks2008.Person.CountryRegion cr
    ON cr.CountryRegionCode = sp.CountryRegionCode
    LEFT OUTER JOIN AdventureWorks2008.Sales.SalesTerritory st
    ON st.TerritoryID = s.TerritoryID
    LEFT OUTER JOIN AdventureWorks2008.Person.EmailAddress ea
    ON ea.BusinessEntityID = p.BusinessEntityID
    LEFT OUTER JOIN AdventureWorks2008.Person.PersonPhone pp
    ON pp.BusinessEntityID = p.BusinessEntityID
    LEFT OUTER JOIN AdventureWorks2008.Person.PhoneNumberType pnt
    ON pnt.PhoneNumberTypeID = pp.PhoneNumberTypeID;
    GO

    Kalman Toth, SQL Server BI Training, SSAS OLAP, SSIS, SSRS; http://www.SQLUSA.com

  • RELEVANCY SCORE 3.11

    DB:3.11:Re: Unable To Execute The Query, Help Required In Sql Query. pj


    the columns you are selecting occur in multiple tables.
    Use a table prefix.

    SQL create table t
    2 (x int)
    3 /

    Table created.

    SQL
    SQL create table s
    2 (x int)
    3 /

    Table created.

    SQL
    SQL select x
    2 from t
    3 , s
    4 /
    select x
    *
    ERROR at line 1:
    ORA-00918: column ambiguously defined

    SQL
    SQL select t.x
    2 from t
    3 , s
    4 /

    no rows selected

    SQL

    DB:3.11:Re: Unable To Execute The Query, Help Required In Sql Query. pj

    IS THERE Any way where i can know how the tables are dependant on each other to find out the relations in between them.

    Somethying like if i provide the DB Name then it list the tbales which are dependant on each other to find out the relation in them.

    It is bugging me like anything ...and despite the repetated efforts of few days i am still at the begning.

    :(

    What could be the approach for this as there are around 60-70 tables in the DB and i don't know the dependancy/relationship between them.

    Kindly help me in this , i really appericate all of yours time.

  • RELEVANCY SCORE 3.11

    DB:3.11:Sql Query cs


    Hi
    Please give me the query to split the below table data as required output delemited by | symbol

    Table:

    Name
    ====
    aa|bb|ll
    zz|nn
    yy|pp|rr|tt
    ee

    i want the out as below

    col1 col2 col3 col4
    aa bb ll
    zz nn
    yy pp rr tt
    ee

    thanks in advance.

    DB:3.11:Sql Query cs

    hi, guess this will help u

    SELECT SUBSTR(name,1,2) col1, SUBSTR(name,3,2) col2, SUBSTR(name,5,2) col3, SUBSTR(name,7,2) col4
    FROM table_name;

    SUBSTR is a character manipulation function

    syntax: SUBSTR(column_name, position_in_number, no_of_letters)

  • RELEVANCY SCORE 3.11

    DB:3.11:Adhoc Sql 2005 Report / Report Builder Filters: Is There A Way To Prevent Users From Entering A Query That Is To Large sj


    In AD Hoc SQL Server 2005, Report Builder I need a way to prevent users from entering a query that is do large.  Need to make filters required or even better ONLY return the first 100,000 rows.

    DB:3.11:Adhoc Sql 2005 Report / Report Builder Filters: Is There A Way To Prevent Users From Entering A Query That Is To Large sj

    You could also extend the idea in another of Bob's blog posts to add a TOP n constraint to all of your report model queries.  I suggested that in another thread here:http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/a08303bc-999e-4d1c-bf94-b99e50dfdba8And the blog post with the sample (for sorting parameter dropdowns, but a similar approach could be used to inject TOP n) is here:http://blogs.msdn.com/bobmeyers/archive/2007/10/11/sorting-the-values-in-parameter-dropdowns-in-report-builder.aspx

  • RELEVANCY SCORE 3.11

    DB:3.11:Sql Query For Elm/Plm Licenses Required, Installed And Available k1



    Support Forum,

    I have been writing test SQL queries against the 'licensingresourceusage' and 'licenseserver' from the UCM Data Dictionary 10.0 and have not come across a method to retrieve total licenses, either 'Required', 'Installed' or 'Available' in ELM/PLM.

    I have retrieved licenses allocated to an enduser e.g. tin, copper, bronze, etc.  But I cannot find the overall license summary.

    Does the ELM/PLM run a separate dB with no SQL access? or I am not using the correct command syntax for the given tables in the UCM 10.0 Data Dictionary.

    Any suggestions would be greatly appreciated.  Thanks.

    DB:3.11:Sql Query For Elm/Plm Licenses Required, Installed And Available k1


    aman,

    this is a great article.  Many of the SQL queries I have done are included with this doc.  I was definitely on the right track.  I have no digested all of the doc...but from initial scan it seems right on track.  I appreciate the assistance.

    David

  • RELEVANCY SCORE 3.10

    DB:3.10:Connect To Database Engine Required Upon Opening Up A Query File. px


    Greetings,
    I am doing the following actions in SQL Server Management Studio Express Version 9.00.2047.00 running under Windows XP:
    File...Open...File...Click script file name...Open...
    Everytime I do this, I see the Connect to Database Engine form, and am required to reconnect. 
    By way of background, I am coming from SQL Query Analyzer, where I would be able to open mutiple .sql files, and never need to continually reconnect. 
    Regards,
    Dave
     
     
     
     
     

    DB:3.10:Connect To Database Engine Required Upon Opening Up A Query File. px

    Hello Dave,version 9.00.2047.00 = 2005 SP1 (RTM of the SP1)You should think to install at least the SP2 ( or better ) the SP3.I know that the SP2 was an important Service pack ( for example, SMO was correctly working with the SP2 )You have to upgrade your Sql Server Express and your SSMSEE in the same time.If you have only SSMSEE ( no Sql Server Express 2005 instance installed ) :http://www.microsoft.com/downloads/details.aspx?displaylang=enFamilyID=5d76230d-580d-4874-8c7d-93491a29db15If you have Sql Server Express 2005 with advanced services :http://www.microsoft.com/downloads/details.aspx?displaylang=enFamilyID=b448b0d0-ee79-48f6-b50a-7c4f028c2e3d( the install and the upgrade use the same setup program )You have said I have SQL Analyzer, on this workstation . Which version for your Sql Analyser (2000/2005/2008) ?We are waiting for your feedback to try to help you more efficientlyHave a nice dayPS : Please,could you tell us what are the versions/editions of your Sql Server components installed on your workstation ( including Service packs ) ? ( i am not sure to have understood what is installed on your workstation )

  • RELEVANCY SCORE 3.10

    DB:3.10:How To Find Opening Balance Of Bank Account Ledger In Sap B1 By Sql Sqery mm



    Hi,

    I have to develop crystal report to show the Opening balance of bank account ledger on selected date.

    for that i required a sql Query to solve this issue.

    DB:3.10:How To Find Opening Balance Of Bank Account Ledger In Sap B1 By Sql Sqery mm


    Hi Swapnil Vichare

    Check with the document written by me

    http://scn.sap.com/docs/DOC-43294

    Hope Helpful

    Regards

    Kennedy

  • RELEVANCY SCORE 3.10

    DB:3.10:Report From Sql Query Displaying Only One Record. mc


    I have made a basic agenda. When clicking on event it will op a "Report from Query Wizard" showing the details of that specific event. But now I want to replace the "Report from Query Wizard" with a "Report from SQL Query". But, now I can't find the options to make the detail report show that specific event, so my detail report shows ALL records of the table.

    In the original Report from Query Wizard I would go to the screen Customization Form Display Options and then checked Value Required on Column Name my_portal.event_number. But in a Report from SQL Query this option is not available.

    Thanx in advance for your help!

    Alan

    DB:3.10:Report From Sql Query Displaying Only One Record. mc

    To run your calendar, you need to provide value to :department.
    This can be done:
    1) At design time by specifying default value.
    2) Click on CUSTOMIZE link in the Manage tab for that calendar. It will prompt you to enter value for the :department.
    Now your calendar will run, based on value supplied by you. What default value must I use?

  • RELEVANCY SCORE 3.10

    DB:3.10:Help Required -- Can We Use Sql Query To Read Data From Sap Mdm Tables ms



    Hi All,

    Please help.........

    Can we use SQL Query to READ(No Creation/Updation/Deletion just Read) Data from SAP MDM tables directly, without using MDM Syndicator.

    Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.

    Thanks in Advance

    Regards

    DB:3.10:Help Required -- Can We Use Sql Query To Read Data From Sap Mdm Tables ms


    Hi Rono,

    yes, you can do this. But it'll be not an easy way to go. MDM stores the field and table data in generated database tables. To find a field in a table, you'd have to analyze the A2i_CM_Tables and A2i_CM_Fields tables first, to find out the correct internal field ID which is then a link to the data tables...

    Why don't you use the standard API? It is available for C, Java and ABAP and helps you to easily retrieve data for your own programs...

    BR Michael

  • RELEVANCY SCORE 3.10

    DB:3.10:Clarification Required 9k


    I am using 3 times LIKE condition in my sql query.

    i have a doubt whether it will impact the performance of the query or will take more time to execute.

    Is there another way to increase the performance of the query or is there any another clause which will give the same result as like clause and improve the performance..

    DB:3.10:Clarification Required 9k

    Hi,

    That depends on your data, and what results you want from that data.
    Post some sample data (CREATE TABLE and INSERT statements), the results you want from that data, and the complete query that uses LIKE.

    INSTR can be more efficient than LIKE for some simple jobs. For example:
    WHERE INSTR (txt, 'FOO') 0might be faster thanWHERE txt LIKE '%FOO%'

  • RELEVANCY SCORE 3.10

    DB:3.10:Query For Updates Which Are Needed But Not Deployed c7


    I want to write a query (don't care if it's WQL or SQL, or even a search folder) for updates which shows the updates which are required but are not deployed.
    I have looked at Report 141 (Management 1 - Updates required but not deployed) but it's no good. The kind of report I am after would be something like
    SELECTarticleID, updateName FROM blah WHERE deployed = 'no' AND required 0
    That way I can find and deploy all the needed updates - unless anyone has any better ideas!!
    Cheers - Tom

    DB:3.10:Query For Updates Which Are Needed But Not Deployed c7

    Great - with the bonus of being able to deploy them from the same spot! Cheers Kent.

  • RELEVANCY SCORE 3.09

    DB:3.09:Re: Tuning x8


    user13006393 wrote:

    this query taking long time , please tunePlease read these threads and provide the required information

    When your query takes too long -

    When your query takes too long ...

    HOW TO: Post a SQL statement tuning request - template posting -

    HOW TO: Post a SQL statement tuning request - template posting

    Also format your code and try removing all the hints.

    And check you statistics, tables prefaced with tmp_ tend to have been created on the fly in the mistaken belief they will speed a query up rather than slow it down and may have no statistics.

    DB:3.09:Re: Tuning x8

    ..

    Edited by: user13006393 on May 5, 2010 6:36 AM

  • RELEVANCY SCORE 3.09

    DB:3.09:Clarification Required - Sql Query ja


    I have one table (TBL1) which contain 40 lakhs records.

    i am using one SELECT query to fetch the data from two tables TBL1,TBL2. Query execution time is less than 1 second and cost in the explain plan is very less.

    When i include the ORDEY BY clause in the SELECT query then Query execution time( 7sec ) and
    cost in the explain plan is more. i have proper indexes on required columns in two tables.

    please help on this to this to reduce the execution time cost of the query. i will provide the explain plan of the
    query if required.

    how to improve the performance ?

    DB:3.09:Clarification Required - Sql Query ja

    hi,
    explain plan with out order by clause :

    Execution Plan
    ----------------------------------------------------------

    -------------------------------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    -------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | | 1 | 87 | 13 (0)| 00:00:01 |
    |* 1 | COUNT STOPKEY | | | | | |
    |* 2 | FILTER | | | | | |
    | 3 | NESTED LOOPS | | | | | |
    | 4 | NESTED LOOPS | | 18 | 1566 | 13 (0)| 00:00:01 |
    | 5 | TABLE ACCESS FULL | LOC1 | 1435 | 20090 | 2 (0)| 00:00:01 |
    |* 6 | INDEX RANGE SCAN | SCNLOC_ID | 75 | | 2 (0)| 00:00:01 |
    |* 7 | TABLE ACCESS BY INDEX ROWID| TBL1 | 18 | 1314 | 11 (0)| 00:00:01 |
    |* 8 | TABLE ACCESS BY INDEX ROWID | M_USR | 1 | 10 | 2 (0)| 00:00:01 |
    |* 9 | INDEX UNIQUE SCAN | M_USR_PK | 1 | | 1 (0)| 00:00:01 |
    | 10 | TABLE ACCESS BY INDEX ROWID| M_USR | 1 | 10 | 2 (0)| 00:00:01 |
    |* 11 | INDEX UNIQUE SCAN | M_USR_PK | 1 | | 1 (0)| 00:00:01 |
    -------------------------------------------------------------------------------------------------------

  • RELEVANCY SCORE 3.09

    DB:3.09:Attribute "Id" Required ? 1c


    Hi all,

    I have a query that is running fine under sql command but when I paste to BIP then attempted to view the data, I kept getting "Attribute "id" required", what is it complaining about ? I just can't figure out . thanks.

    Plz help.

    Zen

    DB:3.09:Attribute "Id" Required ? 1c

    Also post the error message (exactly ) as you get it.
    Which version of BIP are using 10g or 11g?
    Is it Standalone or EBS?

    thanks

    Jorge

  • RELEVANCY SCORE 3.09

    DB:3.09:Query To Find Objects (Databases, Tables, Stored Procs, Sql Jobs, Views Etc) Owned By A Given User? c9


    In SQL Server 2000, how to find objects (Databases, Tables, Stored Procs, SQL Jobs, Views etc) owned by a given user?It is required for checking and changing object ownership before delation.

    DB:3.09:Query To Find Objects (Databases, Tables, Stored Procs, Sql Jobs, Views Etc) Owned By A Given User? c9

    A quick word of advice. sp_MSforeachdb is undocumented and we strongly recommend against using it. Since this SP is not supported it may be subject to change its behavior in a future release (not likely to happen, but something you must consider) and be careful when using it as it executes the code sent as parameter, which may be subject to SQL injections (to be more specific, may be subject to second order injection attacks via the DB name).
     
      Please notice that Sivaprasad's code is escaping the question mark (used as a place holder for the DB) using the syntax [?], this means that the db name is going to be internally escaped using [] to prevent injection on the USE statement.
     
    -Raul Garcia
      SDE/T
      SQL Server Engine
     

  • RELEVANCY SCORE 3.09

    DB:3.09:Sql Query Resuts Field fp


    Hi,
    I am required to find the columns names that will be returned by the query when executed.
    But i dont want to execute the query as such.
    Any solutions?
    Regards,
    Vibek

    DB:3.09:Sql Query Resuts Field fp

    Hello Vibek,
    Thanks for your post.

    Whats kind of the project you are creating? Is it a database project or else?
    And I think it is better for you to post your issue on the Transact-SQL Forum.

    http://social.msdn.microsoft.com/Forums/en/transactsql/threads
    The forum here discusses database features in the Visual Studio.
    Thanks,
    Vicky Song

  • RELEVANCY SCORE 3.09

    DB:3.09:Re: Basic Query 3x


    jeneesh wrote:
    select cus.customer_name,count(*) cnt
    from customer_table cus,orders_table ord
    where ord.cust_id = cus.cust_idBut what is difficult in this?It is easy to write invalid SQL like above
    GROUP BY is required

    DB:3.09:Re: Basic Query 3x

    Brilliant. Thanks for the explanation!

  • RELEVANCY SCORE 3.08

    DB:3.08:Sql Trim Syntax Required c7


    Hi All,

    I need help on the syntax of the trim function in SQL.

    My query is like the following:

    select im.item,
    ......
    from item_master im,
    .....

    The items fetched are like this:
    im.item
    ---------
    SV122323
    SV122313

    I want to remove the SV so that my query output should be like the following:
    item
    -------
    122323
    122313

    Please let me know if you need any clarfications from my end.

    Thanks Regards,
    Debabrata

    DB:3.08:Sql Trim Syntax Required c7

    Thanks Danish and Sean.. Your information did worked perfectly.

    Thanks Regards,
    Debabrata

  • RELEVANCY SCORE 3.08

    DB:3.08:Need Sql Query To Extract License Parameters From Cisco Unity10.X 79



    Hello,

    Using a AXL soapRequest executeSQLQuery toextract the licensing information from CUCM, CUPS and CUC version 10.0

    Required licensing details for CUC (likeCUC_BasicMessaging, CUC_SpeechConnectPort, CUC_SpeechView, CUC_SpeechViewPro ) and Presence(ALL license types).

    So, need a sql query to extract the above licensing information from the respective devices.

    Tried cisco LCU tool but it does not provide license parameters for CUC as SQL Query used does have CUC parameters.

    Is there any way (any vbscript) to extract license information programmatically?

    Is Cisco Unity Supports AXL service?

    -Manila

    DB:3.08:Need Sql Query To Extract License Parameters From Cisco Unity10.X 79


    Hi Manila,

    From Version9 of Unity Connection licensing is managed centrally via the Enterprise Licensing Manager service. There is no API to have programmatic query/management of ELM data.

    Reference- https://communities.cisco.com/thread/41608

    Thanks and Regards,

    Geevarghese

  • RELEVANCY SCORE 3.06

    DB:3.06:Re: Query Running Way Too Slow 8m


    Please edit your post so we can read it and supply all the required information:

    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting

    DB:3.06:Re: Query Running Way Too Slow 8m

    Hi,
    Please check the updated post and help.

    Thanks in advance.

  • RELEVANCY SCORE 3.06

    DB:3.06:Cucm Sql Query zf



    Hello all,

    I am wondering if there is an SQL query that would return "User ID" and corresponding "Primary Extension" for a user.

    I have configured "Primary extension" for all users in the cluster and I wish to extract this information using AXL for import into a 3rd party application for a custom solution (details not required).

    Can somebody please help with this?

    Thanks

    Karthik

    DB:3.06:Cucm Sql Query zf


    I figured it out. You must have the Directory Number Association  / Primary Extension in the End User Configuration. So this may or maynot be completed for all Users. Any other suggestions.  What I really want to do is clean up my CUCM.  As I close a site I want to be able to clean everything up and delete the device and everthing associated with (CSS, DP, Location...) I want to get the End User and the Default Profile associated with a DN?

  • RELEVANCY SCORE 3.06

    DB:3.06:Wsus Connecting To Db And Reporting ps


    Can anyone send me a guide on how to setup either MS Query or SQL query to connect to the WSUS Internal Db to view/run reports.I've seen a lot of VB scirpts etc...but would like to use the MS query or SQL queryNew to reporting....i've used wsus for years....but now required to run some custom reports.....help would be great and appreciated.Thanks

    DB:3.06:Wsus Connecting To Db And Reporting ps

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish. In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks!

  • RELEVANCY SCORE 3.06

    DB:3.06:Number Of Input And Output Parameters To Proc In A Package jp


    I am trying to write a SQL query that will tell me the number of input and output parameters required by a specific procedure in a PL/SQL Package.
    Any ideas?

    Thanks -Alex

    DB:3.06:Number Of Input And Output Parameters To Proc In A Package jp

    check these 2 views user_arguments and user_objects.
    sure that'll work.-

  • RELEVANCY SCORE 3.05

    DB:3.05:How Can I Executing Select Query (Select A?B) On .Net Dataset Where ? Is Single Character Wildcard pp


    How can I executing Select query (A?B) on .Net Dataset where '?' is single character wildcard.
    The query looks like TempDataset.Select(sb.ToString()) [Here sb looks like Name = 'A?B']
    For SQL the similar can be done using 'A_B' but I am unable to execute similar query on .Net Dataset.
    Help urgently required. Thanks in advance.

    Amit

    DB:3.05:How Can I Executing Select Query (Select A?B) On .Net Dataset Where ? Is Single Character Wildcard pp

    Hii..
    Try using the Like Operator
    TempDataset.Select(Name Like A?B)
    More Info visit:
    http://msdn.microsoft.com/en-us/library/swf8kaxw.aspx
    Hope this would answers to your question.
    Thanks.Best Regards,
    Gopi V

    If you have found this post helpful, please click the Vote as Helpful link (the green triangle and number on the top-left).

    If this post answers your question, click the Mark As Answered link below. It helps others who experience the same issue in future to find the solution.

  • RELEVANCY SCORE 3.05

    DB:3.05:Sql Query Required To Get The Users On A Site 9f


    Hi ,I need a SQL Query which can query upon the sharepoint database to get the users added in a site collection or site after a particular date only.Thanks,Deepika

    DB:3.05:Sql Query Required To Get The Users On A Site 9f

    Direct interaction with SharePoint database is not supported.
     
    As a workaround to your request, you can display the user information list (hidden by default) on a page in a Data Form Web Part with the help of SharePoint Designer:
    1.      Open the site in SharePoint Designer (SPD);
    2.      Expand the _catalogs folder in SPD folder list;
    3.      Right click the Users(User Information List) and open the properties dialog for the list;
    4.      Click settings tab for the list properties dialog, uncheck the Hide from browsers checkbox;
    5.      Create a new ASPX page in SPD, and insert a Data View (data form web part) onto this page, select the User Information List as the data source of this Data Form Web Part, and select the fields you want to display.
    6.      Save the page into a document library, then open it from the document library in web browser, you would see all the users in the site collections;
    7.      You can modify the Data Form Web Part created in step 5, set the filter so that it returns only those users created after a particular date.
     
    Please refer to http://msdn.microsoft.com/en-us/library/cc300163.aspx for detail about using DFWP in SPD.

  • RELEVANCY SCORE 3.05

    DB:3.05:Sql Query zm


    i need the query of ORDER BY using sql

    DB:3.05:Sql Query zm

    ciprganesh wrote:
    i need the query of ORDER BY using sqlThis has nothing to do with JSP and certainly not with Java at all.

    SQL is a quite different language. Read a decent SQL tutorial. There's a nice one at w3schools.com. For more specific and detailed information and examples you can also just refer the SQL reference documentation at the website of the database vendor in question. E.g. [http://dev.mysql.com/doc/refman/6.0/en/sql-syntax.html] for MySQL and so on.

  • RELEVANCY SCORE 3.05

    DB:3.05:How To Retrive World Server Time In Sql 1d


    Hi all,

    I want to write a query in sql in which our system date matches with world server time.
    My question is which query is required in SQL to retrive world server time??

    Thanks in advance...
    Neerav

    DB:3.05:How To Retrive World Server Time In Sql 1d

    This seems like a duplicate post: how to retrive World Server time in Sql

    Please try and avoid duplicate posts where possible.

    Thanks!

  • RELEVANCY SCORE 3.05

    DB:3.05:How To Perform Sql Desc 8a


    Hi

    I want to get information about user specified table, display the meta data about the that table.I should'nt use select query and use ResultSetMetaData to get the required information.

    DB:3.05:How To Perform Sql Desc 8a

    Thanks.
    I think its the only way to get information about a table.

    I would be happy if there is any alternative or if i could get some more guidance.
    Bye