Viewing 15 posts - 16 through 30 (of 58 total)
I agree with Ken, you should try to avoid cursors whenever possible. Also, I suggest the use of sys.columns instead of information_schema.columns. Querying the catalog views is the...
January 28, 2009 at 9:09 am
At this point, is Reporting Services actually running, and you just need to connect to it via SSMS?
If so, have you tried connecting SSMS 2008 to your Reporting Services 2005...
January 28, 2009 at 7:57 am
My guess is that there's no table called "AGEN." If that's only part of the table name, then try something like this...
Insert Into #DISTINCTC
Select Column_Name
From INFORMATION_SCHEMA.COLUMNS
Where...
January 28, 2009 at 7:37 am
No problem, I'm happy I could help! 🙂
January 27, 2009 at 9:39 am
Try using Cast(yourDecimalColumn As datetime), i.e.
Declare @myDate decimal;
Set @myDate = 39838;
Select Cast(@myDate As datetime);
January 27, 2009 at 7:17 am
NULL is not a valid value for TOP, so you either need to change your parameter initialization, i.e.
,@ReturnNumber int = 1
Or change your SELECT statement, i.e.
SELECT TOP (ISNULL(@ReturnNumber, 1)) feProduct.ProductID,...
January 27, 2009 at 7:05 am
Of course, you could always query your column to see if the delimiter exists there, too. 🙂
December 21, 2008 at 8:56 am
The one time I had that same error, it was because my delimiter value was contained in one of my varchar columns.
Try a ridiculous delimiter, like
bcp test..INCOMINGBUFFER2 in "c:\file.txt"...
December 21, 2008 at 8:55 am
That's pretty neat, Jeffrey... I've never used synonyms before. Then again, I don't really have any need to, but still an interesting approach. 🙂
December 19, 2008 at 1:34 pm
Sorry for the confusion, that's just sample code.
You'll want to use your own view definition for the @mySQL parameter.
December 19, 2008 at 1:09 pm
Steve's right. But if necessary, you could also write this update as...
UPDATE p
SET p.MaterialCost = x.LabourCost
FROM dbo.Products As p
JOIN (
SELECT DISTINCT COUNT(ProductId) AS ProductCount,ProductId, AVG(CONVERT(money,TotalCost))...
December 19, 2008 at 11:04 am
You could try something like...
Create Procedure exampleProc
As
Begin
Declare @mySQL nvarchar(1000)
, @databaseName varchar(128);
Select Top 1 @databaseName = name
From sys.databases
Where name Like 'yourDatabaseName%'
Order By database_id...
December 19, 2008 at 10:58 am
Hi Tracey,
You could use stored procedures to change the view definition. If necessary, you can use sys.databases to find the appropriate database name.
Also, I'd highly recommend the use of...
December 18, 2008 at 9:43 am
You probably want the C# to actually call the website. For logging, you'd also use C# to call a stored proc, which would then store the data in SQL...
December 18, 2008 at 9:32 am
I'm not sure if you can do it in T-SQL, but C# is definitely much better for this task.
December 18, 2008 at 9:29 am
Viewing 15 posts - 16 through 30 (of 58 total)