TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
branko dimitrioski
NA
17
0
help(advice) for select records from database
Feb 28 2011 10:15 AM
HI,
I need help(advice). I have small c# application and I use access database.
In my database i have tblData which looks like this
------------------------------------------------
id-int ai |id_article int |qua double|date date/time|
-------------------------------------------------
1 | 1 | 0 | 28.02.2011 |
------------------------------------------------
The records of this table every day will be incresed about 100 records more.
Now my problem is how to select this records, becouse for 4-5 monts i will have Thousands of records, and my application will be working very slow.
now i select records using following sql command:
sql_kom = "SELECT Table2.Name,Table2.Price,tblData.qua,tblData.date,tblData.id FROM tblData INNER JOIN Table2 ON tblData.id_article = Table2.id WHERE tblData.date>#" + date_from + "# AND Prodazbi.date<#" + date_to + "# AND Table2.group='2'";
I don't know how smart solution is to create new table for every month and insert/read records from that table.
Sorry for my bad english :).
Reply
Answers (
1
)
How can I rewrite this SQL statement to not use OR statements in the WHERE clause and make it as efficient as possible? Its an interview question.
CheckBox adding Parameter with SQL IN to Gridview