Its a lllllllllllllong shot, but one there is " P.i_OrderID" the other one
is " i_OrderID "

?



> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:active-server-
> [EMAIL PROTECTED] Namens Mills, Andy R. (Regency)
> Verzonden: Thursday, June 30, 2005 2:21 PM
> Aan: '[email protected]'
> Onderwerp: [ASP] DATEDIFF in Where Clause
> 
> Hello Group:
> 
> Can anyone tell me what I am doing wrong in my first SQL Statement?  When
> I
> do not add the DATEDIFF in the where clause:  I get the desired records.
> In
> the second Query:  I have verified that when this is ran:  the value for
> DIFF is at least a 2 (which would be greater than 1).  However:  I cannot
> seem to get the query working when using the first  query.  Any
> suggestions
> would be greatly appreciated.
> 
> -------------------------------------------------------------------------
> QUERY #1
> -------------------------------------------------------------------------
> SELECT
>     i_ID, s_UniqueName
> FROM
>     tPGOrderFiles P
>     INNER JOIN t203 I ON I.Ohornm = P.i_OrderID
> WHERE
>     P.i_OrderID = 1042429
>     AND I.Ohstat NOT IN ('S', 'V')
>     AND DATEDIFF(DAY, d_DateUploaded, GETDATE()) > 1
> 
> -------------------------------------------------------------------------
> QUERY #2
> -------------------------------------------------------------------------
> SELECT
>     DATEDIFF(DAY, d_DateUploaded, GETDATE()) AS Diff
> FROM
>     tPGOrderFiles
> WHERE
>     i_OrderID = 1
> 
> Thanks
> 
> Andy Mills
> Programmer
> Regency Thermographers
> 717-765-3572
>  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> http://www.regencythermo.com <http://www.regencythermo.com/>
> 
> 
> 
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> ---------------------------------------------------------------------
>  Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
>  Post       : [email protected]
>  Subscribe  : [EMAIL PROTECTED]
>  Unsubscribe: [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> Yahoo! Groups Links
> 
> 
> 
> 




---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to