1. What SQL Object would you use if you had to repeat a query numerous times?
360932
A stored procedure. Or, if there's no support for stored procedures per se, a function.\n\nGood luck with the rest of your homework!
743722
Hello,\nThe inner query, which is\n\nSELECT [Employee Information].FirstName, [Employee Information].LastName, Courses.CourseTitle, CoursesCompleted.CourseID\nFROM Courses INNER JOIN ([Employee Information] INNER JOIN CoursesCompleted ON [Employee Information].StudentID=Courses... ON Courses.CourseID=CoursesComple...\nWHERE (((CoursesCompleted.CourseID)=... THE COURSE NUMBER])))\n\nreturns a set of first names, last names, course titles and course id numbers; however you are checking whether >only< the first name and the last name of a particular employee is in that set. If I'm not mistaken, both sides of the 'NOT IN' clause should contain the same information. In this example, one side (outer query) contains the name of the employee, and the other side (inner query) contains the name of the employee + course information. \nTry this: in the second query select only the first and last name of the employee (not the course info) but keep the joins in the FROM clause.\n\nIf I had designed the tables, I would assign a unique id to each employee, just as courses have their unique course ids. It would have eased this task a lot.\n\nI know I sound confusing, but hope it helps
951907
You would need to create an index if the query you are running was taking to long to run.  By creating an index you can greatly improve the responsiveness of queries.\n\nCreating the index is a one time thing, it is not something you have to do each time the t-sql is executed.\n\nIf you are using dynamic T-SQL then it may be very difficult to know how to construct the indexes since your T-SQL will change every time, sometimes just a little, but it could be significant.
993355
Hi, can you emphasize on the SQL Load Test Program. For instance what is your outcome to use such application.\n\nTo test if the sql connection is valid within an application, the drivers JDBC/ODBC/ADO which are the main ones 99% people use them.. already deal if the database connection method failed. If it failed it will return false.\n\nSo look into your api for the sql application your doing and see what the connect method returns.\n\nSorry if i answered your question differently, please clarify things :)
32951
when you have a database, you can map, your tables with classes, so, using oql, should be a little easy to understand querys than sql
1018112
trying adding a distinct clause.  Select (distinct) from...  what's your query.
1023038
The file structure looks pretty close to what you would want.  Have a table with EmployeeId (PK), ManagerId (nullable), name, etc etc..  Then create a check constraint on the ManagerId field to ensure that a value exists inside of employees table already (except when null).  If you then want to have two different queryable objects you could create a view like ManagerEmployeeView and PeonEmployeeView =)
346060
just try going to this link\n\nhttp://www.w3schools.com/sql/sql_intro.asp\n\nmight help
318999
You can use blob (Binary Large Object).SQL Server supports it.
271669
Take a look at this site. It explains what i think you need.\n\nhttp://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html\n\nHope this helps
601218
stmt = connection.createStatement();\n\n// check from User_tables data dictionary table \n//to see if the table exists.\nrset = stmt.executeQuery(" SELECT Table_Name FROM\n                           User_Tables "+ \n                         " WHERE Table_Name='XYZ'");    \n\n// if the resultset of the above query \n//does not have any record, \n//it means table is not existing.\nif (!rset.next())\n{\n          //operation to do if table doesn't exist\n}\nelse\n{\n          //operation to do if table exists\n}
527678
Both will work perfectly...\n\nIn case one, you make sure that INSERT INTO's are done right away, in case two, you let let the SQL server to decide when to do the actual insertion.\n\nIn case one, INSERTing the second record is not held before the first one finishes; that's the only difference.\n\nCASE 1:\nINSERT INTO: Handle the query and check what to do.\nCOMMIT: Insert (the actual disk action).\nINSERT INTO: Handle the query and check what to do.\nCOMMIT: Insert (the actual disk ...)\n... goes on like this.\n\nCASE 2:\nINSERT INTO: Handle the query and check what to do.\n#2: Handle the next query and check what to do\n#3: Handle ...\n...\nCOMMIT: Actually INSERT (do the disk operation).
1001381
how about creating a dynamicly driven website with SQL engine.  Where you can add stuff and easily search it in the search bar.  That would be a good one for you.
687215
Select NAME THE FIELD AND CONDITION\nFrom NAME THE TABLE\n\nUNION (This is the operator to combine tables in SQL)\n\nSelect NAME THE FIELD AND CONDITION\nFrom NAME THE TABLE;
1060571
Do you get an exception error?\n \nI would need to see the SQL statement to see what is wrong with it. If it is executing the query, but you dont see the changes, then there is something wrong with the SQL statement.
346832
Can you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?\nCan you repeat the question?
103351
to test what is quicker create a giant table of data (cross join query is really good at making tons of entries fast) then run the query 100 times on a table of 100,000 entries. (some slow queries you wont need nearly this many entries)\n\nTake note of the execution time and run the other way. You can then tweak the code and see whats faster. I got a sproc that took 1:30 seconds to aggregate and massage a years worth of 15 minute data to run in 0:02 seconds using this method and a little persistance...\n\ngood luck