[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Display blob field with aggregate function?

Posted on 2011-10-26
3
Medium Priority
?
717 Views
Last Modified: 2013-12-24
Hi All,

I need to create a query that will display the last the time a file was sent, as well as the header info. The header info is stored in a blob data type, that basically represents a XML file. I can see the blob data without any issues, until I add the aggregate function which I need. Is there a work around for this?

I get the error mesage saying 'blog data type are not allowed in Group clause'.


SELECT  f.name, MAX(f.starttime) senddate, df. blogInfo
    FROM datafile f, datafileDetail df
     WHERE (df.id = f.id)
  GROUP BY f.name, df. blogInfo

Thanks!
0
Comment
Question by:mlong219
2 Comments
 
LVL 13

Accepted Solution

by:
p_nuts earned 2000 total points
ID: 37034762
You could get max of the blob but you cant group on it. Or use a sub query
select t1.*,
(select bloginfo from filedetail where id = t1.id) as info from (
SELECT f.id, f.name, MAX(f.starttime) senddate
    FROM datafile f
     WHERE (df.id = f.id)
  GROUP BY f.id, f.name) as t1
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 37218436
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

825 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