![]() |
Excel 2007 queries
I am having a couple of issues with creating queries in Excel 07. First, how
do you create an aliasname for a field? in the past i've always done tableName.fieldName AS aliasName. However, this is bringing back a "wrong number of parameters error". Also, I have a query with an OR statement which prompts for the user for a date range(see statements below)- Is there anyway to do this so it won't prompt for the date range twice? Thanks ; ) ((LN_ACCT.col_cd='COLL') AND (User_Def_Fields_LN_2.User_Defined_Field_6 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_7 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_8 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_9 Is Not Null) AND (LN_ACCT.orig_ln_dt Between ? And ?) OR (User_Def_Fields_LN_2.User_Defined_Field_6 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_7 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_8 Is Not Null) AND (User_Def_Fields_LN_2.User_Defined_Field_9 Is Not Null) AND (LN_ACCT.orig_ln_dt Between ? And ?) AND (LN_ACCT.pur_cd In ('AUT','BO/RV','MC','SCC','2CH','IND'))) |
All times are GMT +1. The time now is 01:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com