473,385 Members | 2,028 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,385 software developers and data experts.

clarification about query

strSQL1 = "SELECT NAME,LDATE, OT,OTWAGES"

strSQL1 = strSQL1 & " FROM Empolyee WHERE "

strSQL1 = strSQL1 & " LDATE BETWEEN #" & Text1.Text & "# AND #"

strSQL1 = strS QL1 & Text2.Text & "# ORDER BY LDATE"

In this Empolyee table

Name ot ldate otwages

Alex 2 1/1/2006 10

Alex 4 7/1/2006 34


Herewith I tried the above coding,the result displayed as

Name ot otwages

Alex 2 10

Alex 4 34

, in the name of alex….i want to sum the field ot & towages

I want the result as

Name ot otwages

Alex 6 44

when i tried using SUM(field name) GROUP BY NAME

it showing "sytax error in string query expression"

can anyone suggest pls
Sep 14 '06 #1
2 1110
sashi
1,754 Expert 1GB
Hi there,

Instead on using the "GROUP BY NAME", try using, "WHERE NAME LIKE 'Alex'. Good luck & take care my fren.. :)

strSQL1 = "SELECT NAME,LDATE, OT,OTWAGES"

strSQL1 = strSQL1 & " FROM Empolyee WHERE "

strSQL1 = strSQL1 & " LDATE BETWEEN #" & Text1.Text & "# AND #"

strSQL1 = strS QL1 & Text2.Text & "# ORDER BY LDATE"

In this Empolyee table

Name ot ldate otwages

Alex 2 1/1/2006 10

Alex 4 7/1/2006 34


Herewith I tried the above coding,the result displayed as

Name ot otwages

Alex 2 10

Alex 4 34

, in the name of alex….i want to sum the field ot & towages

I want the result as

Name ot otwages

Alex 6 44

when i tried using SUM(field name) GROUP BY NAME

it showing "sytax error in string query expression"

can anyone suggest pls
Sep 14 '06 #2
Hi sashi
it must b dynamic(monthly report of overall empolyees)......thats y i used "GROUP BY NAME",while i'm implement in data report ...it showing "the field is NOT A PART OF AGGREGATE FUNCTION"
or showing "the field is not found"
Sep 15 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wes | last post by:
I am trying to secure different files, mostly pdf, so only the person suppose to see the file that was designed for that individual can see it. I am using sessions to secure the actual web pages,...
2
by: Elliot Rodriguez | last post by:
As I continue to read more about the benefits of database querying using ADO.NET, I am having a more difficult time distinguishing what the best approach to data retrieval is anymore. When...
15
by: deko | last post by:
With all due respect to Stan Leszynski and Greg Reddick, I'm still wondering how to name controls on forms in my Access MDB. Correct me if I'm wrong... If a textbox or other control on a form...
1
by: marina madeleine | last post by:
Could some clarify for me - I thought the scripting language for Access was SQL and that to script in Access one would need to learn SQL. Why then is the Access database under visual basic? What...
4
by: chanchito_cojones | last post by:
Hi there, I was searching the net for some guidance in putting together a query that would select random records from the main table. I came across this and it works like a charm. SELECT TOP...
8
by: Sai Kit Tong | last post by:
In the article, the description for "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports or Managed Entry Points" suggests the creation of the class ManagedWrapper. If I...
1
by: tom | last post by:
Is it possible to have a report with prompts/parameters, but without an underlying query? I've seen varying posts related to this, but I'm not seeing a concete answer. As I understand it, to make a...
1
by: luxmanpai | last post by:
Hello All, I have an performance issue, where a query which is executed at the client place which is retrieving 370 records is taking around 10 minutes, Where as the same query which is executed...
2
by: ravir | last post by:
Hi, I am new to this group. I am working in Perl and shellscripts. I have a clarification regarding perl grep and pattern matching. I am writing a perl script to automate the process of code...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.