1

そのため、新しいテーブルに 120 行を挿入しようとすると、「クエリが複雑すぎます」というエラーが表示され続けます。90行までは問題なく動作します。

これはクエリです:

SQL = "INSERT INTO " & newtable & " ([" & sourceQ & "_" & master & "], 
    [" & sourceQ & "_" & fld.Name & "])" & " SELECT 
    [" & sourceQ & "." & master & "], [" & sourceQ & "." & fld.Name & "]" 
    & " FROM " & sourceQ 

where句を追加して遊んでみましWHERE [" & sourceQ & ".Expr1] like ('Field09?')たが、それでもこれらのエラーがスローされます。

のように機能する単純なものを試してみましたが WHERE [" & sourceQ & ".Expr1] = 'Field001'、これは1行だけである必要がありますが、それでもエラーがスローされます。

誰にもアイデアはありますか?

編集: デバッグ

INSERT INTO tblCalc ([qJoinKeyAndStudent_<>], [qJoinKeyAndStudent_0 1 0 1])
SELECT [qJoinKeyAndStudent.<>], [qJoinKeyAndStudent.0 1 0 1] 
FROM qJoinKeyAndStudent WHERE [qJoinKeyAndStudent.Expr1] like ('*09#')
4

1 に答える 1

1

While Access is capable of handling spaces in field and table names, you need to encapsulate both the field and table names in separate brackets:

INSERT INTO tblCalc ([qJoinKeyAndStudent_<>], [qJoinKeyAndStudent_0 1 0 1])
SELECT [qJoinKeyAndStudent].[<>], [qJoinKeyAndStudent].[0 1 0 1] 
FROM qJoinKeyAndStudent WHERE [qJoinKeyAndStudent].[Expr1] like ('*09#')

Does that work?

于 2013-05-16T21:24:30.567 に答える