Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Outer Join problem
I know this is not an Access group, but there doesn't seem to be one,
and I'm guessing MS SQLs are all quite similar - at least in relatively
simple cases like this one.

I'm using this SQL statement,

"SELECT [Cape Town 25/04].IDNUMBER, [Cape Town 25/04].SURNAME,
[Cape Town 25/04].NAMES, Misc.PHONE_NUMBER,
Misc.VOTE                           FROM [Cape Town 25/04] LEFT JOIN Mis
c
ON [Cape Town 25/04].IDNUMBER = Misc.IDNUMBER
WHERE STREETNAME='FIRTH ROAD' AND STREETNO='3FI' AND BLDNGNAME IS NULL
AND BLDNGNO IS NULL"

and getting this error message: "[Microsoft][ODBC Microsoft Access
Driver] Too few parameters. Expected 2. in EXEC"

Where is the missing parameter? I think it's something to do with the
LEFT JOIN, but I'm not sure - I'm a SQL newbie.

I'm accessing an MS Access database from Python via the PythonWin obdc
interface, if it makes a difference.

--Max

Report this thread to moderator Post Follow-up to this message
Old Post
Max
01-24-06 06:23 PM


Re: Outer Join problem
On Tue, 24 Jan 2006 20:13:49 +0200, Max <rabkin@mweb[DOT]co[DOT]za>
wrote:

>I know this is not an Access group, but there doesn't seem to be one,

Hi Max,

There's comp.databases.ms-access. And over 20 groups in the
microsoft.public.access hierarchy. There are also access groups in many
international hierarchies, or in international sub-hierarchies of the
microsoft.public hierarchy.

>and I'm guessing MS SQLs are all quite similar - at least in relatively
>simple cases like this one.

Don't count on it - there are many major differences between Jet SQL
(used in Access) and Trasact SQL (used in SQL Server). T-SQL tends to be
a lot closer to the ANSI-defined SQL standards.

>
>I'm using this SQL statement,
>
>"SELECT [Cape Town 25/04].IDNUMBER, [Cape Town 25/04].SURNAME,
>                     [Cape Town 25/04].NAMES, Misc.PHONE_NUMBER,
>Misc.VOTE                           FROM [Cape Town 25/04] LEFT JOIN Mi
sc
>ON [Cape Town 25/04].IDNUMBER = Misc.IDNUMBER
>WHERE STREETNAME='FIRTH ROAD' AND STREETNO='3FI' AND BLDNGNAME IS NULL
>AND BLDNGNO IS NULL"
>
>and getting this error message: "[Microsoft][ODBC Microsoft Access
>Driver] Too few parameters. Expected 2. in EXEC"
>
>Where is the missing parameter? I think it's something to do with the
>LEFT JOIN, but I'm not sure - I'm a SQL newbie.

According to the error message, two parameters where expected in EXEC.
The code you posted does not contain the word "EXEC". Maybe you should
double-check if the error is not produced by another part of your code?

Anyway, the query you posted passes the syntax check of SQL Server 2000
without problems.

>
>I'm accessing an MS Access database from Python via the PythonWin obdc
>interface, if it makes a difference.
>
>--Max


--
Hugo Kornelis, SQL Server MVP

Report this thread to moderator Post Follow-up to this message
Old Post
Hugo Kornelis
01-25-06 01:24 AM


Re: Outer Join problem
Hugo Kornelis  wrote:
> There's comp.databases.ms-access. And over 20 groups in the
> microsoft.public.access hierarchy. There are also access groups in many
> international hierarchies, or in international sub-hierarchies of the
> microsoft.public hierarchy.

Thank you. Sorry my ISP seems not to offer them.

> Don't count on it - there are many major differences between Jet SQL
> (used in Access) and Trasact SQL (used in SQL Server). T-SQL tends to be
> a lot closer to the ANSI-defined SQL standards.
>

Good to know.
 
>
> According to the error message, two parameters where expected in EXEC.
> The code you posted does not contain the word "EXEC". Maybe you should
> double-check if the error is not produced by another part of your code?

