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

Whats wrong with my join statement?

The following sql statement is rejected by asp.net (working with sql
server). It says something is wrong near "TableFlights". But I don't
see anything wrong with it.
Any help is appreciated:

SELECT TableFlights.IdFlight, Concat = (TableFlights.OrganizerLastName
+ ', ' + TableFlights.OrganizerFirstName + ' Flt:' +
TableFlights.FlightNumber + ' on ' +
Convert(char(10,TableFlights.FlightDate,101)) FROM TableFlights INNER
JOIN TablePassengers ON TableFlights.IdFlight=TablePassengers.IdFlight
Where TablePassengers.Email = 'm*****@micro-net.com' Order By
TableFlights.OrganizerLastName, TableFlights.OrganizerFirstName

-- Marvin

Nov 2 '05 #1
1 1148
On 2 Nov 2005 14:01:52 -0800, COHENMARVIN wrote:
The following sql statement is rejected by asp.net (working with sql
server). It says something is wrong near "TableFlights". But I don't
see anything wrong with it.
Any help is appreciated:

SELECT TableFlights.IdFlight, Concat = (TableFlights.OrganizerLastName
+ ', ' + TableFlights.OrganizerFirstName + ' Flt:' +
TableFlights.FlightNumber + ' on ' +
Convert(char(10,TableFlights.FlightDate,101)) FROM TableFlights INNER
JOIN TablePassengers ON TableFlights.IdFlight=TablePassengers.IdFlight
Where TablePassengers.Email = 'm*****@micro-net.com' Order By
TableFlights.OrganizerLastName, TableFlights.OrganizerFirstName

-- Marvin


Hi Marvin,

You're missing one closing parenthesis.

==> char(10,TableFlights.

should be

==> char(10),TableFlights,

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
Nov 2 '05 #2

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

Similar topics

2
by: Jim | last post by:
Im getting way too many rows retured..what its trying to do is insert a 0 for revenue for months 7 - 12 (aka July through December) for each of these cost centers for each payor type..Im getting a...
2
by: Randell D. | last post by:
Before anyone cracks a quick joke... my question does not refer to same-sex marriage... I know how to create a join - correct me if I am wrong, but its something like the following: SELECT...
14
by: Ryan | last post by:
I want to do the following SQL statement in Access. However, it won't allow me to have the secondary part of my join statement and tells me that this is not supported. OK, so Access doesn't support...
2
by: Julio Allegue | last post by:
I am getting the wrong Count(*) on vb.net using the ExecuteScalar . It returns all the rows. It doesn't seem to look at the WHERE clause. At the same time, I am getting the correct count on "SQL...
3
by: Vaidas Gudas | last post by:
I has web project on virtual pc, maked with framework 2.0. there I was used the method role.roleexists("admin") and everything was worked good. but when i replace this project on my local machine,...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
5
by: hiqu | last post by:
This issue is driving me nuts and not able to figure out whats wrong. I've this code in my firefox extension. Firefox always hangs and reports the script is busy. if I introduce a break...
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
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.