Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

QUERY FROM SQL SERVER TO ACCESS

ACCESS 2010

i HAVE THIS CODE FROM SQL SERVER 2008

Can this be used and translated to access sql  ??



ELECT distinct case when wwgsku = '44055' then 'WSKU'
      when WWGMfrNumCondensed = '44055' then 'WMFR'
      when [CompSKUCondensed] = '44055' then 'CSKU'
      when [CompMfrNumCondensed] = '44055' then 'CMFR' else 'NA' end as Match_Type
      , a.*
    
       
  FROM [XRef_Master_TD].[dbo].[main_xref_t1_1] as a
  where [CompMfrNumCondensed] = '44055'
  or [CompSKUCondensed] = '44055'
  or wwgsku = '44055'
  or WWGMfrNumCondensed = '44055'

Open in new window




Thanks
fordraiders
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

so if i had 6 fields  a.wwgsku, a.WWGMfrNumCondensed, CompSKUCondensed,CompMfrNumCondensed, item, Namert

any brackets or parentheses ?
You can include the column names in square brackets, if you wish. That way it is guaranteed that the name will not be rejected if it happen to be the same as one of the reserved Access keywords
Thanks