[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 981
  • Last Modified:

How to create memo field with make table query?

I would like to create a memo field instead of the default text field with a make table query. How can I do this in one step?

Thanks in advance for your time and help.
0
smoyano
Asked:
smoyano
  • 4
  • 4
  • 4
  • +1
1 Solution
 
GRayLCommented:
Don't follow you. On my machine a typical maketable query is:

Select myOldTable.* into myNewTable from myOldTable;

Where does the default text field come into it?

0
 
Data-ManCOOCommented:
If the underlying fieldsize is of type memo, then that is what will be created when you run the make table query.

Mike
0
 
Shahid ThaikaSole ProprietorCommented:
Not sure about your exact needs, but the following query creates a table with a memo field.

Create table Table1 (Field1 memo);
CREATE TABLE [TABLENAME] ([FIELDNAME] [TYPE]);

Hope this answers your question :)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
smoyanoAuthor Commented:
I apologize for being unclear. I am using a make table query and the there is no underlying field for one of the columns. It is a blank which will be populated in a latter step. It is defaulting to text 255. Can I specify in the query grid cell that I want this to be a memo field?

We are selecting into table [Observer Awards] and the Null as Researchers defaults to 255 characters.

SELECT DISTINCTROW SPROJ_tAwards.AWARD_ID AS A_ID, Null AS Researchers INTO [Observer Awards]
FROM  etc.

Thanks for your time and help.
0
 
Data-ManCOOCommented:
What version of Access are you using...you may be able to run a SQL statement that will alter the column to be of type memo.

Mike
0
 
Shahid ThaikaSole ProprietorCommented:
Maybe you can set it in the main template (Like the Normal.Dot in Word). Don't really know if you can do that. But if you are sure you want it to be a memo field in the future, why not specify it while creating the table. Text fields are smaller in size and hence are shown as default. It could also be that the field is in reality a null field, but Access shows it as a text field in order to show something. Even if it is a text field now, you can always use an Alter table query in the future.
0
 
smoyanoAuthor Commented:
I am using access 97.
0
 
smoyanoAuthor Commented:
eeshahidt,

How do I specify memo type in the make table query? That is exactly what I want to do.
0
 
GRayLCommented:
Menu bar, Tools, Options, Tables/Queries tab, set Default Field Type - Memo. Click Apply.

Now when you execute the maketable query, the field should default to Memo.
0
 
smoyanoAuthor Commented:
GRayL,

Still text 255.
0
 
GRayLCommented:
I'm running A2000 under Windows XP Home and using null I get a binary type 510 bytes long.  I changed null to "" and then got text.  I could not generate a situation where the datatype defaulted to the memo as specified in options. Sorry. I then tried to creat a query parameter:

parameters fldMemo memo;
select *, fldMemo into myNewTable from myTable;

It would not accept the word memo in the parameters clause.  I could use text, char, number, etc. but not memo.  Go figure!  Anyone else with a idea?
0
 
Data-ManCOOCommented:
Run the make table query and then run an alter statement.

Mike
0
 
GRayLCommented:
Mike:  The customer wrote: " How can I do this in one step?"
0
 
Data-ManCOOCommented:
sorry...I missed that part....not sure it can be done in 1 step

Mike
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 4
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now