Welcome Guest.   Make a donation to an author on the site October 22, 2014, 10:06:50 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: sql statements help?  (Read 1782 times)
RashidMalik
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« on: August 02, 2012, 11:26:07 AM »

I am trying to create a virtual folder that would contain all the merged clips. I found that virtual folders can be programmed using sql statements. SQL statements are mentioned in the help file but not explained. Where can I get the detailed explanation of those sql statements?
Logged
mouser
First Author
Administrator
*****
Posts: 33,578



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 02, 2012, 08:50:29 PM »

Hi Rashid, welcome to the site, and welcome to an advanced feature that not many people use.

And your question is a great one -- it's a perfect case where a virtual group might be useful.

These threads might be the best place to start in general about virtual groups and sql:

And I really need to post a list of field clip variable names you have access to.

But for your specific question, here's an answer:

When you merge clips, CHS names the new clip with a title like "Merged clips (4)".

So we create a new group like so:


The key is the sql:
Formatted for SQL with the GeSHI Syntax Highlighter [copy or print]
  1. (Title LIKE '%Merged clips%')

Actually it would be a little more efficient to make the sql:
Formatted for SQL with the GeSHI Syntax Highlighter [copy or print]
  1. (Title LIKE 'Merged clips%')

Because we know the clip title will START with the word "Merged" so we dont need the wildcard % at the front.
Logged
IainB
Supporting Member
**
Posts: 4,790


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: August 02, 2012, 09:57:10 PM »

And I really need to post a list of field clip variable names you have access to.
^ Yes, please!
Logged
RashidMalik
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #3 on: August 03, 2012, 03:15:53 AM »

Huge amount of thanks mouser!
Your query did the job and thus has now made me hungry for learning/understanding the programmability (is this the right word) of the virtual folders. So after the reply I am going to visit the the two links you have, so kindly, provided. Are there other places (in CHS) where we can use them (SQL and variables) as well?
Logged
mouser
First Author
Administrator
*****
Posts: 33,578



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: August 03, 2012, 04:35:37 AM »

I see I actually do provide a list of fields in the Advanced Features->Virtual Folders page of help, which in online here:
http://www.donationcoder..../help/virtual_folders.htm

Fields available for sql statements:
•   Index
•   UserKeywords
•   ClipType
•   ParentId
•   ParentGroup
•   OtherGroups
•   Application
•   Title
•   Description
•   ImageIndex
•   ExcerptText
•   ClipText
•   CreationDateTime
•   ModificationDateTime
•   ViewDateTime
•   MarkDateTime
•   DueDateTime
•   IsFavorite
•   UserFlag
•   UserCheckbox
•   UserRating
•   Protected

Quote
Are there other places (in CHS) where we can use them (SQL and variables) as well?

Nope, but I'm open to suggestions.
Logged
IainB
Supporting Member
**
Posts: 4,790


Slartibartfarst

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: August 03, 2012, 08:19:07 AM »


I see I actually do provide a list of fields in the Advanced Features->Virtual Folders page of help, which in online here:
http://www.donationcoder..../help/virtual_folders.htm
...
Oh. I already had those 22...
I was kinda hoping that you might have been about to enable a one-to-one relationship with the ID Fields, maybe?  (hint, hint)     smiley

Logged
RashidMalik
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #6 on: August 05, 2012, 06:32:51 AM »

How do you write a query to filter results by dates?
For example, suppose I want to find clips older than, say 60 days?
OR
Clips that were taken between two dates?
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.035s | Server load: 0.18 ]