Loading ...
Sorry, an error occurred while loading the content.

Re: [SQLQueriesNoCode] Oracle => SQL SERVER

Expand Messages
  • Michael Gerholdt
    Probably one he cannot touch as well .... I think he told the story well enough but hope he is wrong about his conclusion. I ve not done this but can t you
    Message 1 of 18 , May 19, 2004
    • 0 Attachment
      Probably one he cannot touch as well ....

      I think he told the story well enough but hope he is wrong about his
      conclusion.

      I've not done this but can't you write a DTS package which compares source
      with destination and updates only changes?


      > What tool/program is used to update data in the Oracle DB?
      >

      > >
      > >
      > > hi
      > > The story is about two databases.one in Oracle one in
      > > SQL Server. tables and fields are similar.
      > >
      > > Changing in data performed just in Oracle db. Sql
      > > server users dont perform any change in data.
      > >
      > > I want to keep MS SQL in synch with Oracle db.
      > >
      > > I can query Oracle db with Select queries but I can't
      > > add trigger ,stored procedure,... in Oracle db.
      > >
      > > DTS is not usefull. beacause I dont know which records
      > > have been changed in Oracle , or which data have been
      > > deleted.
      > >
      > > How can I write this story?!!
    • John Warner
      Probably I should win Powerball, but until it is a sure thing, I won t make plans based on winning that money . You may be right, but it is worth asking
      Message 2 of 18 , May 20, 2004
      • 0 Attachment
        Probably I should win Powerball, but until it is a sure thing, I won't
        make plans based on winning that money <grin>.

        You may be right, but it is worth asking and getting an answer for. The
        updates are easy if he has control of some step in the process. If there
        are enough restrictions applied to the situation, it eventually becomes
        impossible. Let's look and see if there are any restrictions that have
        been overlooked that we can exploit to help get the job done. We already
        know the Oracle DB is of limits, so there is presently no way to know
        when an update has occurred, what else can't we do?

        John Warner
        mailto:john@...

        > -----Original Message-----
        > From: Michael Gerholdt [mailto:gerholdt@...]
        > Sent: Wednesday, May 19, 2004 4:47 PM
        > To: SQLQueriesNoCode@yahoogroups.com
        > Subject: Re: [SQLQueriesNoCode] Oracle => SQL SERVER
        >
        >
        > Probably one he cannot touch as well ....
        >
        > I think he told the story well enough but hope he is wrong
        > about his conclusion.
        >
        > I've not done this but can't you write a DTS package which
        > compares source with destination and updates only changes?
        >
        >
        > > What tool/program is used to update data in the Oracle DB?
        > >
        >
        > > >
        > > >
        > > > hi
        > > > The story is about two databases.one in Oracle one in
        > > > SQL Server. tables and fields are similar.
        > > >
        > > > Changing in data performed just in Oracle db. Sql
        > > > server users dont perform any change in data.
        > > >
        > > > I want to keep MS SQL in synch with Oracle db.
        > > >
        > > > I can query Oracle db with Select queries but I can't
        > > > add trigger ,stored procedure,... in Oracle db.
        > > >
        > > > DTS is not usefull. beacause I dont know which records
        > > > have been changed in Oracle , or which data have been deleted.
        > > >
        > > > How can I write this story?!!
        >
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        > ---------------------~--> Make a clean sweep of pop-up ads.
        > Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for
        > free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/m7folB/TM
        > --------------------------------------------------------------
        > -------~->
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      • John Warner
        Any chance you could update the subscribers list to exclude those who have changed their email address? Original mail information: Date: Thu, 20 May 2004 15:16
        Message 3 of 18 , May 20, 2004
        • 0 Attachment
          Any chance you could update the subscribers list to exclude those who
          have changed their email address?



          Original mail information:
          Date: Thu, 20 May 2004 15:16 +0200
          Subject: RE: [SQLQuerie

          Your mail could not be delivered to the following address(es):

          frederic.ducos@...
          Receiver not found

          John Warner
          mailto:john@...
        • Ronda
          I need to query a SQL DB and return the # of orders for each store based on a specific date. My stores are identified by the first 2 digits of the orderid.
          Message 4 of 18 , May 21, 2004
          • 0 Attachment
            I need to query a SQL DB and return the # of orders for each store based on
            a specific date. My stores are identified by the first 2 digits of the
            orderid. For instance I might have these orders:

            LG46657
            DB1600

            Those are orders that are in my orders table but the first is from a
            Lingerie Store and the second from a Dyeables Shoe store.

            I have a query that returns the most recent order from each store that might
            help:

            --------------------------------
            MaxOrders Query
            --------------------------------
            AS

            Select [order id], convert(varchar(20),[date],110) as OrderDate from
            myOrders where myOrders.[order id] in (

            SELECT
            a.[order id] MaxOrderId

            FROM
            myitems a
            WHERE
            EXISTS (
            SELECT NULL
            FROM myitems b
            GROUP BY
            SUBSTRING(b.[order id], 1, 2) HAVING MAX(b.[itemid]) =
            a.[itemid]
            ) )

            order by [order id]
            RETURN (0)
            -----------------------------------

            You can see that I use the substring to break out the individual stores and
            get the most recent order. What I need to do is get the COUNT of orders for
            each store for a given date. Can someone give me some guidance please.

            TIA,
            Ronda
          • Damhuis Anton
            Hi RondaTry this: Select Left([order id],2), [date] as OrderDate, Count([order id]) as [OrderCount] from myOrders Group by Left([order id],2), [date]I
            Message 5 of 18 , May 23, 2004
            • 0 Attachment
              Hi Ronda

              Try this:
              Select Left([order id],2),
              [date] as OrderDate,
              Count([order id]) as [OrderCount]
              from
              myOrders
              Group by Left([order id],2),
              [date]

              I think that will work

              Regards
              Anton

              -----Original Message-----
              From: Ronda [mailto:rka@...]
              Sent: 21 May 2004 04:16
              To: SQLQueriesNoCode@yahoogroups.com
              Subject: [SQLQueriesNoCode] Query Help Needed



              I need to query a SQL DB and return the # of orders for each store based on
              a specific date. My stores are identified by the first 2 digits of the
              orderid. For instance I might have these orders:


              Confidentiality Warning
              =======================
              The contents of this e-mail and any accompanying documentation
              are confidential and any use thereof, in what ever form, by anyone
              other than the addressee is strictly prohibited.
            • p c
              I want to retrieve data from 3 tables as follows, c.UserName, a.DateRecorded, b.quiz_name, a.score This join SQL between 2 tables will return alsmost what I
              Message 6 of 18 , May 27, 2004
              • 0 Attachment
                I want to retrieve data from 3 tables as follows,
                c.UserName, a.DateRecorded, b.quiz_name, a.score

                This join SQL between 2 tables will return alsmost what I need, except
                that I get the userID instead of the name.

                SELECT a.UserID, a.dateRecorded, b.quiz_name, a.score
                FROM scores AS a INNER JOIN quizzes AS b ON a.QuizID= b.quiz_id
                ORDER BY a.dateRecorded DESC, a.userID;

                How can I change the SQL above to also use table Login (c) to replace
                the a.UserID in the results with c.Name?
                Any suggestions?

                Third table, Login, has fields for UserID and UserName.


                Thanks in advance.
                ...PC




                __________________________________
                Do you Yahoo!?
                Friends. Fun. Try the all-new Yahoo! Messenger.
                http://messenger.yahoo.com/
              • Damhuis Anton
                Just create another Inner JoinSample: SELECT a.UserID, a.dateRecorded, b.quiz_name, a.score , c.UserName FROM scores AS a INNER JOIN quizzes AS b ON
                Message 7 of 18 , May 27, 2004
                • 0 Attachment
                  Just create another Inner Join

                  Sample:
                  SELECT a.UserID, a.dateRecorded, b.quiz_name, a.score , c.UserName
                  FROM scores AS a
                  INNER JOIN quizzes AS b
                  ON a.QuizID = b.quiz_id
                  INNER JOIN Login AS c
                  ON a.UserID = C.UserID
                  ORDER BY a.dateRecorded DESC, a.userID;


                  Regards
                  Anton

                  -----Original Message-----
                  From: p c [mailto:pcjr10@...]
                  Sent: 27 May 2004 04:22
                  To: SQLQueriesNoCode@yahoogroups.com
                  Subject: [SQLQueriesNoCode] how to do join/retrieve from 3 tables?


                  I want to retrieve data from 3 tables as follows,
                  c.UserName, a.DateRecorded, b.quiz_name, a.score

                  This join SQL between 2 tables will return alsmost what I need, except
                  that I get the userID instead of the name.

                  SELECT a.UserID, a.dateRecorded, b.quiz_name, a.score
                  FROM scores AS a INNER JOIN quizzes AS b ON a.QuizID= b.quiz_id
                  ORDER BY a.dateRecorded DESC, a.userID;

                  How can I change the SQL above to also use table Login (c) to replace
                  the a.UserID in the results with c.Name?
                  Any suggestions?

                  Third table, Login, has fields for UserID and UserName.


                  Thanks in advance.
                  ...PC




                  __________________________________
                  Do you Yahoo!?
                  Friends. Fun. Try the all-new Yahoo! Messenger.
                  http://messenger.yahoo.com/



                  ------------------------ Yahoo! Groups Sponsor --------------------~-->
                  Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
                  Now with Pop-Up Blocker. Get it for free!
                  http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/m7folB/TM
                  --------------------------------------------------------------------~->


                  Yahoo! Groups Links






                  Confidentiality Warning
                  =======================
                  The contents of this e-mail and any accompanying documentation
                  are confidential and any use thereof, in what ever form, by anyone
                  other than the addressee is strictly prohibited.
                Your message has been successfully submitted and would be delivered to recipients shortly.