Command query & help

dear all .,
can any one tell how can i query and get help of any command
that i want to see like i need to know all the commands started
with ALTER DATABASE for example .,
thanks
[email protected]
[email protected]

Hi,
Refer to SQL Reference section in Oracle Documentation . it
gives complete options of all commands.
also if you have Oracle DBA Handbook (by kevin loney)you can
find full description of this command at the refernce section,
if you don't have this book, it is better you get one.
Vadivel

Similar Messages

  • Query Help-2

    Query Help:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=471180&tstart=15&trange=15
    It seems I have confused enough people with my improper presentation of query. Sorry guys. I will restate my question with different table names.
    The above was my previous posting, which was not clear..so Iam restating my problem as follows....
    I have the following tables
    Customer(custID, Name, Address)
    Order(custID, OrderID, orderDate)
    CreditCard(custID, creditCard#, creditCardType)
    Now if I have 3 records in Order with custID 100 and 2 records in CreditCard as
    Order:
    100,A001,11/22/03
    100,A002,11/24/03
    100,A003,12/02/03
    CreditCard:
    100,42323232..., VISA
    100,5234234...., MASTER
    Now how can I get
    custID, Name, Address, OrderID, orderDate, creditCard#, creditCarType
    data in minimum no. of records....
    I think I have made my query clear..
    now please help me guys...
    thanks so much for your help.

    You are right.
    But frankly the actual tables on my database are not customer,orders and creditcards..but I just tried to reproduce the problem with these tables, please ignore that user needs a refund etc situtaion. If the tables were actually order,creditcards etc..it would have been a problem to be considered.
    Can you please help me with the query
    if I have m rows in Order and n rows in CreditCard. I will get m*n records, I looking for max(m,n).
    With the following fields in my query result,
    custID, Name, Address, OrderID, orderDate, creditCard#, creditCarType
    from Customer, Order, CreditCard tables
    Thanks so much for your htlp

  • I just got the iphone 4s and i cant figure out how to get siri to work it seems to be the old voice command. HELP!

    i just got the iphone 4s and i cant figure out how to get siri to work it seems to be the old voice command. HELP!

    Did you enable Siri in settings?
    Settings > General > Siri > ON
    If Siri is off, all you get when pressing the home button for 1 second is the old Voice Control.

  • SQL Query Help - Is this possible or impossible????

    Hi guys,
    I need help with an SQL query that I'm trying to develop. It's very easy to explain but when trying to implement it, I'm struggling to achieve the results that I want.....
    For example,
    I have 2 tables
    The first table is:
    1) COMPANY create table company (manufacturer varchar2(25),
                                                          date_established date,
                                                          location varchar2(25) );My sample test date is:
    insert into company values ('Ford', 1902, 'USA');
    insert into company values ('BMW', 1910, 'Germany');
    insert into company values ('Tata', 1922, 'India');The second table is:
    2) MODELS create table models (manufacturer varchar(25),
                                                 model varchar2(25),
                                                 price number(10),
                                                 year date,
                                                 current_production_status varchar2(1) ) ;My sample test data is:
    insert into models values ('Ford', 'Mondeo', 10000, 2010, 0);
    insert into models values ('Ford', 'Galaxy', 12000,   2008, 0);
    insert into models values ('Ford', 'Escort', 10000, 1992, 1);
    insert into models values ('BMW', '318', 17500, 2010, 0);
    insert into models values ('BMW', '535d', 32000,   2006, 0);
    insert into models values ('BMW', 'Z4', 10000, 1992, 0);
    insert into models values ('Tata', 'Safari', 4000, 1999, 0);
    insert into models values ('Tata', 'Sumo', 5500,   1996, 1);
    insert into models values ('Tata', 'Maruti', 3500, 1998, 0);And this is my query:
    SELECT
            com.manufacturer,
            com.date_established,
            com.location,
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.model),
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.price),
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.year),
            mod.current_production_status
    FROM
           company com,
           models mod
    WHERE
          mod.manufacturer = com.manufacturer
          and com.manufacturer IN ('Ford', 'BMW', 'Tata')
          and mod.current_production_status IN (1,0)
    ORDER BY
            mod.current_production_status DESCWhat I want the query to output is this:
    com.manufacturer        com.date_established          com.location          mod.model          mod.price             mod.year     mod.current_production_status
    Ford               1902                    USA               Escort               10000               1992          1
    BMW               1910                    Germany               -               -               -          0
    Tata               1922                    India               Sumo               5500               1998          1If current_production_status is 1 it means this particular model has been discontinued
    If current_production_status is 0 it means the manufacturer does not have any discontinued models and all are in procuction.
    The rule is only one record per manufacturer is allowed to have a current_production_status of 1 (so only one model from the selection the manufactuer offers is allowed to be discontinued).
    So the query should output the one row where current_production_status is 1 for each manufacturer.
    If for a given manufacturer there are no discontinued models and all have a current_production_status of 0 then ouput a SINGLE row that only includes the data from the COMPANY table (as above). The rest of the columns from the MODELS table should be populated with a '-' (hyphen).
    My query as it is above will output all the records where current status is 1 or 0 like this
    com.manufacturer        com.date_established          com.location          mod.model          mod.price          mod.year     mod.current_production_status
    Ford               1902                    USA               Escort               10000               1992          1
    Tata               1922                    India               Sumo               5500               1998          1
    Ford               1902                    USA               -               -               -          0                    
    Ford               1902                    USA               -               -               -          0
    BMW               1910                    Germany               -               -               -          0
    BMW               1910                    Germany               -               -               -          0
    BMW               1910                    Germany               -               -               -          0
    Tata               1922                    India               -               -               -          0
    Tata               1922                    India               -               -               -          0However this is not what I want.
    Any ideas how I can achieve the result I need?
    Thanks!
    P.S. Database version is '10.2.0.1.0'

    Hi Vishnu,
    Karthiks query helped...
    But this is the problem I am facing...
    SELECT
            com.manufacturer,
            com.date_established,
            com.location,
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.model),
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.price),
            DECODE(nvl(mod.current_production_status, '0'), '0', '-', mod.year),
            mod.current_production_status
    FROM
           company com,
           models mod
    WHERE
          mod.manufacturer = com.manufacturer
          and com.manufacturer = 'Ford'
          and mod.current_production_status IN (1,0)
    ORDER BY
            mod.current_production_status DESCThe value of:
    and com.manufacturer = 'Ford'will be dependent on front end user input....
    When I run the query above I get all the rows where current_production_status is either 1 or 0.
    I only require the rows where current_production_status is 1.
    So if I amend it to look like this:
         and mod.current_production_status = 1This works....
    BUT if a user now passes in more than one manufacturer EG:
    and com.manufacturer IN ('Ford', 'BMW')The query will only return the one row for Ford where current_production_status is 1. However because BMW has no models where current_production_status is 1 (all 3 are 0), I still want this to be output - as one row....
    So like this:
    com.manufacturer        com.date_established          com.location          mod.model          mod.price             mod.year     mod.current_production_status
    Ford               1902                    USA               Escort               10000               1992          1
    BMW               1910                    Germany               -               -               -          0So (hopefully you understand), I want both cases to be catered for.....whether a user enters one manufacturer or more than one...
    Thanks you so much!
    This is really driving me insane :-(

  • Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?

    TimesTen Release 11.2.1.9.6 (64 bit Linux/x86_64)
    Command> dssize;
    PERM_ALLOCATED_SIZE:      51200000
      PERM_IN_USE_SIZE: 45996153
    PERM_IN_USE_HIGH_WATER:   50033464
    TEMP_ALLOCATED_SIZE:      2457600
    TEMP_IN_USE_SIZE:         19680
    TEMP_IN_USE_HIGH_WATER:   26760
    Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?
    tried to use ttsize function, but it gives some senseless results – for example, for the biggest table, tokens, it produces following output (that this table is 90GB in size – what physically cannot be true):
    Command> call ttsize('tokens',null,null);
    < 90885669274.0000 >
    1 row found.

    Are you able to use the command line version of ttSize instead? This splits out how much space is being used by indexes (in the Temp section of the TT memory segment), which I think is being combined into one, whole figure in the procedure version of ttSize you're using. For example:
    ttSize -tbl ia my_ttdb
    Rows = 4
    Total in-line row bytes = 17524
    Total = 17524
    Command> create index i1 on ia(a);
    ttSize -tbl ia my_ttdb;
    Rows = 4
    Total in-line row bytes = 17524
    Indexes:
    Range index JSPALMER.I1 adds 5618 bytes
      Total index bytes = 5618
    Total = 23142
    Command> call ttsize ('ia',,);
    < 23142.0000000000 >
    1 row found.
    In 11.2.2 we added the procedure ttComputeTabSizes which populates system tables with detailed table size data, and was designed to be an alternative to ttSize. Unfortunately it still doesn't calculate index usage though, and it isn't in 11.2.1.

  • Need a query help

    hii
    i need a query help
    i have two tables
    the 1st table will look like this
    associate id weekid no.of. hours
    4000 810 40
    4000 820 30
    4000 830 60
    4000 840 70
    2nd table will look like this
    associate id weekid no.of.hours
    4000 810 40
    4000 820 70
    4000 830 130
    4000 840 200
    so when i subtract the last two records frm each other in the second table the value should be equal to the no.of.hours in the first table.. for example
    the query shud consider the last record and one before the last record and the difference between two records shud be equal to the value in the 1st table
    for example
    consider week id 830 and 840
    in second table 830=130
    840=200
    when u subtraced both values the difference shud be equal to value in the 1st table for tht week id
    1 ---->>>> 840 - 830
    =200 - 130
    =70
    in first table 840 has 70 hrs
    like this it shud check with all records and it shud return only the records which are not equal
    regards
    srikanth

    This..?
    sql>select * from t1;
    A_ID W_ID HRS
    4000  810  40 
    4000  820  30 
    4000  830  60 
    4000  840  70 
    4000  850  80 
    sql>select * from t2;
    A_ID W_ID HRS 
    4000  810  40 
    4000  820  70 
    4000  830  130 
    4000  840  200 
    4000  850  260 
    sql>
    select a_id,w_id,hrs,sum_hrs
    from(
    select t1.a_id a_id,t1.w_id w_id,t1.hrs hrs,t2.hrs sum_hrs,
           t2.hrs - nvl(lag(t2.hrs)  over(order by t1.w_id),0) diff
    from t1,t2
    where t1.w_id = t2.w_id)
    where diff != hrs;
    A_ID W_ID HRS SUM_HRS 
    4000  850  80  260                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Query help in sql commands

    using apex 4.1 i'm entering the following query in the sql command window and I keep getting a pop-up for Entering Bind Variable. I'm not using bind variables though, anyone else see this issue before?
    SELECT A.FIRST,A.LAST,A.COMPANY AS CNAME,
    J.TOT_MAN_HOURS,
    J.ACREAGE,
    W.NUM_WORKERS,
    W.START_DT
    FROM EW_ACCOUNTS A, EW_WORK_ORDER W, EW_JOBS J
    WHERE A.ID = J.ACCT_ID
    AND J.JOB_ID = W.JOB_ID
    AND W.START_DT >= SYSDATE
    AND W.START_DT < SYSDATE+1
    ORDER BY W.START_DT

    I tried that and it didn't seem to help either.
    Funny though, if I write a new query against just one of the tables and write out each column name. it works. If I use the * instead of writing each column name, I have the same issue.
    This is in apex.appshosting.com free demo environment. I sent them an email asking about it and they told me it was a code issue and they don't support the demo environment.

  • Query Help for reporting on last receipt qty

    SBO Version: 8.82 PL11
    Hello Forum,
    I am looking for some help devising a command behind a crystal report. We are hoping to achieve the last receipt quantity. To arrive at this we would like it to get the last GRPO for an item and total the quantity on that particular GRPO. In addition to this, we want to consider all the lines on the document and SUM them.
    At present, the query I have is as follows:
    Select SUM(c0.Quantity) from PDN1 c0 WHERE c0.ItemCode = T1.ItemCode AND Shipdate = (select Max(ShipDate) from PDN1 C0  INNER JOIN OPDN c1 ON c0.DocEntry = c1.DocEntry where C0.Itemcode =T1.ItemCode AND c1.DocStatus <> 'C'))
    Any assistance would be greatly received.
    Thanks
    Sarah

    Hi Sarah,
    Please repost to the SAP Business One Application  space.
    -Abhilash

  • Query help needed for querybuilder to use with lcm cli

    Hi,
    I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups.  I have seen a few posts that are similar, but I have a specific question/concern.
    I just recently had to reference one of these back ups only to find it was incomplete.  Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
    Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis.  This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users.  I am not quite sure how to accomplish this...
    Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content.  Then I call the lcm_cli using the proper command.  The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
    To do what I want to do...
    1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
    2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether):  SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
    In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
    I just think chunking something like this is more effective and BO has no built in back up capability that already does this.  We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
    Any thoughts on this would be much appreciated.
    thanks,
    Missy

    Just wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design).  I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
    SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
    This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
    So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
    Hopefully this can help someone else too!
    Thanks,
    missy

  • Error in using the command "loadjava"(help me !)

    When I use "loadjava" command to load the sample source code of
    XML SQL Utility for Java,the errors as below:
    C:>loadjava -u system/manager -v -r -t samp1.java
    internal error:unanticipated
    exeption:java.lang.NoClassDefFoundError:
    oracle/aurora/sqljdecl/SqljDecl
    java.lang.NoClassDefFoundError:
    oracle/aurora/sqljdecl/SqljDecl
    at oracle.aurora.server.tools.SourceFileReader.getScanner
    (SourceFileReader.java:52)
    at oracle.aurora.server.tools.SourceFileReader.getFirstName
    (SourceFileReader.java:61)
    at oracle.aurora.server.tools.LoadJava.processLoadAndCreate
    (LoadJava.java:1094)
    at oracle.aurora.server.tools.LoadJava.process
    (LoadJava.java:1021)
    at oracle.aurora.server.tools.LoadJavaMain.run
    (LoadJavaMain.java:193)
    at oracle.aurora.server.tools.LoadJavaMain.main
    (LoadJavaMain.java:49)resolvers:
    loadjava :1 errors
    C:>
    I looked for the class "oracle/aurora/sqljdecl/SqljDecl"
    by executing the SQL query as below:
    "select object_name from user_objects
    where object_name like oracle%"
    But I found only "oracle/aurora/sqljdecl/Token".
    Maybe my envirenment have some errors(I get Oracle8i from
    oracle's home by downloading)
    I can't find out the reason.This matter have troubled me for a
    long time.
    Does anyone know the reason?please tell me.thanks a lot.
    null

    plz help me !!!!!

  • Command Query using UNION

    Hello,
    I may be barking up the wrong tree and asking this question in the wrong forum so please accept my apologies if this is the case.
    I have access to a MYSql database through a ODBC connection and would like to create a report based on four tables (let's say A, B, C and D) where tables A & B hold biographical data and tables C & D  contain different attribute detail with identical column names (attrib_name and attrib_desc) that relate to A & B .
    The report I would like to create will list records from both A and B along with corresponding records from C and D merged into two columns attrib_name and attrib_desc.
    I have tried a couple of versions of a union query but I just cannot seem to get it to generate the correct output.
    Any help would be much appreciated.
    Thank you
    Paul

    hi Paul,
    Command objects are written in syntax specific to the database that you're using, so you may be best off looking at mysql forums instead. plus you haven't really stated what the issue is that you experiencing.
    given the above, here's a couple basic things about UNION syntax...
    1 the number of fields selected must be the same
    2 the corresponding fields should be in the same sequence
    3 the types (e.g. date, integer) must match
    4 in your SELECT statement use an AS 'name' for each field so that the field names match up in both sets in the query
    you may also wish to use a UNION ALL instead of a UNION as UNION ALL will ensure that all records are brought back as opposed to UNION which does a check on a virtual record set to ensure that there's no duplicates...this in turn can cause performance to suffer a bit.

  • Error executing dB Query   help??

    I'm creating a simple content management system with DW &
    CF using an Access DB. I set up the DB in the CF Administrator as
    Access with unicode.
    My DB has several tables...users, usertypes, events,
    eventtypes, reviews.
    I built the usertype admin pages with no problems. Everything
    is working well and my pages are interacting well with the
    usertypes table in the db. I'm currently building the user admin
    pages and now I'm having problems when I try to add records into
    the users table. On my add page I've created a recordset with all
    of my usertypes in it. Also, I'm using the record insertion form
    wizard in DW.
    I'm getting the following error:
    Error Executing Database Query.
    Syntax error in INSERT INTO statement.
    The error occurred in
    C:\CFusionMX7\wwwroot\pentanglecf\admin\users\add.cfm: line 64
    62 : <cfelse>
    63 : NULL
    64 : </cfif>
    65 : )
    66 : </cfquery>
    BTW, I'm using Dan Short's very good DW 8 Dynamic Development
    tutorials on Lynda.Com. Has anyone used this before? Any help is
    greatly appreciated.
    Luis
    Casegama.Com

    Thanks Ken but I think I had posted the incorrect code for a
    few minutes before I made the correction. Below is both the CF code
    and the SQL command (also up above). I'm still having issues and
    any help is greatly appreciated.
    thanks,
    Luis
    Casegama.com
    <cflock scope="Session" type="ReadOnly" timeout="30"
    throwontimeout="no">
    <cfset
    MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
    <cfset
    MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthor ization",DE(""))>
    </cflock>
    <cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR
    ListFind("1,2",MM_UserAuthorization) EQ 0>
    <cfset MM_referer=CGI.SCRIPT_NAME>
    <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_referer=MM_referer & "?" &
    CGI.QUERY_STRING>
    </cfif>
    <cfset MM_failureURL="login.cfm?accessdenied=" &
    URLEncodedFormat(MM_referer)>
    <cflocation url="#MM_failureURL#" addtoken="no">
    </cfif>
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND
    FORM.MM_InsertRecord EQ "form1">
    <cfquery datasource="#Request.DSN#">
    INSERT INTO Users (Username, Password, FirstName, LastName,
    EmailAddress, Admin, Allowed, UserTypeID)
    VALUES (
    <cfif IsDefined("FORM.Username") AND #FORM.Username# NEQ
    "">
    '#FORM.Username#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.Password") AND #FORM.Password# NEQ
    "">
    '#FORM.Password#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.FirstName") AND #FORM.FirstName# NEQ
    "">
    '#FORM.FirstName#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.LastName") AND #FORM.LastName# NEQ
    "">
    '#FORM.LastName#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.EmailAddress") AND
    #FORM.EmailAddress# NEQ "">
    '#FORM.EmailAddress#'
    <cfelse>
    NULL
    </cfif>
    <cfif IsDefined("FORM.Admin")>
    Yes
    <cfelse>
    No
    </cfif>
    <cfif IsDefined("FORM.Allowed")>
    Yes
    <cfelse>
    No
    </cfif>
    <cfif IsDefined("FORM.UserTypeID") AND #FORM.UserTypeID#
    NEQ "">
    #FORM.UserTypeID#
    <cfelse>
    NULL
    </cfif>
    </cfquery>
    <cflocation url="index.cfm">
    </cfif>
    <cfquery name="rsUserTypes" datasource="#Request.DSN#">
    SELECT *
    FROM UserTypes
    ORDER BY UserType ASC
    </cfquery>

  • Command object help

    Hi All,
    I have a report having command object like this.My back end is MYSQL.
    I am not getting data in designer with below query
    SELECT * FROM clock_time WHERE STR_TO_DATE(DATE_FORMAT(clock_time,'%d-%m-%Y %H:%i'),'%d-%m-%Y %H:%i')= DATE_FORMAT('2014-06-19 11:03:43','%d-%m-%Y %H:%i')
    What is the mistake I am doing .
    Please help.

    Hi Divya,
    Does the same command work on the database when run via the database client?
    See if this works:
    SELECT * FROM clock_time WHERE DATE_FORMAT(clock_time,'%d-%m-%Y %H:%i') = Str_To_Date('19-06-2014 11:03','%d-%m-%Y %H:%i')
    -Abhilash

  • SQL*PLUS using START command - please help me to understand

    Hello dear friends,
    I met one issue that i can't understand. Could you please explain me what is wrong in my logic.
    I have created sql file called DUMMY.sql
    the file context is:
    SELECT dummy
    FROM dummy_tbl
    WHERE dummy_col=&dummy_var;
    I go to SQL*Plus DB version (10.2.0.4.0).
    I promt command: START DUMMY 1
    and expecting *&dummy_var* to be replaced with *1* and query be executed as it is described in Oracle SQL*PLUS reference ([http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058|http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058] ).
    But instead i'm getting Enter value for dummy_var:
    please help me to understand
    thanks in advance.

    You need to use &1 instead of &dummy_var.
    The number references the position of the parameter to use;&1 is the first parameter, &2 would be a second parameter and so on.
    SELECT dummy
    FROM dummy_tbl
    WHERE dummy_col=&1;

  • Query help on Goods Receipt Query with AP Invoice

    Looking for a little help on a query.  I would like to list all the goods receipts for a given date range and then display the AP Invoice information (if its been copied to an AP Invoice).  I think my problem is in my where clause, I plagerized an SAP query to show GR and AP from a PO as a start.  SBO 2005 SP01.  Any help would be great appreciated.  Thanks
    SELECT distinct 'GR',
    D0.DocStatus,
    D0.DocNum ,
    D0.DocDate,
    D0.DocDueDate,
    D0.DocTotal,
    'AP',
    I0.DocStatus,
    I0.DocNum ,
    I0.DocDate,
    I0.DocDueDate,
    I0.DocTotal,
    I0.PaidToDate
    FROM
    ((OPDN  D0 inner Join PDN1 D1 on D0.DocEntry = D1.DocEntry)
    full outer join
    (OPCH I0 inner join PCH1 I1 on I0.DocEntry = I1.DocEntry)
    on (I1.BaseType=20 AND D1.DocEntry = I1.BaseEntry AND D1.LineNum=I1.BaseLine))
    WHERE
    (D1.BaseType=22 AND D1.DocDate>='[%0]' AND D1.DocDate<='[%1]')
    OR (I1.BaseType=20 AND I1.BaseEntry IN
    (SELECT Distinct DocEntry
    FROM PDN1 WHERE BaseType=22 AND DocDate>='[%0]' AND DocDate<='[%1]'))

    Hi Dalen ,
    I  believe it is because of the condition
    (D1.BaseType=22 AND D1.DocDate>='%0' AND D1.DocDate<='%1')
    OR (I1.BaseType=20 AND I1.BaseEntry IN
    (SELECT Distinct DocEntry FROM PDN1 WHERE PDN1.BaseType=22 AND DocDate>='%0' AND DocDate<='%1'))
    Try changing
    D1.BaseType=22 OR D1.DocDate>='%0' AND D1.DocDate<='%1
    PDN1.BaseType=22 OR DocDate>='%0' AND DocDate<='%1'))
    Lets see what would be the result . Lets have some fun with troubleshooting
    See what would be the difference in the result .
    Thank you
    Bishal

