Access Query

Soldato
Joined
24 Jan 2003
Posts
2,560
Location
Cornwall
Is there any way to add a prefix into a query in excel?
I want the output to add a ' to the start of all numerical fields because when i import into a foxpro database later on this is needed for the application which will run it.
Normally i just add them all in notepad but i have about 15k rows in this spreadsheet.
 
Can't you just add another column before the number column and opulate this with ' chars, then select both columns and paste into notepad (might need to do a search and replace for big blocks of white space afterwards.)
 
open the query, switch to SQL view, where it has 'SELECT stuff FROM table WHERE condition' just add your prefix before the stuff bit

so it's SELECT prefix <access string concatanation operator> stuff from table

there will be an operator to join two strings together in Access' SQL, it's || in oracle and + in SQL Server i have no idea what access uses I'm afraid.

Paul

edit: does access have a dual equivalent so you can select whatever you want?
 
Back
Top Bottom