Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Import from Acess problems with SQL language

I have a query in access where I use SQL code to calculate a field. In the
SQL code I have a series of if statments that use * to represent any
character and # to represent any number. The query outputs the correct
results in Access. When I import this to excel, it does not correctly
interpret the * or #, so outputs my "then" from the if statement. Is there
somewhere in Excel 2003 that I can change the language it is using to
recognize the * & #?

For clarification, here is an example:

IIf([Type] like "8##*, "800", "x")

Results in Access
Type Result
825XY 800
650ZX x
875YX 800

Results I am getting in Excel
Type Result
825XY x
650ZX x
875YX x

Thanks!
  #2   Report Post  
Junior Member
 
Posts: 9
Default

Quote:
Originally Posted by toby131 View Post
I have a query in access where I use SQL code to calculate a field. In the
SQL code I have a series of if statments that use * to represent any
character and # to represent any number. The query outputs the correct
results in Access. When I import this to excel, it does not correctly
interpret the * or #, so outputs my "then" from the if statement. Is there
somewhere in Excel 2003 that I can change the language it is using to
recognize the * & #?

For clarification, here is an example:

IIf([Type] like "8##*, "800", "x")

Results in Access
Type Result
825XY 800
650ZX x
875YX 800

Results I am getting in Excel
Type Result
825XY x
650ZX x
875YX x

Thanks!
Toby131
Are you using MS query to import your data?
Although Access and Excel are both microsoft products their use of wildcards strangely differs. Access is "*" and Excel is "%"
2 options are to run the query first in Access as a create table query then import the results to Excel. You can automate the whole procedure with a macro.
Or Swap the wild cards in Access to those compatible to Excels MS query.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import .csv File Problems Dalene Excel Worksheet Functions 5 January 16th 08 09:11 AM
How to change German language data into Eglish Language in a colum Execel work sheet language problems Excel Discussion (Misc queries) 1 October 29th 07 09:59 PM
language support in excel sheet using a third party language tool seema Excel Worksheet Functions 0 March 13th 06 06:06 AM
Excel import problems Larry Excel Discussion (Misc queries) 0 February 25th 05 06:17 PM
How to change the excel format from language to language? zee Excel Discussion (Misc queries) 2 January 30th 05 06:51 PM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"