ORDER BY SQL statement not working?
612650
Try:\nI'm assuming MS Access 2000 and not MS SQL Server 2000?\n\nSELECT *\nFROM [ProdServers]\nORDER BY [Server Name/OS/DNS Alias]
889418
1. Select the list or table you want to sort. \n2. On the Table menu, click Sort. \n3. Select the sort options you want.\n4. Click OK.
1007417
Hi..\nCheck out the following page...this might provide your some insight on Query Optimizations...\nhttp://www.sqlsummit.com/Optimization.htm
404062
(m)\n\ngoto the following link for logic sql commands\n\nhttp://docs.hp.com/cgi-bin/doc3k/B3060190208.12319/75
1141994
Hi, It might be correct... Below is what I assume your code before the if statement.\n\nPreparedStatement ps = con.prepareStatement(\n"UPDATE COFFEES SET SALES = ? WHERE COF_NAME LIKE ? ");\nps.setInt(1, 75); \nps.setString(2, "Colombian"); \nint n = ps.executeUpdate():\n\nNote that when the return value for executeUpdate  is 0 , it can mean one of two things: (1) the statement executed was an update statement that affected zero rows, or (2) the statement executed was a DDL statement. \n\nIt doesn't necessarily mean it has failed, it might mean nothing has changed. Check if your properties of your sql syntax is correct. Because everything upto here is correct. But 0 can mean two stuff as I mentioned above.\n\nTake care
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.
904060
you are missing the semi-colon at the end of line 65.\n\nFWIIW you might like using the sprintf() command for inserting into the $query statement.\n\n$query =sprintf("Update name set INBOX = '%s', SUBJECT ='%s'  where SITENAME = '%s' ", \n$_POST['MESSAGE'],\n$_POST['SUBJECT'],\n$_GET['account']);
224715
Select * from (SELECT DepID, AVG(Salary), SUM(Salary), Count(EmpID) from EmpTable Group By DepID) MyTable Where RowNum<=5 order by RowNum;\n\nPL/SQL\n\nDECLARE\nCURSOR MYCUR IS SELECT * FROM (SELECT DEPID, AVG(SALARY), SUM(SALARY), COUNT(EMPID) FROM EMPTABLE GROUP BY DEPID) MYTABLE WHERE ROWNUM<=5 ORDER BY ROWNUM;\nTHISDEPID NUMBER(10);\nTHISAVGSALARY NUMBER(10);\nTHISSUMSALARY NUMBER(10);\nTHISCOUNTEMP NUMBER(10);\nBEGIN\n   OPEN MYCUR;\n   LOOP\n      FETCH MYCUR INTO THISDEPID, THISAVGSALARY, THISSUMSALARY, THISCOUNTEMP;\n      EXIT WHEN MYCUR%NOTFOUND; \n   END LOOP;\n   CLOSE MYCUR;\nEND;
1011647
My coldfusion is pretty rusty (php guy now) but the first question that comes to mind is, rather than use 2 seperate queries, why not use one?\n\nTry SELECT * .... etc\n\nWHERE order_ID = (SELECT MAX(order_ID) FROM Orders)\nORDER BY ... etc.\n\nThis is called a subquery or correlated subquery.  Most SQL databases support the idea.
996041
http://www.w3schools.com/sql/
154345
I've seen several references of this error using SQL.\n\nAre you accessing a database?  If so, are you sure you JDBC linkage is right, and your SQL is correct?
568859
select name, count(rowid) from simple_table\ngroup by name\nhaving count(rowid) > 1\n\nhope it helps!
1027306
If you can connect to the database in Dreamweaver, try connecting to it with Access and see if you can modify a table or execute a query.  It's either a permissions issue with your database file, a permissions issue with the webserver that the file is on, or something quirky.  I'd suggest turning off Friendly error messages in IE 6 so it can (hopefully) give you some good feedback.  \n\nI'm a bit confused when you say "seems that all database stuff... are not working properly when viewing". So none of your select statements are returning values either? Seems like a config issue.
1063667
everything is correct, but "rowsnum'" not an id in the table. Instead of this you can use maxid.\n\nmysql_connect ('localhost' , 'root' , '');\nmysql_select_db ('db2');\n$news1 = mysql_query ("SELECT new FROM news WHERE id =(select max(id) from news)";\n$row=mysql_fetch_array($news1);\n$newslast=$row['new'];\necho $newslast;\n\nPlease try this code
691193
Hi .. \n\ni guess the following page can reslove your issue\nhttp://www.phpfreaks.com/postgresqlmanual/
1132417
Skip calling the stored proc and use a cursor to grab the rows directly and insert them into the second table.\n\nExample cursor:\n--------------------------\nDECLARE @col1_value VARCHAR(100)\nDECLARE @col2_value VARCHAR(100)\n\nDECLARE cc CURSOR FOR\nSELECT col1, col2\nFROM table1\n\nOPEN cc\n\nFETCH NEXT FROM cc INTO @col1_value, @col2_value\n\nWHILE @@FETCH_STATUS=0\nBEGIN\n\nINSERT INTO table2 (column1, column2)\nVALUES @col1_value, @col2_value\n\nEND\n\nCLOSE cc\nDEALLOCATE cc\n--------------------------
971270
try these link baby..hope it work\nhttp://www.dizzay.com/dizzaymysql/index.asp