Jump to content

Converting a SQL Query to Spotfire Query


Katie Sikorski

Recommended Posts

I have a query I run in SQL I want to filter down some data in a table to a specific area. So if Prospect is equal to DELAWARE-NM OR DELAWARE-TX, or Like Delaware% See examples below: Thiswork in SQL but I can't seem to make either work in Spotfire, I can filter on them but is there a way to filter using a Case or If Statement in Spotfire

Equal to

SELECT Prospect

FROM Land

GROUP BY Prospect

HAVING (((Prospect)="DELAWARE-NM")) OR (((Prospect)="DELAWARE-TX"));

Like

SELECT Prospect

FROM Land

GROUP BY Prospect

HAVING (((Prospect) Like "DELAWARE*"));

Link to comment
Share on other sites

What do you mean with "Spotfire Query"

 

Are you looking for a calculated column or expression to return TRUE/FALSE 

 

If yes, then you could work with Find() or RXExtract()

 

If(Find("your.string", [your.column]) > 0,TRUE,FALSE)

If(RXExtract([your.column],"your.pattern",1) IS NULL, FALSE, TRUE)

 

Please be aware of case sensitivity.

 

You could use such expression to limit your data by expression.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...