473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

date comparation

hello to all, i have this sql sentence Set xRs=pCon.Execute("SELECT
sum(monto_abono) AS TpuntosM FROM con_vtas WHERE RUTGTE='"&session("rut")&"'
and month("fecha")='#month("date")#'")
but this (month("fecha")='#month("date")#'") is correct?
the browser send me error "Error de compilación de Microsoft VBScript
(0x800A03EE)
Se esperaba ')'"
thank
--
Marco Antonio Artus S.
Lakromsoft INC.
56-9-9594663
Jul 22 '05 #1
6 1477

In which field do you keep the month, lets say MyMonth then

MyMonth is a Integer

Set xRs=pCon.Execute("SELECT sum(monto_abono) AS TpuntosM FROM con_vtas
WHERE RUTGTE='" & session("rut") & "' AND MyMonth = " & month("date"))
Jul 22 '05 #2
"Lakrom" <la****@terra.cl> wrote in message
news:GC****************@jagger.tie.cl...
hello to all, i have this sql sentence Set xRs=pCon.Execute("SELECT
sum(monto_abono) AS TpuntosM FROM con_vtas WHERE
RUTGTE='"&session("rut")&"'
and month("fecha")='#month("date")#'")
but this (month("fecha")='#month("date")#'") is correct?
the browser send me error "Error de compilación de Microsoft VBScript
(0x800A03EE)
Se esperaba ')'"
thank
--
Marco Antonio Artus S.
Lakromsoft INC.
56-9-9594663


Assign your sql query to a variable then

Set xRs=pCon.Execute(strsql)

I expect the compilation error will occur when your try to assign the
variable, because I am not sure if you have the right number of " marks,
hard to tell from looking.

Once you have that working, if you still get the error (and I think you will
because I don't know what month("date") is supposed to do), you can at least
do a response.write of the var so that you know what you are trying to
execute. You can then paste the output into MS Access (if you have it) and
run the query there, which will give you much more informative error
messages.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
Jul 22 '05 #3
What the heck are these nonsense posts from last night?


"Lakrom" <la****@terra.cl> wrote in message
news:GC****************@jagger.tie.cl...
hello to all, i have this sql sentence Set xRs=pCon.Execute("SELECT
sum(monto_abono) AS TpuntosM FROM con_vtas WHERE RUTGTE='"&session("rut")&"' and month("fecha")='#month("date")#'")
but this (month("fecha")='#month("date")#'") is correct?
the browser send me error "Error de compilación de Microsoft VBScript
(0x800A03EE)
Se esperaba ')'"
thank
--
Marco Antonio Artus S.
Lakromsoft INC.
56-9-9594663

Jul 22 '05 #4
Looks like someone is upset with this newsgroup.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
What the heck are these nonsense posts from last night?


"Lakrom" <la****@terra.cl> wrote in message
news:GC****************@jagger.tie.cl...
hello to all, i have this sql sentence Set xRs=pCon.Execute("SELECT
sum(monto_abono) AS TpuntosM FROM con_vtas WHERE

RUTGTE='"&session("rut")&"'
and month("fecha")='#month("date")#'")
but this (month("fecha")='#month("date")#'") is correct?
the browser send me error "Error de compilación de Microsoft VBScript
(0x800A03EE)
Se esperaba ')'"
thank
--
Marco Antonio Artus S.
Lakromsoft INC.
56-9-9594663


Jul 22 '05 #5
Do you mean me, or the person who faked a couple of posts filled with
garbage?

I see two posts from John Blessing, and two posts from Gérard Leclercq. One
from each is legitmate, and one from each is not (originating from the same
IP: 210.178.1.125 / news1.kornet.net). The latter are gibberish and I'm not
sure of their purpose...

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mark Schupp" <no******@email.net> wrote in message
news:OI*************@TK2MSFTNGP11.phx.gbl...
Looks like someone is upset with this newsgroup.

Jul 22 '05 #6
Gazing into my crystal ball I observed "Aaron [SQL Server MVP]"
<te*****@dnartreb.noraa> writing in
news:eF**************@TK2MSFTNGP10.phx.gbl:
Do you mean me, or the person who faked a couple of posts filled with
garbage?

I see two posts from John Blessing, and two posts from Gérard
Leclercq. One from each is legitmate, and one from each is not
(originating from the same IP: 210.178.1.125 / news1.kornet.net). The
latter are gibberish and I'm not sure of their purpose...


Hipcrime - http://c2.com/cgi/wiki?HipcrimeFloods

--
Adrienne Boswell
Please respond to the Group so others can share
Jul 22 '05 #7

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

Similar topics

3
by: Abdullah Khaidar | last post by:
I've read some language -include python- comparation texts (benchmarks). But they are very old, so that I'm doubt about their results. Does anyone know language comparation texts which compare...
2
by: Tjerk | last post by:
Hello all, I have the script below to change an image depending on the date upto january it worked fine but then it just stopped working does anybody have an idea how I can make it work again or...
3
by: captain | last post by:
Below is the sql for data with same date need to extract + or - 5 days data of same date also. How to also get data of + and - days related to same date. SELECT IM.Area, IM.Location,...
1
by: Steven Blair | last post by:
Hi, I have a windows service monitoring a directory for files, which works fine. The problem I have is when I pick up a file, it needs to be the oldest file first. Anyone any idea how to do...
8
by: JFB | last post by:
Hi All, I'm trying to find if a file name that includes the date is before todays to do some procedures. In my IF statement is working is just a few dates before but not is a year before. How...
3
by: Peter | last post by:
ASP.NET 1.1, this is a Intranet application and runs only on IE. I have two webform text boxes which contain dates - starting date and ending date. The dates could be in any format. for...
2
by: savigliano | last post by:
hello, i am doing a date comparation and i have reallize that the data i have in my database (general date format) it is causing me problems, and because i don´t need the time data i would like to...
8
by: Grey | last post by:
I have following problem: table includes times for startup and end of operation as datetime field related to daily shift operations: dateid date starttime endtime 458 2006-12-29 22:00 ...
3
by: Pemasem | last post by:
In my register I have "06/10/2007 12:41:02" DateTime value, but my query : SELECT Fecha FROM dbo.WWW_LIBROVISITAS_VB WHERE (Fecha <= '06/10/2007 12:41:02') AND (Fecha >=...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
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...
0
marktang
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,...
0
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
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,...
0
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
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...
0
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...

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.