Maybe you are looking for

  • Confirmation of operation in MO

    Dear PM Guys, During confirmation of operation through IW41 or IW42,my client wants the time like lunch,tea,shift change also to me entered for a particular operation. My suggestion is enter the correct time spent for work in ACTUAL WORK and enter th

  • PC won't recognize both my iPhone 4s

    I have two iPhone 4s and both are no longer recognized by my HP desktop. I was able to do a back up on both last month but now when I go to the Device Manager they aren't even listed. There is no error or any sign that they are connected. I am connec

  • MUVO V200 - Disk Drive is F

    I am having a problem with the disk space of my Muvo V200. The capacity is GB but yesterday when I tried to copy 600MB of mp3 files I got the message that disk dri've is full. The player was empty. I formatted it but there was still the same problem.

  • Archiving on File system

    Hi Experts, I want to configure document(pdf) archiving, so as the first step went into transaction OAC0, but could not get as what option should I use for getting all the document on a File server or Local disk? Document Area if choosen as Archiveli

  • Recadrage imposé à l'importation - cropping imposed in import

    J'ai pris des clichés avec mon boitier canon (EOS 5D mark III) en ajoutant une "information de recadrage". Je prends toutes mes photos en format RAW. Lorsque j'importe mes photos, ce recadrage s'impose sans aucune possibilité de voir la cliché comple