Welcome, Guest

Use SQL functions in Free Form Conditions
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Use SQL functions in Free Form Conditions

Use SQL functions in Free Form Conditions 8 months, 1 week ago #2184

  • wwwclaes
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Karma: 0
Hi, is it possible to somehow use SQL functions (such as POW) in Free Form Conditions?

Thanks,
Claes
Claes

Re: Use SQL functions in Free Form Conditions 8 months, 1 week ago #2185

  • admin
  • OFFLINE
  • Administrator
  • Posts: 178
  • Karma: 6
Class,

You can use SQL expressions in the advanced screener or when building advanced variables. However, the basic screener and free form conditions do not accept SQL formulas.

Re: Use SQL functions in Free Form Conditions 8 months, 1 week ago #2186

  • wwwclaes
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Karma: 0
That's a quick reply

Yes, as I thought then. Using Advanced Variables unfortunately adds the "copy-paste-effect" which makes it a bit hard to maintain. It would be really neat if Advanced Variables just pointed to included variable references as Simple Variables and Free Form Conditions do, but I guess that would mean a major rewrite.

Anyhow, thanks for quick support and a really great tool!
Claes

Re: Use SQL functions in Free Form Conditions 2 months, 3 weeks ago #2358

  • Evergreen
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
This sounds like a powerful feature! But I am not sure how I would go about this. Could you give us an example of a sample sql free form condition so that I can build on it?
Chaim

Re: Use SQL functions in Free Form Conditions 2 months, 3 weeks ago #2359

  • admin
  • OFFLINE
  • Administrator
  • Posts: 178
  • Karma: 6
Most screens can be done in the basic screener, using Free Form Conditions. It is not recommended that users unfamiliar with SQL use the advanced screener.

A sample Free Form Condition is:

Total Current Assets(I) - Total Liabilities(I) > Market capitalization

This looks for companies with most recent total current assets less total liabilities greater than market cap. If you then click over to the Advanced Screener, it will convert your free form condition to the equivalent advanced syntax:

(((totalcurrentassetsq/currencyexchangeq) - (totalliabilitiesq/currencyexchangeq)) > ((((mktcap*1000000)/fincurrencyexchangerate)/pricingexchangerate)) AND (((totalcurrentassetsq/currencyexchangeq) - (totalliabilitiesq/currencyexchangeq))) IS NOT NULL AND (((((mktcap*1000000)/fincurrencyexchangerate)/pricingexchangerate))) IS NOT NULL)

As you can see, that is much more complicated!

Re: Use SQL functions in Free Form Conditions 2 months, 3 weeks ago #2360

  • Evergreen
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
That was quick! Thanks.
Chaim
  • Page:
  • 1
Time to create page: 0.15 seconds