Senin, 03 Juli 2017

Re: [MS_AccessPros] concatenating multiple records

 

Try changing it to:


TRANSFORM IIf(Count([Scene Name - Split 1])=0,"","True") AS [Value]
SELECT Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
FROM Hourly_Top_Scenes_data
GROUP BY Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
PIVOT Hourly_Top_Scenes_data.[Scene Name - Split 1];

If that still doesn't work, do:

TRANSFORM Count([Scene Name - Split 1]) AS [Value]
SELECT Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
FROM Hourly_Top_Scenes_data
GROUP BY Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
PIVOT Hourly_Top_Scenes_data.[Scene Name - Split 1];

.. and tell me what you see.  You should see the value 0 for scene names that had no hit on a particular date.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jul 4, 2017, at 12:31 AM, mrmarmite_2000@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Thanks. I think I followed your suggestion, resulted in SQL of:

TRANSFORM IIf(Count([Name])=0,"","True") AS [Value]
SELECT Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
FROM Hourly_Top_Scenes_data
GROUP BY Hourly_Top_Scenes_data.Name, Hourly_Top_Scenes_data.[Calendar Date]
PIVOT Hourly_Top_Scenes_data.[Scene Name - Split 1];

Yet it's not working. All values return as "True"

What did I do wrong? 


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar