Viewing 15 posts - 1,126 through 1,140 (of 1,346 total)
sp_executesql works much the same way that a stored procedure would, the declaration of in, and out parameters is a little different, but concept is the same, except that the...
August 4, 2005 at 10:45 am
I probably wouldn;t use linked server.
Try opendatasource instead.
http://www.databasejournal.com/features/mssql/article.php/3331881
August 4, 2005 at 10:37 am
it is likely the query optimizer is preparing a goofy plan for the procedure.
Have you tried dbcc dropclean buffers?
or run the procedure the with Recompile option?
Or in the procedure. Modify...
August 4, 2005 at 10:30 am
Well,
You cannot pass record sets between stored procedures.
You ultimately will have to either use a temp table in the calling stored procedure, or use an openDataset or Openquery command
use temp...
August 4, 2005 at 10:11 am
Can U post a sample create table script, some sample data, and the update procedure your using, and what you want the end result to be, and I'm sure someone...
August 3, 2005 at 11:30 am
Your Description is a little confusing.
Can you post some example table definitions, Some sample data, and what you expect the results to look like.
Just guessing here, Try this.
CREATE PROCEDURE dbo.blablalba
(
@AssignedSP...
July 29, 2005 at 1:40 pm
I guess it depends on how much time you have, and how important this is to your company. Everyone wants some Ad-Hoc Reporting tool that allows the user to do...
July 28, 2005 at 2:43 pm
There's no gotcha's in that way.
The only gotcha is if you have used the DATALENGTH function on any strings to test the lengh, this presents an integer in Bytes. Otherwise,...
July 28, 2005 at 2:32 pm
Very difficult to explain the entire process in a forum thread, but using books online it supplies a bunch of information on how to handle suck a predicament
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_13_8y7n.asp
July 28, 2005 at 2:23 pm
I'm not sure about your logic or business rules, but you cannot selectively fire a trigger based off a sproc.
You will prbably have to remove the trigger, and put the...
July 28, 2005 at 11:26 am
Well for this instance, Count(*) counts everything including nulls, Count(Processed) counts only non null values.
If you need to differentiate between Null, and other values then use a case statement
-- Create...
July 28, 2005 at 10:50 am
Substring does allow an expression,
Use charindex nested inside the substring function.
if you have more than 1 delimiter you would want 1 statement for each distinct delimiter
-- Create test table...
July 28, 2005 at 10:28 am
are you looking for tsql syntax for an if statement?
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE
{ sql_statement | statement_block } ]
IF (SELECT AVG(price) FROM titles WHERE...
July 27, 2005 at 2:47 pm
This is known as a phenomena called parameter sniffing.
But related more to a cached query plan. the optimizer is guessing at the values your going to use, based off previous...
July 27, 2005 at 2:45 pm
This is known as a crosstab query,
Lots of examples on this site,
Use Case statement, and probably a group by clause
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_14_04j7.asp
If you post your actual table, some sample data,...
July 27, 2005 at 2:40 pm
Viewing 15 posts - 1,126 through 1,140 (of 1,346 total)