SELECT SBCD.[Client Name], SBCD.[SRF#], SBCD.[Product Code],
SBCD.[AM#], SBCD.[Resp Transit], SBCD.[Existing Amount], SBCD.[Amount
Request], [Existing Amount]+[Amount Request] AS [Total Request],
SBCD.[Gate Date], SBCD.[Gate Time], SBCD.[Opening Date Finish],
SBCD.[Opening Time Finish], SBCD.[Opener Initial], SBCD.[Lending Date
Finish], SBCD.[Lending Time Finish], [Gate Date] & " " & [Gate Time] AS
[G Date], [Opening Date Finish] & " " & [Opening Time Finish] AS [OF
Date], [Lending Date Finish] & " " & [Lending Time Finish] AS [LF
Date], IIf([Lending Date Finish] Is Not Null,IIf(DateDiff("n",[G
Date],[LF Date])>0,1,0),0) AS Decision
FROM SBCD
WHERE (((SBCD.[Product Code])="I" Or (SBCD.[Product Code])="N") AND
((SBCD.[Gate Date]) Is Not Null) AND ((SBCD.[Gate Time]) Is Not Null)
AND ((SBCD.[Opening Date Finish])>Now()-7));
For above query, how can I display records with condition "Decision =
0"? I always get the "type mismatch" message when I use "0" as criteria
under "decision". 8 1444 th**********@rbc.com wrote: For above query, how can I display records with condition "Decision = 0"? I always get the "type mismatch" message when I use "0" as criteria under "decision".
Is the 'Decision' field a number or text data type? If it's a text type
then enclose the 0 in quotation marks:
Decision = "0"
HTH - Keith. www.keithwilby.com
> SELECT SBCD.[Client Name], SBCD.[SRF#], SBCD.[Product Code], SBCD.[AM#], SBCD.[Resp Transit], SBCD.[Existing Amount], SBCD.[Amount Request], [Existing Amount]+[Amount Request] AS [Total Request], SBCD.[Gate Date], SBCD.[Gate Time], SBCD.[Opening Date Finish], SBCD.[Opening Time Finish], SBCD.[Opener Initial], SBCD.[Lending Date Finish], SBCD.[Lending Time Finish], [Gate Date] & " " & [Gate Time] AS [G Date], [Opening Date Finish] & " " & [Opening Time Finish] AS [OF Date], [Lending Date Finish] & " " & [Lending Time Finish] AS [LF Date], IIf([Lending Date Finish] Is Not Null,IIf(DateDiff("n",[G Date],[LF Date])>0,1,0),0) AS Decision FROM SBCD WHERE (((SBCD.[Product Code])="I" Or (SBCD.[Product Code])="N") AND ((SBCD.[Gate Date]) Is Not Null) AND ((SBCD.[Gate Time]) Is Not Null) AND ((SBCD.[Opening Date Finish])>Now()-7));
For above query, how can I display records with condition "Decision = 0"? I always get the "type mismatch" message when I use "0" as criteria under "decision".
What you could do is use another query - select * from qryThisQry where
Decision = 0
Keith wrote: th**********@rbc.com wrote:
For above query, how can I display records with condition "Decision
= 0"? I always get the "type mismatch" message when I use "0" as
criteria under "decision". Is the 'Decision' field a number or text data type? If it's a text
type then enclose the 0 in quotation marks:
Decision = "0"
HTH - Keith. www.keithwilby.com
Doesn't matter what data type I set to, I still receive the same error
message.
IIf([Lending Date Finish] Is Not Null,IIf(DateDiff("n",[G
Date],[LF Date])>0,1,0),0) AS Decision
There is a condition clause in parameter "Decision"
> There is a condition clause in parameter "Decision"
does that make a difference with a second, separate query that selects from
the first?
Why not use > 0 it works for me, anything in the field greater than 0
returns a list of those meeting the criteria.
Hope this helps
Kind regards, Gordon.
--------------------------------------------------------------------
"deko" <www.clearpointsystems.com@use_contact_form.com> wrote in message
news:rI*****************@newssvr13.news.prodigy.co m... There is a condition clause in parameter "Decision"
does that make a difference with a second, separate query that selects from the first?
Sorry folks, I read the post the wrong way round, Doh!
Kind regards, Gordon.
--------------------------------------------------------------------------
"Gordon Youd" <go****@Zgyoud.demon.co.uk> wrote in message
news:cr*******************@news.demon.co.uk... Why not use > 0 it works for me, anything in the field greater than 0 returns a list of those meeting the criteria.
Hope this helps
Kind regards, Gordon.
-------------------------------------------------------------------- "deko" <www.clearpointsystems.com@use_contact_form.com> wrote in message news:rI*****************@newssvr13.news.prodigy.co m... There is a condition clause in parameter "Decision"
does that make a difference with a second, separate query that selects from the first?
> There is a condition clause in parameter "Decision"
IMHO, I think you're overboard on the immediate if statements. I'd split it
in two for that reason alone This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jaysonsch |
last post by:
Hello!
I am having some problems with a database query that I am trying to do.
I am trying to develop a way to search a database for an entry and
then edit the existing values. Upon submit, the...
|
by: shank |
last post by:
1) I'm getting this error: Syntax error (missing operator) in query
expression on the below statement. Can I get some advice.
2) I searched ASPFAQ and came up blank. Where can find the "rules"...
|
by: netpurpose |
last post by:
I need to extract data from this table to find the lowest prices of
each product as of today. The product will be listed/grouped by the
name only, discarding the product code - I use...
|
by: Harvey |
last post by:
Hi,
I try to write an asp query form that lets client search any text-string and
display all pages in my web server that contain the text. I have IIS 6.0 on a
server 2003. The MSDN site says...
|
by: Diamondback |
last post by:
I have two tables, WIDGETS and VERSIONS. The WIDGETS table has
descriptive information about the widgets while the VERSIONS table
contains IDs relating to different iterations of those widgets...
|
by: Dave Thomas |
last post by:
If I have a table set up like this:
Name | VARCHAR
Email | VARCHAR
Age | TINYINT | NULL (Default: NULL)
And I want the user to enter his or her name, email, and age - but AGE
is optional.
...
|
by: Dom |
last post by:
I need to run a query based on a query in Access. The second query has
a number of conditions which all work well, but there is one more
contition I need to set to make it run properly.
the...
|
by: Ryan Hubbard |
last post by:
Is it possible to get the recordset from an open query window? So you
run the query. The window is open. Can vba retrieve this data?
|
by: starace |
last post by:
I have designed a form that has 5 different list boxes where the
selections within each are used as criteria in building a dynamic
query. Some boxes are set for multiple selections but these list...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
| |