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 |
|
kalaivani
Starting Member
11 Posts |
Posted - 2007-12-18 : 02:16:14
|
| Thank u Chirag....but i should display all the records of that table not only price column.consider the column price in titles table in pubs database. If the price of any record is not defined it should be retrieved as -9999. |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2007-12-18 : 02:17:57
|
| [code]Select IsNull(Price,-999) From Titles[/code]Chiraghttp://www.chirikworld.com |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2007-12-18 : 02:40:15
|
| I Guess.. do specify all the columns then.. Select Title_Id, Title, .... From PriceI guess you require to learn the basics about the SQL.. you can check out the following sites. http://www.sql-tutorial.net/http://www.firstsql.com/tutor.htmhttp://www.w3schools.com/sql/default.aspAll the best..Chiraghttp://www.chirikworld.com |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2007-12-18 : 02:40:56
|
| Select IsNull(Price,-999) AS 'Price', {other fields from table comma seperated} From Titles |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-18 : 02:58:41
|
quote: Originally posted by visakh16 Select IsNull(Price,-999) AS 'Price', {other fields from table comma seperated} From Titles
Dont use single quote around column namesMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|