Jump to content

haye55987

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Feedback

    0%

About haye55987

  • Rank
    Bit Member

Profile Information

  • Expertise
    Database
  1. I think it really depends how "random" it has to be. There are other ways to randomize a set besides looking at the built in functions. Example: Converting a date column into number 06/12/2012 --> 06122012 then doing a mod on that number or something to determine "randomness" Give a little more on your situation and I"m sure there is a specific way to randomize your data set
  2. try: left(order_items,instr(order_item,'x')). This should be a little more efficient. Basically, left() in MSSQL takes the characters in a string from starting position on the left to an integer. INSTR determines the integer location of a character (x). So it takes all the characters on the left from beginning to first X This assumes that there is only one x as well. Do you need to trim the string or anything?
  3. They do not. I am not sure the back end behind MsSQL but in Oracle the owner actually determines the location the table sits in the data files. Changing owners can require actually moving the data files and tablespaces and even more all depending on how the Oracle database is set-up. I work in 11gr2 as the latest version and there is no easy way. I cannot think of a real reason to change the owner of a table that wouldn't show a flaw in the original spec. What are some examples you find in MySQL that are valid points to change table permissions? In Oracle, to simplify, I would probably just write a wrapper procedure where I pass in a table name and a owner and have my procedure move the table.
  4. Tony, which database are you currently writing SQL in? I know: PL/SQL SQL SQL Server 2008 SSRS SSAS BI Publisher Oracle APEX 3.2 to 4.1 Java Javascript jQuery all with varying degrees of knowledge of course as I don't have any large program that uses all of those Currently I use PL/SQL and APEX the most with javascript and jQuery used in APEX
  5. Nathan, can you pull out the code syntax highlighting and show where the error is? Also, do you receive an error log when you were running the initial process? I don't do much in MySQL but I'd like to learn as much if you can post the reason you received the error and where exactly in the code it error'ed.
  6. haye55987

    Joining

    Just joined the forum! Hopefully I can add some Oracle database knowledge. SSRS SSAS jQuery JavaScript Oracle APEX SQL Server Cube analysis data mining PL/SQL SQL Please let me know if I can help!! I'm always trying to learn.
  7. Wow...I am jealous. In oracle, this requires a CTAS (Create Table as Select) to basically create a clone of the current table in the new schema (then copying indexes) and dropping the table in the old schema (or owner). Grants must also be in place and it can take a while to copy all of the data over depending on block size, segments, and extents.
  8. Just wanted to point out...as the original poster did...this is a very expensive operation. I would not recommend running this on a production server in an environment where you do not know the impacts of using memory, bandwidth. On a home server or something you run a small instance of this is a useful tool to find data... If anyone is interested on converting this query into something an Oracle database can use please let me know and I can write up something similar.
×
×
  • Create New...