ClipMate Support Forum

Support and User-to-User Discussions
It is currently Tue May 21, 2013 5:50 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: question about sql
PostPosted: Thu Jan 24, 2008 8:28 am 
Offline

Joined: Sun Jun 18, 2006 2:44 pm
Posts: 16
Hi Chris,

I have been trying to make a virtual collection called "Yesterday" with no luck :

select * from clip where
"#DATE#" - 1 <= Clip.TimeStamp AND Clip.TimeStamp <= "#DATE#"
and del = false order by ID;

For inspiration I had a look at this week and this month but to my surprise they have the same sql :

select * from clip where Clip.TimeStamp >= "#DATEMINUSLIMIT#" and del = false order by ID;
select * from clip where Clip.TimeStamp >= "#DATEMINUSLIMIT#" and del = false order by ID;

I don't understand how this can work. Can you put me in the right direction pls?

Kind Regards, Tom


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 24, 2008 10:46 am 
Offline
Site Admin
User avatar

Joined: Wed Jun 12, 2002 3:07 pm
Posts: 3402
Location: Spencerport, NY USA
The #DATEMINUSLIMIT# uses another field of the collection properties dialog - it's the "by age of clip - days" purging rule, which is hidden when you're viewing a SQL collection. I know, it sounds dumb... I wanted to recycle that field though.

Use the same SQL as the WEEK query. Now switch the collection properties to "normal" and the form will reveal the date limit. Change that, then switch the collection type back to "virtual". Now it should work.

_________________
I'm the ClipMate Guy!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 24, 2008 11:32 am 
Offline

Joined: Sun Jun 18, 2006 2:44 pm
Posts: 16
Hmz I only understand half of this.

Is there a picture/diagram with the SQL Schema and the "magic keywords" like #DATEMINUSLIMIT#

I don't think I can write a query to show only the clips of yesterday using your advice. I think I can write a query showing the last 2 days.
But what I want is *only* yesterday. Does that make sense?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 24, 2008 12:37 pm 
Offline
Site Admin
User avatar

Joined: Wed Jun 12, 2002 3:07 pm
Posts: 3402
Location: Spencerport, NY USA
http://www.thornsoft.com/dist/techsupport/db/db70.gif

Date Substitutions:

#DATELASTIMPORT#
#DATELASTEXPORT#
#DATE#
#DATEMINUSLIMIT#

"Limit" is the coll.retentionlimit

_________________
I'm the ClipMate Guy!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 24, 2008 5:44 pm 
Offline

Joined: Sun Jun 18, 2006 2:44 pm
Posts: 16
Thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group