Solved

query and display compressed data?

Posted on 2012-04-01
3
272 Views
Last Modified: 2012-04-05
i have a table in a sql server 2008 server that has compressed data in several columns

how do i query and view/display that data?

for instance,

select orderno, shipdate, otherdata from orders
where shipdate > '20111231'

the orderno and shipdate are not compressed and display fine.....  the data in the otherdata column is compressed and  either doesnt display at all (mgmt studio), or displays 'junk' characters (in some other query tools)
0
Comment
Question by:jimwarrenus
3 Comments
 
LVL 25

Assisted Solution

by:jogos
jogos earned 250 total points
ID: 37793738
Is it compressed by SQL Server?

Can you post the table definition.
0
 
LVL 15

Accepted Solution

by:
deepakChauhan earned 250 total points
ID: 37793801
Hi Dear...

            please check select permission on this table it may be possible u dont have permission on 'otherdata column of this table.
                I don't think data compression is the reason of doesn't showing 'otherdata' column as i understand data compression can be two type row level or page level if two column is showing from this table which is also part of complete row and if we are talking about page level then page is also stored data in row format.

you can test this with (select * from order) if you dont have full select permission then query will through an error....
0
 

Author Closing Comment

by:jimwarrenus
ID: 37812982
i finally heard from the developer and turns out they also refer to it as "packed"....<br />this solved the problem:<br /><br />SELECT CAST(CAST(SUBSTRING(BIGDAT<wbr />A,1,4)AS VARBINARY) AS BIGINT)<br />FROM PROCESSING
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now