LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SQL query to ODBC

I'm using the following query to download to Excel
Error says it doesn't expect the keyword Between in the IIf statement.
Works fine without the IIf.
Any suggestions?
vQuery = "SELECT PSPSP100.PARNT, PSPSP100.CSEQN, PSPSP100.PSPCL,
PSPSP100.CHILD, PSPSP100.PSCCL, MSPMP100.PRDNO, MSPMP100.DESCP,
IIf(PSPSP100.PSPCL Between 'AA'And 'YM',MSPMP100.S2APH='C10301A',
MSPMP100.S2APH Like '*') FROM-----"


---
Message posted from http://www.ExcelForum.com/

 
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
ODBC Query Laddie Excel Worksheet Functions 0 April 23rd 10 03:35 PM
ODBC query oddity Arvi Laanemets Excel Discussion (Misc queries) 0 January 12th 09 08:05 AM
ODBC query problem Arvi Laanemets Excel Discussion (Misc queries) 3 September 26th 08 02:03 PM
Using SUM function in MS QUERY with ODBC Francois via OfficeKB.com Excel Discussion (Misc queries) 0 November 29th 07 02:37 PM
ODBC database query gneissgirl Excel Discussion (Misc queries) 0 November 10th 05 06:18 PM


All times are GMT +1. The time now is 09:50 AM.

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

About Us

"It's about Microsoft Excel"