Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Pageview – Quick Report

Posted on October 14, 2013October 26, 2015 By David Kittell
SELECT (
		SELECT [projectname]
		FROM [tblRIMicroSite_Forms]
		WHERE CHARINDEX([tblRIMicroSite_Forms].[url], pv.[url]) > 0
		) AS Project
	,dbo.fnFormatDate([datetime], 'MM-DD-YYYY HH:NN AMPM', NULL) AS [DateTime]
	,[ipaddress] AS 'IP Address'
	,[ipint] AS 'IP Int'
	,[IPLocation] AS 'IP Location'
	,[mobile] AS 'Mobile'
	,(
		CASE
			WHEN (
					SELECT url
					FROM [tblRIMicroSite_Forms]
					WHERE CHARINDEX([tblRIMicroSite_Forms].[url], pv.[url]) > 0
					) IS NULL
				THEN pv.url
			ELSE (
					SELECT url
					FROM [tblRIMicroSite_Forms]
					WHERE CHARINDEX([tblRIMicroSite_Forms].[url], pv.[url]) > 0
					)
			END
		) AS URL
FROM [pageview] pv
ORDER BY [datetime]
SELECT projectname
	,submissiondate
	,firstname
	,initial
	,lastname
	,city
	,STATE
	,zipcode
	,phone
	,email
	,dob
	,interest
	,question
	,[mobile]
FROM tblRIMicroSite_Results
INNER JOIN tblRIMicroSite_Forms ON tblRIMicroSite_Results.form = tblRIMicroSite_Forms.id
LEFT OUTER JOIN pageview ON pageview.id = tblRIMicroSite_Results.pageview
WHERE form = 3
ORDER BY submissiondate
Originally Posted on October 14, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MSSQL

Post navigation

Previous post
Next post

Related Posts

LDAP LastLogonTimeStamp Conversion

Posted on April 8, 2014October 26, 2015

In working with LDAP timestamps I found this script very helpful to be able to test with. (Get-Date "2/1/2014").ToFileTime() [datetime]::FromFileTime("128752344000000000") Reference: http://jai-maharaj.blogspot.com/2012/01/test.html Originally Posted on April 8, 2014Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or…

Read More

UNIX Bash – Domain List Get Whois Info

Posted on August 25, 2016September 2, 2016

If you manage a list of domains it’s sometimes helpful to have a script like this to check the information from time to time. I plan to clean this up in time but for now this works. First create a text file like below that has domains in it google.com…

Read More

RedHat – WordPress Install

Posted on March 18, 2016March 6, 2017

These steps are based on RedHat Server 64-bit Download RedHat Install RedHat Configure RedHat Install WordPress Configure WordPress Backup/Restore MySQL Database Originally Posted on March 18, 2016Last Updated on March 6, 2017 All information on this site is shared with the intention to help. Before any source code or program…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes