Click here to Skip to main content
15,895,011 members
Home / Discussions / Database
   

Database

 
GeneralRe: Using UDFs in a SELECT Pin
Colin Angus Mackay4-Feb-04 4:28
Colin Angus Mackay4-Feb-04 4:28 
GeneralRe: Using UDFs in a SELECT Pin
michanne4-Feb-04 8:38
michanne4-Feb-04 8:38 
GeneralRe: Using UDFs in a SELECT Pin
Mike Dimmick9-Feb-04 3:51
Mike Dimmick9-Feb-04 3:51 
Generaltabledef access using ADO.NET Pin
kcharney2-Feb-04 12:03
kcharney2-Feb-04 12:03 
GeneralProblems with Access and Odbc Pin
jan larsen1-Feb-04 23:18
jan larsen1-Feb-04 23:18 
Questionedit value from datagrid but can't update database-how? Pin
Member 5754691-Feb-04 15:42
Member 5754691-Feb-04 15:42 
GeneralMicrosoft SQL 2 tables alias GROUP BY questions Pin
Member 57510430-Jan-04 15:59
Member 57510430-Jan-04 15:59 
GeneralRe: Microsoft SQL 2 tables alias GROUP BY questions Pin
Edbert P3-Feb-04 11:50
Edbert P3-Feb-04 11:50 
I'm not sure whether this may help, but it doesn't hurt to try:

1. Index your tables, especially A.Number, B.Number, B.Time. I don't think indexing A.New_Name will help if you're using wildcard. Indexing your tables will help the performance when you're doing a search.

2. Do not write your SQL statements in the VBScript. Write them as Views (queries) in the SQL Database.
Views are precompiled (correct me if I'm wrong) and runs faster than a statement passed through VBScript.
You can then call the views from your VBScript (e.g. 'SELECT * FROM qryAB').

3. I'm guessing the reason the query is taking too long is the wildcard used. You may want to create a query just to join tables A and B (SELECT A.New_Name, A.Old_Name, B.Value, B.Time FROM A INNER JOIN B ON A.Number = B.Number WHERE B.Time BETWEEN '2003-12-01' AND '2004-01-30'). If this query doesn't take a long time then the wildcard is the cause.
After that, you can split the next View into two to get the final result, i.e.
"SELECT * FROM firstQuery WHERE New_Name LIKE '%mw%'"
"SELECT * FROM secondQuery WHERE New_Name LIKE '%mw'"
If you need the results as one then you don't need to split the Views. But if you're fine with it, there are ways to split the query so you can work on smaller portions of the data.

I hope it helps Smile | :) .
GeneralReading in an XML File into a DataSet Pin
Member 64401630-Jan-04 7:55
Member 64401630-Jan-04 7:55 
GeneralRe: Reading in an XML File into a DataSet Pin
Mazdak31-Jan-04 5:36
Mazdak31-Jan-04 5:36 
GeneralADO.NET,C#, and MS:Access Pin
Nick Jacobs30-Jan-04 5:38
Nick Jacobs30-Jan-04 5:38 
GeneralCDao MFC classes and a Access 97 DB Pin
Phil.Benson29-Jan-04 21:46
professionalPhil.Benson29-Jan-04 21:46 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Steve S10-Feb-04 6:27
Steve S10-Feb-04 6:27 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Phil.Benson10-Feb-04 20:27
professionalPhil.Benson10-Feb-04 20:27 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Phil.Benson11-Feb-04 1:40
professionalPhil.Benson11-Feb-04 1:40 
GeneralC++ and Database Pin
vin29-Jan-04 19:07
vin29-Jan-04 19:07 
GeneralRe: C++ and Database Pin
basementman30-Jan-04 10:30
basementman30-Jan-04 10:30 
Generalcalculate datacolumn Pin
Member 57546929-Jan-04 18:12
Member 57546929-Jan-04 18:12 
GeneralRe: calculate datacolumn Pin
-Dr_X-30-Jan-04 17:31
-Dr_X-30-Jan-04 17:31 
GeneralProblem of ADO Recordset Pin
Member 55036929-Jan-04 17:37
Member 55036929-Jan-04 17:37 
GeneralUsing List Control with ADO Pin
girl_lash29-Jan-04 16:59
girl_lash29-Jan-04 16:59 
GeneralRetrieving autonumber when inserting data in a table Pin
Anonymous29-Jan-04 9:10
Anonymous29-Jan-04 9:10 
GeneralRe: Retrieving autonumber when inserting data in a table Pin
Guillermo Rivero29-Jan-04 9:12
Guillermo Rivero29-Jan-04 9:12 
GeneralRe: Retrieving autonumber when inserting data in a table Pin
Anonymous30-Jan-04 23:53
Anonymous30-Jan-04 23:53 
GeneralRe: Retrieving autonumber when inserting data in a table Pin
-Dr_X-31-Jan-04 3:59
-Dr_X-31-Jan-04 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.