I have an SQL statement which is quite long. I want to declare a string
variable with this SQL statement and I want to have span multiple lines. I
could scrunch it all up and place it on a single line, but then the SQL
statement would be unreadable. There was a way to do this in VB, but how do
you do this is C#?
I want it to look something like this in the code.
string mySQL = "select 'Anchor' as Anchor_NonAncho r, combo.PROCESS_G ROUP,
combo.COMBINATI ON, cf.CHARTFIELD,
grp.COMBO_DEFN_ NAME, ' ' as Tree_Name, ' ' as
Node_Name,
cf.SEQUENCE_NBR _6, cval.SELECT_VAL UE as Range_From,
' ' as
Range_To
from gapsc.ps_combo_ grrul_tbl combo,
gapsc.ps_combo_ rule_tbl Rul,
gapsc.ps_combo_ group_tbl grp,
gapsc.ps_combo_ cf_tbl cf,
gapsc.ps_combo_ val_tbl cval
where Rul.EFFDT_TO = '2099-01-01'
and rul.combination = combo.combinati on
and grp.setid = rul.setid
and combo.setid = cf.setid
and rul.combination = cf.combination
and rul.combination = cval.combinatio n
and grp.Process_Gro up = combo.Process_G roup
and grp.combo_defn_ name = rul.combo_Defn_ Name
and cf.SETID = cval.SETID
and cf.COMBINATION = cval.COMBINATIO N
and cf.SEQUENCE_NBR _6 = cval.SEQUENCE_N BR_6
and cf.TREE_NAME = ' ' ";
Thanks in advance!!
variable with this SQL statement and I want to have span multiple lines. I
could scrunch it all up and place it on a single line, but then the SQL
statement would be unreadable. There was a way to do this in VB, but how do
you do this is C#?
I want it to look something like this in the code.
string mySQL = "select 'Anchor' as Anchor_NonAncho r, combo.PROCESS_G ROUP,
combo.COMBINATI ON, cf.CHARTFIELD,
grp.COMBO_DEFN_ NAME, ' ' as Tree_Name, ' ' as
Node_Name,
cf.SEQUENCE_NBR _6, cval.SELECT_VAL UE as Range_From,
' ' as
Range_To
from gapsc.ps_combo_ grrul_tbl combo,
gapsc.ps_combo_ rule_tbl Rul,
gapsc.ps_combo_ group_tbl grp,
gapsc.ps_combo_ cf_tbl cf,
gapsc.ps_combo_ val_tbl cval
where Rul.EFFDT_TO = '2099-01-01'
and rul.combination = combo.combinati on
and grp.setid = rul.setid
and combo.setid = cf.setid
and rul.combination = cf.combination
and rul.combination = cval.combinatio n
and grp.Process_Gro up = combo.Process_G roup
and grp.combo_defn_ name = rul.combo_Defn_ Name
and cf.SETID = cval.SETID
and cf.COMBINATION = cval.COMBINATIO N
and cf.SEQUENCE_NBR _6 = cval.SEQUENCE_N BR_6
and cf.TREE_NAME = ' ' ";
Thanks in advance!!
Comment