ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Chart.NoValue and SQL statement
Posted by icm63 on Jun-17-2020 13:00

If i wanted to put 'NoValue' value into a MS T SQL select statement

How would this be done

..."ChartDirector supports a special constant called NoValue, which is equal to 1.7E+308"...



Change this :



SELECT
Symbol,
Close
FROM [MyData]
Where Symbol = 'AAPL'


To this, how would I CAST the value CAST('1.7E+308' as FLOAT)

SELECT
Symbol,
CAST('1.7E+308' as FLOAT) AS [Close]
FROM [MyData]
Where Symbol = 'AAPL'


Any ideas?

  Re: Chart.NoValue and SQL statement
Posted by Peter Kwan on Jun-17-2020 17:29
Hi icm63,

Do you mean you want to hard coded the 1.7E+308 into the SELECT statement, or do you mean you want to store 1.7E+308 in the database and read it back later?

From the example in your question, it seems you are hard coding 1.7E+308 into a SELECT statement. Have you tried to just use 1.7E308 or 1.7E+308, like:

SELECT 1.7E308 As Close From MyData

Regards
Peter Kwan

  Re: Chart.NoValue and SQL statement
Posted by icm63 on Jun-17-2020 17:33
Thanks

This seems to work

I will test it out

MS TSQL

SELECT CAST(1.7E308 AS FLOAT) As [Close]