Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL ODBC MSQuery in EXCEL
I have an excel spreadsheet and want to import data from ODBC oracle table.
I had to write the SQL code because the query could not be shown graphically... and it does work successfully. The problem is that I want to include criteria in the WHERE clause for BRICKDATE, but cannot get it to work... SELECT AC_WC_DEMOG_CRSTAB.BRICKDATE, AC_WC_DEMOG_CRSTAB.STATE, Sum(AC_WC_DEMOG_CRSTAB."DEC1-3_RECORD_COUNT") AS "DEC1-3_RECORD_COUNT FROM (AC_WC_DEMOG_CRSTAB) WHERE (AC_WC_DEMOG_CRSTAB.STATE='NY') GROUP BY AC_WC_DEMOG_CRSTAB.BRICKDATE, AC_WC_DEMOG_CRSTAB.STATE I have tried this code but does not work... WHERE (AC_WC_DEMOG_CRSTAB.STATE='NY') AND (AC_WC_DEMOG_CRSTAB.BRICKDATE='2008-06-01 00:00:00')) the date that is used is the actual date in the field that was copy/pasted in. I need the SQL code that will work in MSQuery from exel to ODBC table. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trying to run a MSQuery from Excel as a Scheduled Task | Excel Discussion (Misc queries) | |||
msquery in Excel 2007 | Excel Discussion (Misc queries) | |||
msquery odbc -- excel repeats query on return | Excel Discussion (Misc queries) | |||
Multiple ODBC Database lik in one MSQUERY query | Excel Discussion (Misc queries) | |||
excel 2000, vba and msquery(sql) | Excel Programming |