Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Convert sql from access to sql server 2005 standar

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2010-06-28 : 12:10:47
Hi,

Please help to convert the below select statement; Thanks

SELECT tblProjectPractices.PracticeEID, Format([tblProjectPractices].[PracticeGPID],"000000") AS GPID,
tblODSPractices.MainContact, tblProjectPractices.nAg AS x FROM tblProjectPractices INNER JOIN tblODSPractices ON
tblProjectPractices.PracticeEID = tblODSPractices.PracticeEID WHERE (((tblProjectPractices.PracticeGPID)
Like [forms]![frmReturns]![txtGPID] & "*")
AND ((tblProjectPractices.ProjectID)=[forms]![frmReturns]![txtProject]))
ORDER BY Format([tblProjectPractices].[PracticeGPID],"000000");

X002548
Not Just a Number

15586 Posts

Posted - 2010-06-28 : 12:56:20
You know you ar ereferencing a field on a form?

It doesn't work that way, unless you're using a sproc and passing in a parameter



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -