3 Replies Latest reply: Jun 20, 2011 3:12 PM by Kaushik Solanki RSS

    Load table between Dates

      Hi to all,

       

      I have a Oracle table with a lot Data, I would like to select only the Data to current month, Example

       

      My DB is

       

      Order Number

      Order Date

      Order Qty

      Production Date

      Production Qty.

       

      So, I need to see only the Orders (Order Date) for current month.

       

      I Appreciate your help

       

      mpsaei

        • Load table between Dates
          Kaushik Solanki

          Hi,

           

           

               In your sql you can use the where condition just like below.

           

               select  

          Order Number

          Order Date

          Order Qty

          Production Date

          Production Qty.

          from
              Table name
          where
              Order Date >= to_date('1-Jun-2011')

           

             Please check the date format. It should be same as your DB

           

          Regards,

          Kaushik Solanki

            • Load table between Dates

              Hi Kaushik,

               

              Could you check my scrip please.

               

              SQL SELECT "T$ORNO",

              "T$KOOR",

              "T$KOST",

              "T$CWAR",

              "T$TRDT"

              FROM BAAN.TTDINV700804;

              SQL SELECT "T$CWAR",

              "T$ITEM",

              "T$STOC",

              "T$ORDR",

              "T$ALLO"

              FROM BAAN.TTDINV001804;

              SQL SELECT "T$PDNO",

              "T$MITM" "T$ITEM",

              "T$CWAR",

              "T$QRDR",

              "T$QDLV",

              "T$OSTA",

              "T$PRDT",

              "T$APDT"

              FROM BAAN.TTISFC001804

              WHERE

              "T$PRDT" >= to_date('01/06/2011');

                • Load table between Dates
                  Kaushik Solanki

                  Hi,

                   

                     As per the syntax it seems ok, only thing you have to do is give alise name to every table as shown below.

                   

                    

                  TTDINV700804:

                  SQL SELECT "T$ORNO",

                  "T$KOOR",

                  "T$KOST",

                  "T$CWAR",

                  "T$TRDT"

                  FROM BAAN.TTDINV700804;

                   

                   

                  TTDINV001804:

                  SQL SELECT "T$CWAR",

                  "T$ITEM",

                  "T$STOC",

                  "T$ORDR",

                  "T$ALLO"

                  FROM BAAN.TTDINV001804;

                   

                   

                  TTISFC001804:

                  SQL SELECT "T$PDNO",

                  "T$MITM", "T$ITEM",

                  "T$CWAR",

                  "T$QRDR",

                  "T$QDLV",

                  "T$OSTA",

                  "T$PRDT",

                  "T$APDT"

                  FROM BAAN.TTISFC001804

                  WHERE

                  "T$PRDT" >= to_date('01/06/2011');

                   

                   

                  Regards,

                  Kaushik Solanki