OHPUG 2013 – SQL to Find More About a Transaction

declare @transactionid int = 4
declare @data table ( subtype varchar(max), value varchar(max) )

insert into @data
values (‘Header Data’, ”), (‘———-‘, ‘———-‘)
insert into @data
SELECT Field, Value
FROM
(
SELECT convert(varchar(max), o.DisplayName) as Organization,
convert(varchar(max), w.computername) as Workstation,
convert(varchar(max), pu.Name) as PolarisUser,
convert(varchar(max), th.TransactionDate, 20) as TransactionDate,
convert(varchar(max), tt.TransactionTypeDescription) as TransactionType
FROM PolarisTransactions.polaris.TransactionHeaders th
join polaris.polaris.organizations o on th.OrganizationID = o.OrganizationID
join polaris.polaris.Workstations w on th.WorkstationID = w.WorkstationID
join polaris.polaris.PolarisUsers pu on th.PolarisUserID = pu.PolarisUserID
join PolarisTransactions.polaris.TransactionTypes tt on th.TransactionTypeID = tt.TransactionTypeID
where TransactionID = @transactionid
) Main
UNPIVOT
(
Value FOR Field IN ( Organization, Workstation, PolarisUser, TransactionDate, TransactionType )
) Sub

insert into @data values ( ”,” ), ( ‘Transaction Details’, ” ), (‘———-‘, ‘———-‘)
insert into @data
select tst.TransactionSubTypeDescription,
case
when tst.DataType = ‘N’ then convert(varchar(max), td.numvalue)
when tst.DataType = ‘D’ then convert(varchar(10), td.dateValue, 20)
when tst.DataType = ‘T’ then ( select tds.TransactionString from PolarisTransactions.polaris.TransactionDetailStrings tds where tds.TransactionStringID = td.numValue )
when tst.DataType = ‘K’ then
(
select coalesce((select tstc.TransactionSubTypeCodeDesc from PolarisTransactions.polaris.TransactionSubTypeCodes tstc where tstc.TransactionSubTypeID = td.transactionsubtypeid and tstc.TransactionSubTypeCode = td.numvalue), convert(varchar(max), td.numvalue) )
)
else convert(varchar(max), td.numValue)
end
from PolarisTransactions.polaris.TransactionDetails td
join PolarisTransactions.polaris.TransactionSubTypes tst on
td.TransactionSubTypeID = tst.TransactionSubTypeID
where td.TransactionID = @transactionid
select * from @data

Join Us for OHPUG13 on August 23rd

It’s time for OHPUG13!

Join us for round table sessions, informative presentations on upcoming Polaris releases and opportunities to visit with your fellow Polaris users! 

“I received quite a few new ideas to implement. I thought it was a great conference.”
2012 OHPUG attendee

Our Agenda for the Friday, August 23, 2013 OHPUG Conference is as follows:

9:00-10:00 Registration/Check In
10:05-11:00 Polaris: What’s New in 4.1r2
11:00-11:15 Break
11:15-11:45 Round Table Option 1
11:45-12:15 Round Table Option 2
12:15-1:00 Lunch & Networking with Colleagues
1:00-1:45 Polaris Reporting Options
1:45-2:00 Break
2:00-2:45 Envisionware Products and Solutions That Integrate with Polaris
2:45-3:30 Polaris: Upcoming Release Information

ROUND TABLE DISCUSSION TOPICS – choose 2 of 4, each to last 30 minutes

[ ] I.T. Open Table -Polaris Client, Envisionware & Windows 7/8
[ ] PAC Customization options – what’s been tweaked at your library?
[ ] Tech Services Open Table – ACQ, Serials, Cataloguing open session
[ ] ePayments – discussion about PayPal, Smart Money Manager and other eCommerce payment options

If you need a hotel:

Drury Inn: A block of rooms have been reserved for the evening of Thursday, August 22 at the Drury Inn at a cost of $104.95 per night. The rooms feature two queen beds. The hotel offers a FREE hot-appetizer happy hour from 5:30-7PM and continental breakfast. The room block will be available until August 9, 2013. Please tell them you’re registering for the OHPUG block. Online reservations can be made here:
http://www.druryhotels.com/Reservations.aspx?groupno=2188167

Drury Inn, 88 E Nationwide Blvd., Columbus, OH 43215, 1-800-325-0720
Rates guaranteed through AUGUST 9, 2013.

Cost: $20 per person.

This fee covers the cost of breakfast, lunch, door prizes and assorted copy fees. An invoice will be sent to your library if registration is received before August 16, 2013. Any registration made after August 16, 2013 will be available at the registration desk. Checks should be made payable to the Central Library Consortium c/o the Grandview Heights Public Library.

Location: State Library of Ohio

Register for OHPUG HERE