Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompts in Freehand SQL

Status
Not open for further replies.

BrianTyler

IS-IT--Management
Jan 29, 2003
232
GB
(BO v5.1.7)

This works fine:

select f1,@prompt('MonthEnd ','D',,,) from T1

This fails:

select f1,@prompt('MonthEnd ','D',,,) - 1 months from T1
from cbsinfo

Does this mean that it is impossible to manipulate prompts in freehand SQL, or is there some special syntax required?

Thanks for any ideas / comments / suggestions

Brian
 
@Prompt always returns a character. You'll have to use your database functions to convert it to a date and then subtract your month.

What is your database. I do't recognize the syntax from the 2nd example.

Steve Krandel
Symantec
 
Thanks Steve,

We must have found it at the same time.

All the date functions work fine when I use:

Date(@prompt('MonthEnd ','D',,,)) - 1 months

it is fine

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top