Jump to content

Kcarson

Members
  • Posts

    207
  • Joined

  • Last visited

Posts posted by Kcarson

  1. Out of curiosity, are you not joining on a particular field? As of right now, you are doing a join with a number of rows equal to (rows in Property) x (Rows in Sales_Staff) x (rows in Vendor), which unless all three tables are very small means your view is going to return a lot of rows. Just noticed and thought I would mention it.

  2. suggestion:  why did they not standardize the SQL statement use by any database vendor ? :)

    There is a standard actually, its called ANSI-SQL, however most vendors want to add extra features or modify what is out there so that they can make it "easier" for the programmer. Here is a good description of it all (taken from http://www.vbip.com/books/1861001800/chapter_1800_02.asp)
    "The computer industry (like most industries) both benefits and suffers from standards. We said that SQL is an open standard, not owned by a company, and the standard comes from ANSI. Therefore the SQL standard from ANSI is considered the "pure" SQL and called ANSI-SQL.Two problems emerge to sully this pureness. First is that every DBMS vendor wants to differentiate their DBMS products. So if you look at the feature set of each DBMS product you see that not only does the product support ANSI-SQL but it also offers extra features, enhancements or extensions that are available only from individual vendors. For example, most vendors offer a field type which auto- increments even though this is not described in the SQL standards. These additions to ANSI-SQL are generally proprietary and will not work if you try to use them on competitor's SQL products. Many of these features are powerful and robust, but since they vary from vendor to vendor, programmers should use them with caution. It is always safest to stick with pure SQL whenever possible; if you stray it should be with full knowledge that you are losing the portability of your statements (and perhaps even your data).Such enhancements are not all bad because these extensions are very useful. For example, ANSI-SQL does not contain an automatic way to assign a serial number to each new record but most DBMS sold today have added this feature. Since serial numbering is so common programmers are happy to have the enhancement. However, the method of implementation is not uniform, so code written to get the serial number from data in one DBMS may not work when used with another vendor's DBMS."
    So it is standardized to some extent, and that is why so much of the SQL language will conform to different databases, however there are certain features which are unique to each DBMS and ranking is one of them.Hope that answers your question. :)
  3. SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server. It is not an extention of SQL.Also LIMIT is for MySql, you need to use WHERE ROWNUM <= number in oracle.Anothere different is the CHARINDEX() function used in SQL Server, Oracel used INSTR() instead.

    See...told you my knowledge of Oracle was limited :) I try to read what I can about all the different database systems, but I often get them confused with each other since I really only use MS SQL. Thanks for correcting me aspnetguy, now hopefully I won't stick my foot in my mouth again :)
  4. Okay, you have to be careful when using the rownum function. It numbers the rows before you do the order by, which is why you are missing the three rows. To fix this, all you need to do is place your original query (minus the rownum references) in a subquery, and in the outer query check for rownum. Query should look like this:

    select *from ( select sum(d.price), e.Title, d.dvd_idfrom dvd_rental d, dvd_details ewhere months_between(sysdate, order_date) < 13 and e.dvd_id = d.dvd_idgroup by d.dvd_id, e.titleorder by sum(d.price) desc)where rownum <= 10

    I have also heard that there is another way to do this, and that is

    SELECT FIRST 10 sum(d.price), e.Title, d.dvd_idFROM dvd_rental d, dvd_details eWHERE months_between(sysdate, order_date) < 13 AND e.dvd_id = d.dvd_idGROUP BY d.dvd_id, e.titleORDER BY sum(d.price) DESC

    Hopefully one of those two will work for you :)

  5. Hi,Everyone. I have a request that is , do u know any  website name  that provide free  complete oracle document.bye

    Well, Oracle.com has plenty of free documentation/tutorials. All you have to do is register with them and that only takes a few minutes. Here is the specific location for documentation:http://www.oracle.com/technology/documenta...abase10gr2.htmlTutorials:http://www.oracle.com/technology/obe/obe10gdb/index.html
  6. I already researched and all the  websites said I needed some kind of script to run the auctions.  I think it was a java scripts.  But, all I wanted to do is just get my site up and auctions going.  But, I'm not sure what kind of codes to use to get the auctions listed.

    What sites? Do you have links to them? If so, then maybe we can figure out what specifically they are talking about.
  7. 1. how long do i have to study to be a web designer?That all depends on how fast of a learner you are and how much time you devote to it.2. do i have to take a university course or sth lyk tt? if yes...how long?See Skemcin's answer.3. do i need some basic requirements to be a web-designer?if yes.. wat is it?There is a quote that says, you know you are "Fill-in-the-blank" when a "Fill-in-the-blank" calls you one. In this case, you will be a web designer when a web designer calls you one. 4. will i do well by working as a web-designer?I don't think any of us know you well enough to tell you that, but if you want to be one, then you should. It is as simple as that.5. what other jobs is it available other than being a web-designer?See Skemcin's Answer again.Now for my own personal un-asked for suggestion:I would also suggest doing websites on the side for friends/family. That way you can gain some experience, decide which path you want to take (design/develop/etc.) and it will also allow you to show more examples of your work when you try to obtain a job in this field.Best of luck as you venture into this area. :)

  8. Hi there,I came accross the "www.w3schools.com" website and saw that there are quite a few certification exams one could complete; can you tell me if this certification is approved by W3C and if it is Internationally recognized ? (At least in South Africa, Australia and New Zealand)Thank youPieter Jacobs

    Well, I can't say for sure since I am not the owner/operator of w3schools, or w3c. But I do not believe it is approved by W3C. While it is easy to think that the two groups are one and the same, or at least might work closely together, I do not believe they do. W3C and w3schools are completely separate entities.As far as who recognizes the certificates, I guess that is purely based on what company/country you are talking to. The website for the certifications shows many U.S. universities that do recommend the certifications.But once again, this is all my own opinion from what I have seen around here.
  9. i was looking into xml... now is that only good for lists, or would i be able to grab a part of the xml and place it into the html... im also going to looking into php ( id like to learn it either way ) oh yeah and one more question, any idea on what the best way to sell things would be, as of right now im leaning toward paypal

    Paypal would probably be the smartest option. That takes a lot of the responsibility off of you and puts it on them. It also allows you to take all types of payment (credit card, checking accounts, etc.). Adding credit card payments on your own can be a very difficult process, and if you make a mistake a lot of problems could result.
  10. Okay, Scott I figured out how to get it all into one query....kind of ugly and not very efficient probably but it works....Here it is:

    SELECT War.WarID, War.Map, War.Mode, War.Time, War.ClanPlayed, Sum(VCLScores.Flags),    (SELECT Sum(OtherScores.Flags) FROM War War1     JOIN OtherScores ON OtherScores.WarID = War1.WarID    WHERE OtherScores.WarID = War.WarID)FROM War JOIN VCLScores ON VCLScores.WarID = War.WarIDGROUP BY War.WarID

    Explanation: rather than have an additional column Sum(OtherScores.Flags), I added a column containing the query with War and OtherScores joined with just one result sum(OtherScores.Flags). I then tell it to only produce the results when the OtherScores WarID matches the War.WarID contained outside the current statement (the one joined with VCLScores).....Like I said, its not pretty and I would like to know if anybody could do it better and I really mean that :).Well, let me know if you have any problems with it, or if you need a better explanation of things, or any other questions, I would be glad to help :)

  11. And Plz tell me difference bet. ORACLE SQL*PLUS  AND MS SQL

    I do not have any experience with Oracle other than what I hear and a few things I have read, but from what I understand, Oracle SQL*Plus is just another extension of the SQL language that allows people to write more complex queries, and I believe it is especially useful for formatting (but not positive on that at all).
  12. Here is a good article showing the differences between MS SQL 2000 and Oracle 9i. Obviously both databases have been updated since the article was written but it should give you a rough idea. It was actually harder to find a good article then I thought, since most of them were completely biased, as in the whole site/magazine would be dedicated to one or the other and then try to say they were giving objective opions on the two....anyways, I digress, the link below should take you to a good unbiased review comparing the two (older versions though).http://www.databasejournal.com/features/ms...10894_2170201_2Let me know if you have any questions.

  13. Hi,    I can't understand what is the difference bet.  SQL SERVER 2000  SQL andORACLE SQL.

    The basic syntax for each is the same, all databases (or at least the majority) use a common set of SQL commands. You will however find some small differences, such as Top (MS) vs. Limit (Oracle) - Used to show first so many rows in a query. The bigger difference between the two occurs when you look at the more complex parts of the languages used by both servers, Oracle uses PL/SQL and MS uses Transact-SQL. Once again, if you know one, you can easily learn the other, but there are syntactical differences.Hope that helps.
  14. Do I sound like a query expert yet? lol!  Thanks again for the assist.Joel

    Great explanation :) Yeah, that 65 thing is what made me thing all the other steps would have to be taken, but I am very glad you found a compromise for your situation so it did not have to turn into that....wouldn't it stink if you had to make a change to that query later :)Best of luck with everything else, and now that you are an expert, you can begin helping everybody else with their questions :(
  15. That was easier that we thought!  I figured out how to do the multiple joins and it works like a charm!  :) Thanks very much for your help in looking at this Kcarson. Your suggestions were key in creating this solution.  Can I buy you a beer?Best Regards,Joel

    lol....beer is not necessary, but I am very glad I was able to help. That was easier than I had anticipated, I mostly write ad hoc queries, so they tend to stay small and less complex. Congrats to you on figuring out how to do it as well, since you did do most of the work :)
  16. So you basically want to query an excel spreadsheet . . . a.) excel is not a database - and therefore should not be used as oneb.) if you are thinking about using excel as a database, then you need to think about using a databasec.) you should build something to upload/parse/insert the spreadsheet into a database and query it from there (much more flexibility)

    I completely agree, it would be much easier to use the data once it is sets up in a database. To import it into a database, you can do various things, but one of them (using MS SQL would be to DTS the file (Data Transportation Service...I think)). I believe you can also use the menu's in Access to import an excel file into a database. Not sure how it would work with other databases, but there should be plenty of documentation out there if you search. Either way, importing an excel file/Comma Separated Value file into a database is not that hard and would make things much easier in the long run.
×
×
  • Create New...