Showing posts with label word. Show all posts
Showing posts with label word. Show all posts

Monday, March 19, 2012

Microsoft Access Query converted to SQL

Here a query Microsoft Access Query That I would like to convert to SQL. What replace the Word "Last" in SQL

SELECT Contacts.FirstName,Last(Contacts.LastName) AS LastofLastName
FROM Contacts
GROUP BY Contacts.FirstName;

You can try a ORDER BY on lastname column with TOP 1 or Max(LastName).

SELECT Contacts.FirstName,Max(Contacts.LastName) AS LastofLastName
FROM Contacts
GROUP BY Contacts.FirstName

Or

SELECT TOP (1) Contacts.FirstName, Contacts.LastName AS LastofLastName
FROM Contacts
ORDER BY Contacts.LastName DESC

|||Thanks. It works fine on both.

Wednesday, March 7, 2012

Metadata Definition ?

Hello, i would like to know if it's possible to generate automatically a word document or an excel document that will contain all the metadata definition, for example containing the source columns names, their datatype, and the destination with their datatypes, so that it would easy to create a data dictionnary .

Thank you in advance.

Microsoft have talked about a tool called "SQL Dcoumenter" that will do this. No news about when it will be released though.

-Jamie

|||Thank you for your answer, i will do that manually.