Click here to Skip to main content
15,888,351 members
Home / Discussions / Database
   

Database

 
AnswerRe: Time out only the first time Pin
Wendelius4-Dec-08 4:03
mentorWendelius4-Dec-08 4:03 
QuestionNeed to execute a query when postgres service starts Pin
krishnan.s3-Dec-08 20:45
krishnan.s3-Dec-08 20:45 
AnswerRe: Need to execute a query when postgres service starts Pin
Wendelius4-Dec-08 7:06
mentorWendelius4-Dec-08 7:06 
QuestionTo apply a search on every table in a database Pin
rahuladya3-Dec-08 19:49
rahuladya3-Dec-08 19:49 
AnswerRe: To apply a search on every table in a database Pin
Ashfield3-Dec-08 21:09
Ashfield3-Dec-08 21:09 
GeneralRe: To apply a search on every table in a database Pin
rahuladya4-Dec-08 6:29
rahuladya4-Dec-08 6:29 
GeneralRe: To apply a search on every table in a database Pin
Ashfield4-Dec-08 9:18
Ashfield4-Dec-08 9:18 
GeneralRe: To apply a search on every table in a database Pin
rahuladya4-Dec-08 20:55
rahuladya4-Dec-08 20:55 
hello Bob

I did some job on that but the output is not according to my desire.
Let me explain
the Demo tables are
txnNews
NewsId Title News

txnWallpapers
WallpaperID Name Path

txnHoroscope
SunSignId Horoscope

Now i want to do search on the News and title columns of txnNews on Name column of txnWallpapers and Horoscope column of txnHoroscope

the code that i used is
declare @search varchar(128)
declare @mycommand varchar(128)
declare @mywhereand varchar(128)
declare @returnvalue varchar(156)
declare @colname varchar (50)
set @search = '%India%'


set @mycommand = 'select * from ? where news like '''+ @search+''''
exec @returnvalue= sp_MSforeachtable 
                @command1 = @mycommand


print @returnvalue 

that gives an error for the other two tables of invalid column

what should i do

regards
rahul
GeneralRe: To apply a search on every table in a database Pin
Mycroft Holmes4-Dec-08 21:54
professionalMycroft Holmes4-Dec-08 21:54 
QuestionReporting Services and multiple connection strings Pin
gantww3-Dec-08 11:20
gantww3-Dec-08 11:20 
AnswerRe: Reporting Services and multiple connection strings Pin
moon_stick3-Dec-08 22:48
moon_stick3-Dec-08 22:48 
AnswerRe: Reporting Services and multiple connection strings Pin
Mycroft Holmes4-Dec-08 21:58
professionalMycroft Holmes4-Dec-08 21:58 
QuestionQuery Pin
CodingYoshi3-Dec-08 9:15
CodingYoshi3-Dec-08 9:15 
AnswerRe: Query Pin
Wendelius3-Dec-08 9:32
mentorWendelius3-Dec-08 9:32 
QuestionAccommodating an apostrophe in SQL... [modified] Pin
new_phoenix3-Dec-08 5:24
new_phoenix3-Dec-08 5:24 
AnswerRe: Accommodating an apostrophe in SQL... Pin
Jay Royall3-Dec-08 5:41
Jay Royall3-Dec-08 5:41 
GeneralRe: Accommodating an apostrophe in SQL... Pin
new_phoenix3-Dec-08 6:03
new_phoenix3-Dec-08 6:03 
GeneralRe: Accommodating an apostrophe in SQL... Pin
Jay Royall3-Dec-08 6:12
Jay Royall3-Dec-08 6:12 
GeneralRe: Accommodating an apostrophe in SQL... Pin
new_phoenix3-Dec-08 6:30
new_phoenix3-Dec-08 6:30 
AnswerRe: Accommodating an apostrophe in SQL... Pin
Wendelius3-Dec-08 6:51
mentorWendelius3-Dec-08 6:51 
QuestionMSSQL : getting data from few tables Pin
benjamin yap3-Dec-08 1:41
benjamin yap3-Dec-08 1:41 
AnswerRe: MSSQL : getting data from few tables Pin
Ben Fair3-Dec-08 3:49
Ben Fair3-Dec-08 3:49 
GeneralRe: MSSQL : getting data from few tables [modified] Pin
benjamin yap3-Dec-08 4:13
benjamin yap3-Dec-08 4:13 
GeneralRe: MSSQL : getting data from few tables Pin
Ben Fair3-Dec-08 5:04
Ben Fair3-Dec-08 5:04 
QuestionHow can I store PDB files? Pin
harcaype3-Dec-08 1:00
harcaype3-Dec-08 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.