Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2012-06-13 : 20:10:03
|
| [code]select SectionID as ID, SectionTitle as Title, 'AddSection.aspx' as PageName from dbo.SectionInfo[/code]I currently have the above code where I am selecting differant columns from a table but at the end of each row I want to also pass the static text "AddSection.aspx" so that when the select statment runs it returns an output like[code]ID Title PageName1 GameTitle AddSection.aspx2 Game2 AddSection.aspx[/code]I know my code is wrong but how do I make it correct?-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia |
|
|
shilpash
Posting Yak Master
103 Posts |
Posted - 2012-06-13 : 20:51:06
|
| update SectionInfoset pagename='AddSection.aspx'select SectionID as ID, SectionTitle as Title, PageName from dbo.SectionInfo |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2012-06-13 : 21:35:14
|
quote: Originally posted by shilpash update SectionInfoset pagename='AddSection.aspx'select SectionID as ID, SectionTitle as Title, PageName from dbo.SectionInfo
The DB does not contain a column called PageName-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2012-06-13 : 21:51:34
|
| I figured it outselect SectionID as ID, SectionTitle as Title, CAST('AddSection.aspx' as char(15)) as PageName from dbo.SectionInfo-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia |
 |
|
|
|
|
|