1bb11 query criteria
Sign Up |  Live StatsLive Stats    Articles 37,342| Comments 177,324| Members 19,420, Newest Talia| Online 538
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

query criteria

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Query Criteria wal50 Information Technology 3 28-Jul-2006 08:28 AM
query criteria Chey Information Technology 0 28-Jul-2006 08:27 AM
query criteria Levans digital Information Technology 5 28-Jul-2006 08:25 AM
more than 1 in one query criteria msmuzila@gmail.com Information Technology 0 28-Jul-2006 08:22 AM
query criteria Jessica Information Technology 1 27-Oct-2005 12:27 PM


Tags
query, criteria
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Oct-2005, 18:00 PM
Jessica's Avatar Jessica
Guest
 
Posts: n/a
   
   
query criteria

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hello All,

Here is theSQL view in my query

SELECT tblCaseCountReport.dtmStartDate, tblCaseCountReport.intFlavorCounter,
tblCaseCountReport.strShift, tblCaseCountReport.dtmStartTime,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6042-query-criteria.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
tblCaseCountReport.strFlavor, tblCaseCountReport.strSize,
tblCaseCountReport.strLineNumber,
60*Hour([dtmStartTime])+Minute([dtmStartTime])-270 AS Expr2,
IIf([expr2]<0,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS
ProductionDate
FROM tblCaseCountReport


I want to add a criteria in the dtmStartDate field, Between [Type the
beginning date:] And [Type the ending date:] . I tried using this but got a
message box that said HAVING clause (tblCaseCountReport.dtmStartDate Between
[Type the beginning date:] And [Type the ending date:]) without grouping or
aggregation.

Is this because of the expression in my ProductionDate field?


TIA,
Jessica




Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Oct-2005, 18:00 PM
Van T. Dinh's Avatar Van T. Dinh
Guest
 
Posts: n/a
   
   
Re: query criteria

IIRC, the use of [expr2] in the "subsequent" IIF expression is generally
unreliable and may give this sort of problem since JET process the Query in
some order, NOT necessarily from left to right as you assumed.

If you don't need [Expr2] except for the "subsequent" IIF, include the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
calculation in the IIF expression itself.

Try:

SELECT tblCaseCountReport.dtmStartDate, tblCaseCountReport.intFlavorCounter,
tblCaseCountReport.strShift, tblCaseCountReport.dtmStartTime,
tblCaseCountReport.strFlavor, tblCaseCountReport.strSize,
tblCaseCountReport.strLineNumber,
IIf([dtmStartTime]<#04:30#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS
ProductionDate
FROM tblCaseCountReport

If you need help with the Parameters, post your attempted SQL WITH the
Parameters.


--
HTH
Van T. Dinh
MVP (Access)



Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
"Jessica" wrote in message
news:GXa8f.23530$Bv6.12793@twister.nyroc.rr.com...
> Hello All,
>
> Here is theSQL view in my query
>
> SELECT tblCaseCountReport.dtmStartDate,
> tblCaseCountReport.intFlavorCounter, tblCaseCountReport.strShift,
> tblCaseCountReport.dtmStartTime, tblCaseCountReport.strFlavor,
> tblCaseCountReport.strSize, tblCaseCountReport.strLineNumber,
> 60*Hour([dtmStartTime])+Minute([dtmStartTime])-270 AS Expr2,
> IIf([expr2]<0,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS
> ProductionDate
> FROM tblCaseCountReport
>
>
> I want to add a criteria in the dtmStartDate field, Between [Type the
> beginning date:] And [Type the ending date:] . I tried using this but got
> a message box that said HAVING clause (tblCaseCountReport.dtmStartDate
> Between [Type the beginning date:] And [Type the ending date:]) without
> grouping or aggregation.
>
> Is this because of the expression in my ProductionDate field?
>
>
> TIA,
> Jessica
>



Reply With Quote
  #3 (permalink)  
Old 28-Oct-2005, 18:00 PM
Jessica's Avatar Jessica
Guest
 
Posts: n/a
   
   
Re: query criteria

Van
How you know what I am trying to do by looking at my SQL is beyond me. That
is amazing!!! The IT guy at work came up with that query and lost me within
the first 5 minutes. I guess he made the Expr2 field to have the query
subtract 270 minutes from the start time and if it was a negative number
then subtract a day from the start date. Anyway I entered in what you had
posted and the results were the same so I am going to keep it your way.
Could I still have the user enter a date range? I tried it again and got the
same message box as I posted before.

Thanks Van
Jess


"Van T. Dinh" wrote in message
news:%23r5emtz2FHA.3296@TK2MSFTNGP09.phx.gbl...
> IIRC, the use of [expr2] in the "subsequent" IIF expression is generally
> unreliable and may give this sort of problem since JET process the Query
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
> in some order, NOT necessarily from left to right as you assumed.
>
> If you don't need [Expr2] except for the "subsequent" IIF, include the
> calculation in the IIF expression itself.
>
> Try:
>
> SELECT tblCaseCountReport.dtmStartDate,
> tblCaseCountReport.intFlavorCounter,
> tblCaseCountReport.strShift, tblCaseCountReport.dtmStartTime,
> tblCaseCountReport.strFlavor, tblCaseCountReport.strSize,
> tblCaseCountReport.strLineNumber,
> IIf([dtmStartTime]<#04:30#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate])
> AS ProductionDate
> FROM tblCaseCountReport
>
> If you need help with the Parameters, post your attempted SQL WITH the
> Parameters.
>
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Jessica" wrote in message
> news:GXa8f.23530$Bv6.12793@twister.nyroc.rr.com...
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
>> Hello All,
>>
>> Here is theSQL view in my query
>>
>> SELECT tblCaseCountReport.dtmStartDate,
>> tblCaseCountReport.intFlavorCounter, tblCaseCountReport.strShift,
>> tblCaseCountReport.dtmStartTime, tblCaseCountReport.strFlavor,
>> tblCaseCountReport.strSize, tblCaseCountReport.strLineNumber,
>> 60*Hour([dtmStartTime])+Minute([dtmStartTime])-270 AS Expr2,
>> IIf([expr2]<0,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS
>> ProductionDate
>> FROM tblCaseCountReport
>>
>>
>> I want to add a criteria in the dtmStartDate field, Between [Type the
>> beginning date:] And [Type the ending date:] . I tried using this but got
>> a message box that said HAVING clause (tblCaseCountReport.dtmStartDate
>> Between [Type the beginning date:] And [Type the ending date:]) without
>> grouping or aggregation.
>>
>> Is this because of the expression in my ProductionDate field?
>>
>>
>> TIA,
>> Jessica
>>

>
>



Reply With Quote
  #4 (permalink)  
Old 28-Oct-2005, 18:00 PM
Van T. Dinh's Avatar Van T. Dinh
Guest
 
Posts: n/a
   
   
Re: query criteria

Post the SQL of your attempt to use the Parameter(s).

--
HTH
Van T. Dinh
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
MVP (Access)



"Jessica" wrote in message
news:Xcc8f.23836$Bv6.3811@twister.nyroc.rr.com...
> Van
> How you know what I am trying to do by looking at my SQL is beyond me.
> That is amazing!!! The IT guy at work came up with that query and lost me
> within the first 5 minutes. I guess he made the Expr2 field to have the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
> query subtract 270 minutes from the start time and if it was a negative
> number then subtract a day from the start date. Anyway I entered in what
> you had posted and the results were the same so I am going to keep it your
> way. Could I still have the user enter a date range? I tried it again and
> got the same message box as I posted before.
>
> Thanks Van
> Jess
>
>



Reply With Quote
  #5 (permalink)  
Old 28-Oct-2005, 18:00 PM
Jessica's Avatar Jessica
Guest
 
Posts: n/a
   
   
Re: query criteria

SELECT tblCaseCountReport.dtmStartDate, tblCaseCountReport.intFlavorCounter,
tblCaseCountReport.strShift, tblCaseCountReport.dtmStartTime,
tblCaseCountReport.strFlavor, tblCaseCountReport.strSize,
tblCaseCountReport.strLineNumber, IIf([dtmStartTime]<#12/30/1899
4:30:0#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS ProductionDate
FROM tblCaseCountReport
HAVING (((tblCaseCountReport.dtmStartDate) Between [Type the beginning
date:] And [Type the ending date:]));

"Van T. Dinh" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
news:ODJDQy02FHA.3188@TK2MSFTNGP12.phx.gbl...
> Post the SQL of your attempt to use the Parameter(s).
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Jessica" wrote in message
> news:Xcc8f.23836$Bv6.3811@twister.nyroc.rr.com...
>> Van
>> How you know what I am trying to do by looking at my SQL is beyond me.
>> That is amazing!!! The IT guy at work came up with that query and lost me
>> within the first 5 minutes. I guess he made the Expr2 field to have the
>> query subtract 270 minutes from the start time and if it was a negative
>> number then subtract a day from the start date. Anyway I entered in what
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
>> you had posted and the results were the same so I am going to keep it
>> your way. Could I still have the user enter a date range? I tried it
>> again and got the same message box as I posted before.
>>
>> Thanks Van
>> Jess
>>
>>

>
>



Reply With Quote
  #6 (permalink)  
Old 28-Oct-2005, 18:00 PM
Van T. Dinh's Avatar Van T. Dinh
Guest
 
Posts: n/a
   
   
Re: query criteria

Use WHERE instead of HAVING. You only use HAVING if you use GROUP BY Clause
in the SQL.

You will need to check exactly what you require in light of the Calculated
Field [ProductionDate] . I am not sure whether you want to use dteStartDate
or [ProductionDate] in the WHERE clause.

--
HTH
Van T. Dinh
MVP (Access)



"Jessica" wrote in message
news:6Jd8f.112707$7b6.23911@twister.nyroc.rr.com.. .
> SELECT tblCaseCountReport.dtmStartDate,
> tblCaseCountReport.intFlavorCounter, tblCaseCountReport.strShift,
> tblCaseCountReport.dtmStartTime, tblCaseCountReport.strFlavor,
> tblCaseCountReport.strSize, tblCaseCountReport.strLineNumber,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
> IIf([dtmStartTime]<#12/30/1899
> 4:30:0#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS ProductionDate
> FROM tblCaseCountReport
> HAVING (((tblCaseCountReport.dtmStartDate) Between [Type the beginning
> date:] And [Type the ending date:]));
>



Reply With Quote
  #7 (permalink)  
Old 29-Oct-2005, 12:35 PM
Jessica's Avatar Jessica
Guest
 
Posts: n/a
   
   
Re: query criteria

Van

Without having the user enter in a date the report displays as I want it to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
but lists all dates entered in the table. I tried using [Type the beginning
date:] And [Type the ending date:] in the field ProductionDate but the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
results are not coming out the same. Can I use a parameter like this with
this expression?

Thanks,
Jess

"Van T. Dinh" wrote in message
news:ucBDj212FHA.2600@tk2msftngp13.phx.gbl...
> Use WHERE instead of HAVING. You only use HAVING if you use GROUP BY
> Clause in the SQL.
>
> You will need to check exactly what you require in light of the Calculated
> Field [ProductionDate] . I am not sure whether you want to use
> dteStartDate or [ProductionDate] in the WHERE clause.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Jessica" wrote in message
> news:6Jd8f.112707$7b6.23911@twister.nyroc.rr.com.. .
>> SELECT tblCaseCountReport.dtmStartDate,
>> tblCaseCountReport.intFlavorCounter, tblCaseCountReport.strShift,
>> tblCaseCountReport.dtmStartTime, tblCaseCountReport.strFlavor,
>> tblCaseCountReport.strSize, tblCaseCountReport.strLineNumber,
>> IIf([dtmStartTime]<#12/30/1899
>> 4:30:0#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS ProductionDate
>> FROM tblCaseCountReport
>> HAVING (((tblCaseCountReport.dtmStartDate) Between [Type the beginning
>> date:] And [Type the ending date:]));
>>

>
>



Reply With Quote
  #8 (permalink)  
Old 31-Oct-2005, 11:19 AM
Van T. Dinh's Avatar Van T. Dinh
Guest
 
Posts: n/a
   
   
Re: query criteria

Please post your latest SQL String with Parameters.

--
HTH
Van T. Dinh
MVP (Access)



"Jessica" wrote in message
news:SEB8f.99627$K91.94999@twister.nyroc.rr.com...
> Van
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
> Without having the user enter in a date the report displays as I want it
> to but lists all dates entered in the table. I tried using [Type the
> beginning date:] And [Type the ending date:] in the field ProductionDate
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
> but the results are not coming out the same. Can I use a parameter like
> this with this expression?
>
> Thanks,
> Jess
>



Reply With Quote
  #9 (permalink)  
Old 01-Nov-2005, 13:40 PM
Jessica's Avatar Jessica
Guest
 
Posts: n/a
   
   
Re: query criteria

  Donate Today!  
Van

Here is my SQL

SELECT tblCaseCountReport.dtmStartDate, tblCaseCountReport.intFlavorCounter,
tblCaseCountReport.strShift, tblCaseCountReport.dtmStartTime,
tblCaseCountReport.strFlavor, tblCaseCountReport.strSize,
tblCaseCountReport.strLineNumber, IIf([dtmStartTime]<#12/30/1899
4:30:0#,DateAdd("d",-1,[dtmStartDate]),[dtmStartDate]) AS ProductionDate
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
FROM tblCaseCountReport;

I did not enter in the date range parameter because the results are not
coming out like they should. The SQL above works perfectly but reports
everyday. I wanted to add a user defined date range. I tried putting it into
the ProductionDate field and using a date range 10/25/05-10/25/05 but it
doesn't give me the records past midnight - 4:30. Using the same date I then
I tried putting it into the dtmStartDate field and the results were from
0:00 - 4:30 were under the date 10/24/05 and from 4:30 - midnight on
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6042
10/25/05.

I think I'm making this sound more difficult than it really is. You see what
I am trying to do we have two shifts For example Shift A starts on 10/25/05
at 4:30am - 16:30pm then Shift B starts on 10/25/05 at 16:30pm - 10/26/05
4:30am I want to build a query where the user would type a date or date
range for example 10/25/05 - 10/25/05 and the results would be for the time
listed above. What is messing me up is the system clock changing the day
after midnight. Is this possible to do?

TIA,
Jessica


"Van T. Dinh" wrote in message
news:uPN6Jub3FHA.3296@TK2MSFTNGP09.phx.gbl...
> Please post your latest SQL String with Parameters.
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "Jessica" wrote in message
> news:SEB8f.99627$K91.94999@twister.nyroc.rr.com...
>> Van
>>
>> Without having the user enter in a date the report displays as I want it
>> to but lists all dates entered in the table. I tried using [Type the
>> beginning date:] And [Type the ending date:] in the field ProductionDate
>> but the results are not coming out the same. Can I use a parameter like
>> this with this expression?
>>
>> Thanks,
>> Jess
>>

>
>



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Panjabi Alphabet Resource
Today 23:15 PM
12 Replies, 6,536 Views
Rochester Gurdwara...
Today 23:01 PM
0 Replies, 1 Views
Transgenderism ... Right...
Today 23:00 PM
31 Replies, 1,323 Views
How does Sikhi help you...
Today 22:57 PM
37 Replies, 1,045 Views
Biography of a Scholar:...
Today 22:53 PM
1 Replies, 3 Views
Dusting The Web
Today 22:25 PM
0 Replies, 5 Views
How Pure the Tongue? New...
Today 21:29 PM
0 Replies, 21 Views
Stockholm riots throw...
Today 21:14 PM
1 Replies, 9 Views
Biography of a Scholar:...
Today 18:59 PM
2 Replies, 160 Views
Request for assistance...
By Ishna
Today 18:46 PM
11 Replies, 157 Views
Occultism - Rejection in...
Today 08:44 AM
62 Replies, 2,686 Views
‘Bigoted’ Facebook...
Today 08:32 AM
1 Replies, 74 Views
Australia mulls allowing...
Today 07:30 AM
0 Replies, 62 Views
Woolwich Killing: The...
Today 06:41 AM
3 Replies, 82 Views
Panjabi
By Ishna
Today 04:40 AM
16 Replies, 322 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 23:15 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.81606 seconds with 32 queries
0