Board index » delphi » SQL Problems HELP!!!

SQL Problems HELP!!!

Does anyone Know Why this SQL Statement Doesn't Work

Select * From Customers Where Name = :Var1;

Please Help!

 

Re:SQL Problems HELP!!!


Quote
Andrew McFadden (andre...@ix.netcom.com) wrote:

: Does anyone Know Why this SQL Statement Doesn't Work

: Select * From Customers Where Name = :Var1;

At a glance I would say it should work unless either the customers table or
the name column don't exist. Or maybe is the variable not of the proper type
or filled.
Need more details, such as the piece of code where you are using it and the
error message.

Did you try to run the select in WISQL???

Good Luck,

Jan
--
J.K. Pieters
j...@cti.wnc.nedlloyd.nl
private: trip...@worldonline.nl

Re:SQL Problems HELP!!!


Quote
On Mon, 6 May 1996, Andrew McFadden wrote:
> Does anyone Know Why this SQL Statement Doesn't Work

> Select * From Customers Where Name = :Var1;

> Please Help!

Check if the Name part has a good syntax...and you didn't say if it
doesn-t work AT ALL and gives error or it doesn't work the way you want

Vladi!

" I hear, I forget,
  I see, I remember,
  I do, I understand "

Re:SQL Problems HELP!!!


Quote
Andrew McFadden wrote:

> Does anyone Know Why this SQL Statement Doesn't Work

> Select * From Customers Where Name = :Var1;

> Please Help!

Is it possible that 'Name' is a reserved word in SQL.  They changing the column
name and see if that works.

David W. Streever
Senior Consultant
JLS Software Services

Re:SQL Problems HELP!!!


Quote
>Does anyone Know Why this SQL Statement Doesn't Work

>Select * From Customers Where Name = :Var1;

        I think name might be a reserved word. It would help if you gave us the error
you were getting.

        If it is reserved, alias the table, fully qualify the field, and surround it in
quotes.

_
******************************************************************
NOTE: This software is currently in early alpha. If you notice any
problems, or RFC non-compliance, please report it to p...@pobox.com
-Please do not report duplicates, as this is usually a manual resend
-Still working on the references problem......It WILL get fixed
+------------------------------------------------------------+
|Chad Z. Hower  -  phoe...@pobox.com                         |
|Phoenix Business Enterprises - p...@pobox.com - www.pbe.com  |
|Physically in Church Hill, TN - Logically Not Sure          |
+------------------------------------------------------------+

Quote
>>SQUID - The ultimate 95/NT offline databasing reader

**Special Compile: 3.000A (Alpha)

Re:SQL Problems HELP!!!


In article <318DFEBF.3...@ix.netcom.com>, andre...@ix.netcom.com says...

Quote

>Does anyone Know Why this SQL Statement Doesn't Work

>Select * From Customers Where Name = :Var1;

What kind of table are you using?  Paradox, Access, Ms SQL server??  A little
more info please!!

Kelly
kgr...@acxiom.com

Re:SQL Problems HELP!!!


Quote
Andrew McFadden wrote:

> Does anyone Know Why this SQL Statement Doesn't Work

> Select * From Customers Where Name = :Var1;

> Please Help!

   I think the SQL statement seems to be okay, and Name is not a
reserved word - I know that, because I use it myself. But are you
sure that you have actually passed a value to the Var1 parameter?

Another thought: if the line you quote above is a simplification of
the actual problem, do you perhaps have two tables, each with a Name
field? In that case, try writing Customers.Name instead of Name.

  Peter

Other Threads