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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign string to number and line chart

Status
Not open for further replies.

lalakeyorai

Technical User
Nov 3, 2009
12
MY
i have a problem to assign value to a string. in my database, there is a column called 'Event_Status' where this column, consists two status which is 'active' and 'clear'.

these two status is indicating the status of another column called 'Event_Name' and this column consist the event called 'devdown' (device down) and 'unresponsive'. here the example of my data:


Command.Event_Name Command.Event_Status
devdown active
devdown clear
devdown active
devdown clear
unresponsive active
unresponsive clear
unresponsive active
unresponsive clear


i did try for the SQL sytax:

select
convert (int, Command.[Event_Status])
from
Command
where
Command.[Event_Status]="Active" and
Command.[Event_Status]="Clear"
set "Active"=1
set "Clear"=0

there is no error for this syntax, but then when i try to generate a line chart, my chart result as a stright line ignoring the unresponsive and devdown. there no up and down line indicating 1 and 0. what i did wrong? can someone help me...


Thank you in advance



 
Set the chart to print "For each record". I think you also need to change your syntax

where
Command.[Event_Status]="Active" [red]or[/red]
Command.[Event_Status]="Clear"

...since one record cannot have both statuses.

-LB
 
LB,

Thank you so very much for your response and it's totally work... thank you, thank you, thank you....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top