473,785 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

date comparation

hello to all, i have this sql sentence Set xRs=pCon.Execut e("SELECT
sum(monto_abono ) AS TpuntosM FROM con_vtas WHERE RUTGTE='"&sessi on("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 1490

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

MyMonth is a Integer

Set xRs=pCon.Execut e("SELECT sum(monto_abono ) AS TpuntosM FROM con_vtas
WHERE RUTGTE='" & session("rut") & "' AND MyMonth = " & month("date"))
Jul 22 '05 #2
"Lakrom" <la****@terra.c l> wrote in message
news:GC******** ********@jagger .tie.cl...
hello to all, i have this sql sentence Set xRs=pCon.Execut e("SELECT
sum(monto_abono ) AS TpuntosM FROM con_vtas WHERE
RUTGTE='"&sessi on("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.Execut e(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.c l> wrote in message
news:GC******** ********@jagger .tie.cl...
hello to all, i have this sql sentence Set xRs=pCon.Execut e("SELECT
sum(monto_abono ) AS TpuntosM FROM con_vtas WHERE RUTGTE='"&sessi on("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*****@dnartr eb.noraa> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
What the heck are these nonsense posts from last night?


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

RUTGTE='"&sessi on("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.ne t). 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******** *****@TK2MSFTNG P11.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*****@dnartr eb.noraa> writing in
news:eF******** ******@TK2MSFTN GP10.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.ne t). 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
1299
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 recent version of python -python 2.3- with some other languages? M. Abdullah Khaidar -- http://khaidarmak.blogspot.com
2
4191
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 why it doesn't work? Thanks in advance Tjerk
3
2572
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, IT.itemid, IT.date,
1
1220
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 this? Regards, Steven
8
1380
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 can I fix this? Tks in advance... This is what I have: 'Set today's date
3
2593
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 example: Starting date: 02/15/2006 Ending date: March 2006 I have to make sure the starting date is before the ending date
2
7011
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 convert all the general date data into short date format, so i would like to delete the time part of the data, it is any way i can do that ???? Thank you in advance and sorry for my english carlos
8
2881
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 23:15 458 2006-12-29 00:15 01:30 459 2006-12-30 20:00 21:10
3
1214
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 >= '05/10/2007') ORDER BY Fecha DESC Doesn't return it. Why? Is not the same date?
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2879
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.