Hi,
I want to know what would be the syntax of a fetch query when using PostgreSqlDirect.Net. Following is what in Sql Server when using OleDb
SELECT
a4.CustomerID CustomerID, a4.CompanyName CompanyName,
a4.ContactName ContactName, a4.ContactTitle ContactTitle,
a4.Address Address, a4.City City,
a4.Region Attrib_Region, a4.PostalCode PostalCode,
a4.Country Country, a4.Phone Phone,
a4.Fax Fax
FROM
dbo.Customers a4
WHERE
a4.CustomerID = ?
What would be in PostgreSql.Net?
Thanks
Sql syntax
In PostgreSQLDirect .NET your statement should look like this:
For more information please read PostgreSQL Documentation.
Code: Select all
SELECT
a4.CustomerID as CustomerID, a4.CompanyName as CompanyName,
a4.ContactName as ContactName, a4.ContactTitle as ContactTitle,
a4.Address as Address, a4.City as City,
a4.Region as Attrib_Region, a4.PostalCode as PostalCode,
a4.Country as Country, a4.Phone as Phone,
a4.Fax as Fax
FROM
dbo.Customers a4
WHERE
a4.CustomerID = ?
It didn't work.
But it does work when i use quotes like
Am i doing something wrong.
I really don't want to use quotes.
Thanks
But it does work when i use quotes like
Code: Select all
SELECT
"a4"."CustomerID" as CustomerID, "a4"."CompanyName" as CompanyName,
"a4"."ContactName" as ContactName, "a4"."ContactTitle" as ContactTitle,
"a4"."Address" as Address, "a4"."City" as City,
"a4"."Region" as Attrib_Region, "a4"."PostalCode" as PostalCode,
"a4"."Country" as Country, "a4"."Phone" as Phone,
"a4"."Fax" as Fax
FROM
"dbo"."Customers" a4
WHERE
"a4"."CustomerID" = ?
I really don't want to use quotes.
Thanks