Showing posts with label tablename. Show all posts
Showing posts with label tablename. Show all posts

Thursday, March 22, 2012

Access accessing SQL {}

Im using Access to access a SQL database. For one of the queries i see the following under column:

{ fn month(dbo.TableName.Date) }

Ive never used this structure before but im confused to what it is? Can anyone explain please?

Thanks

The curly braces and 'fn' server to denote a OBDC level function.

The T-SQL equilivent would be:

month( YourDateColumn )

|||

Hello

Thanks for that. Could you explain a bit more on that please? As far as im concerned i didnt think there would be an ODBC link as it was connecting straight to a SQL database (checking ODBC theres no link to a SQL database either). Maybe an example if you can on what this user could have been trying to achieve would be great?

Thanks

Saturday, February 25, 2012

about SQL update

Hi i have a problem recently about updating. Let's say i have table

TableName

Name TestBoolean

Ian 1

Shane 1

Ianne 0

Jong 0

How can i update the testboolean where the 1 must be 0 and 0 must be 1... in one statement only

Regards

update tablename set Testboolean = case when Testboolean = 0 then 1 else 0 end

Good luck