Author |
Topic |
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-27 : 23:43:24
|
Is it possible to have the first row as empty?I was thinking that if this is not possible then maybe i could create a table with a null column on the first row and do a left join? |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-07-27 : 23:53:19
|
[code]select col1 = NULL, col2 = NULL, . . . union allselect col1, col2 . .. from sometable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-28 : 00:01:21
|
Sorry i don't understand.Do i need to create another table with a null value on a column? |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-28 : 00:06:56
|
No,no.Ok i got it.Thanks! |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-28 : 06:23:05
|
Why do you need a dummy NULL row?MadhivananFailing to plan is Planning to fail |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-28 : 12:09:36
|
Like...Null012Khtan's example works fine for this. |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-28 : 18:33:44
|
Oh.You said why i need one.Well i want to have an empty row at a listbox in asp.net so the user can have the "none" option. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-29 : 04:25:26
|
quote: Originally posted by sapator Oh.You said why i need one.Well i want to have an empty row at a listbox in asp.net so the user can have the "none" option.
You dont need to do this in sql. When you populate data in the list box have first entry as "None"MadhivananFailing to plan is Planning to fail |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-29 : 20:29:49
|
With "None" i don't actually mean some sort of a string, just an empty row.I don't think i can manually create a p.e. "none" row in a databound listbox anyway. |
 |
|
ann
Posting Yak Master
220 Posts |
Posted - 2010-07-29 : 20:57:19
|
just add "" and it will be a blank value in your list box |
 |
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2010-07-29 : 23:19:58
|
Hey.I think i did not explain very well.The listbox is data binded in an sqldatasource so i cannot add manually anything. |
 |
|
|