May 11, 2006 at 2:03 am
Dear
I have two different queires for searching particular text.
I have nearly 7 to 8 table in my database. all tables are related to each other by using foreign key.
now i want to a query which search particular text in all fields of all tables.
what would be qury for this.
second question is nearly same but in this all tables are not related to each other. all tables are independent.
what would be query.
Waiting for reply
Best regards,
May 15, 2006 at 7:26 am
Who have to loop through sysobjects and syscolumns using cursors and building dynamic queries and have to decide if you want the queries to be built for each column independently or for all like
select * from <mytable>
where <mycolumn1> =<mysearchstring>
and/or <mycolumn2> = <mysearchstring>
Based on your requirements you need to write your cursors to build the dynamic sql.
Prasad Bhogadi
www.inforaise.com
May 16, 2006 at 11:57 pm
Yep , Prasad has given you a good solution
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply