If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Executing an SQL Data Definition Query
I'm trying to sort a database of 146,000
rows by the string length of the row and there is only 1 field in column 1. The column 1 text is, for example, as follows: something(whatever,ATACCAA); something(whateverelse,AAATTT); something(somethingelse,CGAA; something(nothing,TTTTTTAACGAAAAA); I can type a query into the SQL design query box as follows SELECT col1 FROM TABLE1 ORDER BY LEN(col1) After I enter this, instead of sorting the database another box appears which wants some sort of parameter. When I enter for example "SortedDatabase" as the parameter, it takes the word "SortedDatabase" and puts it in all 146,000 rows. How do I get the database sorted by string length??? Thanks Jim |
#2
|
|||
|
|||
Hi James,
This will happen if the actual name of the field is something other than "col1". Find out the proper name (e.g. by opening the table in design view) and use that in your query. On Fri, 12 Nov 2004 10:38:01 -0800, "James Pannozzi" wrote: I'm trying to sort a database of 146,000 rows by the string length of the row and there is only 1 field in column 1. The column 1 text is, for example, as follows: something(whatever,ATACCAA); something(whateverelse,AAATTT); something(somethingelse,CGAA; something(nothing,TTTTTTAACGAAAAA); I can type a query into the SQL design query box as follows SELECT col1 FROM TABLE1 ORDER BY LEN(col1) After I enter this, instead of sorting the database another box appears which wants some sort of parameter. When I enter for example "SortedDatabase" as the parameter, it takes the word "SortedDatabase" and puts it in all 146,000 rows. How do I get the database sorted by string length??? Thanks Jim -- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email. |
#3
|
|||
|
|||
Yep, you figured it exactly.
I was calling it "col1" but the real name was "Field1". As soon as I corrected that, it did the sort, and it did quite quickly too! Thanks J "John Nurick" wrote in message ... Hi James, This will happen if the actual name of the field is something other than "col1". Find out the proper name (e.g. by opening the table in design view) and use that in your query. On Fri, 12 Nov 2004 10:38:01 -0800, "James Pannozzi" wrote: I'm trying to sort a database of 146,000 rows by the string length of the row and there is only 1 field in column 1. The column 1 text is, for example, as follows: something(whatever,ATACCAA); something(whateverelse,AAATTT); something(somethingelse,CGAA; something(nothing,TTTTTTAACGAAAAA); I can type a query into the SQL design query box as follows SELECT col1 FROM TABLE1 ORDER BY LEN(col1) After I enter this, instead of sorting the database another box appears which wants some sort of parameter. When I enter for example "SortedDatabase" as the parameter, it takes the word "SortedDatabase" and puts it in all 146,000 rows. How do I get the database sorted by string length??? Thanks Jim -- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Data Definition Query Formatting | Mark Stephenson | Running & Setting Up Queries | 1 | September 14th, 2004 03:52 PM |
Too Few Parameters error Mail Merge Access Parameter Query | Tony_VBACoder | Mailmerge | 3 | September 14th, 2004 12:15 PM |
Word 2000/2002 - Proper Mail Merge steps for ODBC? | Tony_VBACoder | Mailmerge | 7 | September 2nd, 2004 09:21 PM |
Function isn't available in expressions in query expression | Reiner Harmgardt | General Discussion | 4 | July 21st, 2004 09:30 AM |
Need Assistance with Data Definition Query - Alter colum | Ericpeeg | Running & Setting Up Queries | 0 | June 11th, 2004 05:51 PM |