473,511 Members | 16,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering Rows With SQL Select

hi.

ive been trying to filter rows from an access table with the sql select
command, this is the line i used:

sql1 = "SELECT cus1,wexp,sno, model, invdate, invno,amt, equip, roll FROM
amc1 WHERE branch like '" & x & "' AND invdate < 'dateto'"

the 'where' bit works, but the invdate filter doesnt. however, there are also
no error messages - the pgm runs ok.
any ideas anyone?

thanks.

--
it's all latin & geek to me! ;-)

Message posted via http://www.dotnetmonster.com
Jan 19 '06 #1
1 947
Hi,

You are always comparing invdate to a string dateto

'dateto'"

You should try something like this

'" & dateto.tostring & "'"

Ken
-----------------------
"latin & geek via DotNetMonster.com" <u16975@uwe> wrote in message
news:5a931c3af42df@uwe...
hi.

ive been trying to filter rows from an access table with the sql select
command, this is the line i used:

sql1 = "SELECT cus1,wexp,sno, model, invdate, invno,amt, equip, roll FROM
amc1 WHERE branch like '" & x & "' AND invdate < 'dateto'"

the 'where' bit works, but the invdate filter doesnt. however, there are
also
no error messages - the pgm runs ok.
any ideas anyone?

thanks.

--
it's all latin & geek to me! ;-)

Message posted via http://www.dotnetmonster.com

Jan 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3137
by: Alex Ayzin | last post by:
Hi, I have a problem that might be easy to solve(possibly, I've just overlooked an easy solution). Here we go: I have a dataset with 2 datatables in it. Now, I need to do the following: if...
1
2466
by: Alex Satrapa | last post by:
I have a table from which I'm trying to extract certain information. For historical reasons, we archive every action on a particular thing ('thing' is identified, funnily enough, by 'id'). So the...
5
54592
by: TA | last post by:
Hi, Does anyone know if it is possible to filter rows in a DataTable by pattern (e.g. Like in SQL) For instance I want to select all rows containing the 'rob' in the name column. Any...
2
1235
by: Darren Clark | last post by:
I have a data set... in which i need to remove 1 row based on a particaly name eg i have a data set (data) and it has 1 table and N rows.... It has a column name of i want to remove all...
3
8849
by: Shahriar | last post by:
I am using the following statement to filter a dataset. ds.Tables(0).DefaultView.RowFilter = "ID='" & currentpos & " ' It seems to run fine. My question is since I have a filter set, why is the...
7
14784
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
6
1548
by: assgar | last post by:
Hi I am trying to get data from a mysql database with php. These dynamic rows may have multiple prices between 1 and 5. I would like to use a drop dropdown to display these prices and allow...
5
1352
by: AtCor | last post by:
SELECT , Date, , Time FROM (SELECT ISNULL(t9., t8.) AS , ISNULL(t9.Date, t8.Date) AS Date, ISNULL(t9.Rows, t8.Rows) AS Rows, c., c.Time, ROW_NUMBER() OVER (PARTITION BY ISNULL(t9., t8.),...
9
9201
by: shanevanle | last post by:
I have two tables that are pretty big. I need about 10 rows in the left table and the right table is filtered to 5 rows as well. It seems when I join the tables in the FROM clause, I have to...
0
6086
by: Romulo NF | last post by:
Greetings again everyone Recently i´ve been asked to develop a script to allow filtering in the content of the table, with dinamic options based on the own content. Example: a table with the name of...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.