Nope, all my error messages end with a period and "in EXEC". I'm pretty
sure it's that line - although I'm getting the same problem elsewhere

> Anyway, the query you posted passes the syntax check of SQL Server 2000
> without problems.
>

Thanks for checking.

> --
> Hugo Kornelis, SQL Server MVP

--Max


Report this thread to moderator Post Follow-up to this message
Old Post
rabkin@mweb.co.za
01-25-06 08:27 AM


Re: Outer Join problem
I'd check the spelling of the column names as this is often where
Access throws this sort of error. If you spelt something wrong, it may
give this error thinking that you are going to pass a parameter into
the query. SQL would show something different (and probably more close
to the actual error).

BTW, have a look at the table naming you use as it's terrible.

Ryan


Report this thread to moderator Post Follow-up to this message
Old Post
Ryan
01-25-06 08:27 AM


Re: Outer Join problem
The slashes in the table name might be causing you grief.


Max  wrote:
>"SELECT [Cape Town 25/04].IDNUMBER, [Cape Town 25/04].SURNAME,
>                      [Cape Town 25/04].NAMES, Misc.PHONE_NUMBER,


Report this thread to moderator Post Follow-up to this message
Old Post
Doug
01-26-06 09:57 PM


Re: Outer Join problem
On 24 Jan 2006 23:32:21 -0800, rabkin@mweb.co.za wrote:

>Hugo Kornelis wrote: 
>
>Thank you. Sorry my ISP seems not to offer them.

Hi Max,

If you need help from an Access group often, consider switching ISP or
buying a pay server subscription. For a one-time issue, you could use
Google groups.

http://groups.google.com/group/comp...ms-access/about

--
Hugo Kornelis, SQL Server MVP

Report this thread to moderator Post Follow-up to this message
Old Post
Hugo Kornelis
01-26-06 09:57 PM


Re: Outer Join problem
(rabkin@mweb.co.za)  writes:
> Hugo Kornelis wrote: 
>
> Thank you. Sorry my ISP seems not to offer them.

You can access Microsoft's newsgroups at msnews.microsoft.com.

> Nope, all my error messages end with a period and "in EXEC". I'm pretty
> sure it's that line - although I'm getting the same problem elsewhere

My news provider has had a hiatus, so I have seen all of the thread, but
did you ever post the full error message. Is it possible that the message
comes from Python? (I know neither Python nor Access.)


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
01-26-06 09:57 PM


Re: Outer Join problem
On Wed, 25 Jan 2006 22:51:23 +0000 (UTC), Erland Sommarskog wrote:

 (snip) 
>
>My news provider has had a hiatus, so I have seen all of the thread, but
>did you ever post the full error message. Is it possible that the message
>comes from Python? (I know neither Python nor Access.)

Hi Erland,

Max did, in his first post. Here's what he posted:

>I know this is not an Access group, but there doesn't seem to be one,
>and I'm guessing MS SQLs are all quite similar - at least in relatively
>simple cases like this one.
>
>I'm using this SQL statement,
>
>"SELECT [Cape Town 25/04].IDNUMBER, [Cape Town 25/04].SURNAME,
>                     [Cape Town 25/04].NAMES, Misc.PHONE_NUMBER,
>Misc.VOTE                           FROM [Cape Town 25/04] LEFT JOIN Mi
sc
>ON [Cape Town 25/04].IDNUMBER = Misc.IDNUMBER
>WHERE STREETNAME='FIRTH ROAD' AND STREETNO='3FI' AND BLDNGNAME IS NULL
>AND BLDNGNO IS NULL"
>
>and getting this error message: "[Microsoft][ODBC Microsoft Access
>Driver] Too few parameters. Expected 2. in EXEC"
>
>Where is the missing parameter? I think it's something to do with the
>LEFT JOIN, but I'm not sure - I'm a SQL newbie.
>
>I'm accessing an MS Access database from Python via the PythonWin obdc
>interface, if it makes a difference.
>
>--Max


--
Hugo Kornelis, SQL Server MVP

Report this thread to moderator Post Follow-up to this message
Old Post
Hugo Kornelis
01-26-06 09:57 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:09 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006