A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Executing an SQL Data Definition Query



 
 
Thread Tools Display Modes
  #1  
Old November 12th, 2004, 06:38 PM
James Pannozzi
external usenet poster
 
Posts: n/a
Default 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  
Old November 12th, 2004, 09:04 PM
John Nurick
external usenet poster
 
Posts: n/a
Default

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  
Old November 14th, 2004, 12:41 AM
Takuon Soho
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.