Rabu, 21 November 2012

Re: [MS_AccessPros] MAKE TABLE QUERY INVOLVING UNION QUERY

 

Hi Mr Viescas

It is an honor receiving your feedback here in Brazil.
I agree with you about your warning. It is not safe using First Of...to catch data, but to reach my goal (rebuild a table that I received with inconsistent data) it worked fine.
So back to the merit of my issue, I tried to insert the INTO clause in different ways into my SQL code (appended below) but none of them worked.
Could you help me?

Nathan

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...> wrote:
>
> Candrope (name?)-
>
> What are you trying to do here? Why are you using a Totals query? Using
> First is totally unreliable - it fetches the "first" physical record that
> meets the criteria. You could certainly build a Make Table query using
> this as input, but not sure you'll get what you want.
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: candrope <candrope@...>
> Reply-To: <MS_Access_Professionals@yahoogroups.com>
> Date: Tuesday, November 20, 2012 9:03 PM
> To: <MS_Access_Professionals@yahoogroups.com>
> Subject: [MS_AccessPros] MAKE TABLE QUERY INVOLVING UNION QUERY
>
> Hello everybody
>
> I want to write an MS Access Make Table query in order to create a table
> called tblMyNewTable.
> This query will use records retrieved from another MS Access query
> described below.
> Is it possible? If so, how can I make it?
> Thanks in advance.
> ----------------------------------------------------------
> SELECT tblA.name, First(tblA.address) AS FirstAdd, First(tblA.city) AS
> FirstCity
> FROM tblA LEFT JOIN tblB ON tblA.NumInsc= tblB.NumInsc
> GROUP BY tblA.name
> HAVING tblA.name Is Not Null
> UNION SELECT "Unknown", Null, Null
> FROM tblA
> ORDER BY tblA.name;
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar