Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2004, 02:21 PM
Authorized User
 
Join Date: Jul 2004
Location: St. John\'s, NL, Canada.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Query String

Can anyone tell me what's wrong with this SQL query string?

 strSQL = "SELECT Recruitment.RecruitID, Recruitment.FirstName, Recruitment.Initial, Recruitment.LastName, Recruitment.AddressLine01,"
        strSQL = strSQL & "Recruitment.AddressLine02, Recruitment.AddressLine03, Recruitment.City, City.City, Recruitment.ProvState,"
        strSQL = strSQL & "Province_State.Province_State, Recruitment.PostalZIP, Recruitment.PrimaryTelephone, Recruitment.AlternateTelephone,"
        strSQL = strSQL & "Recruitment.EmailAddress, Recruitment.DOB, Recruitment.IncomeLevel, Recruitment.IncomeDate, Recruitment.Occupation,"
        strSQL = strSQL & "Occupation.Occupation, Recruitment.FocusGroupNum, Recruitment.FocusGroupDate, Recruitment.Notes,"
        strSQL = strSQL & "Recruitment.LDEdit, Recruitment.LUEdit, User.Username"
        strSQL = strSQL & "FROM [User] INNER JOIN (Province_State INNER JOIN (Occupation INNER JOIN (City INNER JOIN Recruitment ON City.ID = Recruitment.City)"
        strSQL = strSQL & "ON Occupation.ID = Recruitment.Occupation) ON Province_State.ID = Recruitment.ProvState) ON User.UserID = Recruitment.LUEdit"
        strSQL = strSQL & "WHERE RecruitID = " & ID & ";"

I keep getting the following error:

Syntax error (missing operator) in query expression 'User.UsernameFROM [User] INNER JOIN (Province_State INNER JOIN (Occupation INNER JOIN (City INNER JOIN Recruitment ON City.ID = Recruitment.City)ON Occupation.ID = Recruitment.Occupation) ON Province_State.ID = Recruitment.ProvState) ON User.UserID = Recr'.

Thanks,
Mark


  #2 (permalink)  
Old September 22nd, 2004, 02:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Add a space at the end of this line:
strSQL = strSQL & "Recruitment.LDEdit, Recruitment.LUEdit, User.Usernamespace_here"

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
Populate Array with SQL query string nicoleh Classic ASP Databases 3 July 6th, 2005 02:55 PM
Query String Baby_programmer ASP.NET 1.0 and 1.1 Basics 3 December 24th, 2004 11:14 AM
Query String Nitin_sharma VBScript 1 December 16th, 2004 07:58 AM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM



All times are GMT -4. The time now is 09:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.