Showing posts with label exec. Show all posts
Showing posts with label exec. Show all posts

Thursday, March 22, 2012

difference

hello!
sorry, i don´t speak english.
hello again!
It what differs it is between these two sentence?
- exec (' exec sp_MShelpindexPru cliente,'+''+@.indexid+''+'output')
-exec sp_MShelpindexPru cliente,@.indexid output
Supposedly, they are equal , no?
None gives me mistake, but The first one does not give me a result And
the second one gives me the correct result. Which is the difference
between both?
I need to do it of the second form, because I need to insert one it
use @.dbname initially.
Thank you very much, and excuses me for my English. :-(Look into using sp_execute_sql instead. See if this helps:
http://support.microsoft.com/default.aspx?scid=kb;en-us;262499
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
<mani14@.begira.com> wrote in message
news:ca48b635.0308190221.9b9a596@.posting.google.com...
hello!
sorry, i don´t speak english.
hello again!
It what differs it is between these two sentence?
- exec (' exec sp_MShelpindexPru cliente,'+''+@.indexid+''+'output')
-exec sp_MShelpindexPru cliente,@.indexid output
Supposedly, they are equal , no?
None gives me mistake, but The first one does not give me a result And
the second one gives me the correct result. Which is the difference
between both?
I need to do it of the second form, because I need to insert one it
use @.dbname initially.
Thank you very much, and excuses me for my English. :-(|||Hello Mani !
But remeber that for SP_executesql the @.string followed to be executed must
be NVARCHAR !
Jens Süßmeyer.

Saturday, February 25, 2012

Developing a Search Case

hi all,
I am developing a search case...and i got to develop a stored procedure.

the procedure will be called in the following way...

exec search_text('t1@.c1%c2%c3%t2@.c1%c2%c3%t3@.c1%c2%,'he llo')

i.e. i want to search for 'hello' in the t1,t2,t3 tables and c1,c2,c3..are the corresponding columns in respective tables..

writing select statement is easy.,..but need a best solution to divide the tables and columns and then writing the procedure...

help me out...

thanks and regards
sai sreenivasHi,

it all depends on what database server you want to run the Stored Procedure...
So, what's the database and we try again...|||hii ,
My Database server is SQLSERVER on windows 2000 platform.....

looking forward for your reply...

thanks and regards
SAI SREENIVAS JEEDIGUNTA|||I'm sorry man, I'm not that familiar with Microsoft software.
If it were DB2 or Informix I could give you the solution...|||Will you always have the pattern 1 table and 3 columns ? Can you post the sql statement you have already designed that you want emulated in the sp ? Will you be running this sp in sql server or through a front-end like visual basic ... ? Will you always be searching for "hello" or some unknown string ?|||What results are you expecting back from your stored procedure ?