Viewing 12 posts - 1 through 12 (of 12 total)
Hi,
I have a basic question for which I can't manage to find a certain and final answer.
When a transaction is "committed", what exactly does that mean in the log?
Is there...
November 18, 2011 at 3:40 am
Allright, got it!
Here's the correct code :
DECLARE @tableName VARCHAR(30)
DECLARE @newValue VARCHAR(30)
DECLARE @sql VARCHAR(2000)
/* Set Values */
SET @tableName = 'myTable'
SET @newValue = 'changeToThis'
/* Build Update statement */
SELECT @sql = 'UPDATE '...
April 29, 2008 at 8:00 am
Hi,
actually the code does not work since there is a small quote problem. Look here :
SELECT @sql = @sql + ' sc.name + ' = ' + @newValue + ',...
April 29, 2008 at 7:27 am
Out of curiosity, don't you miss a blank in 'go'? --> ' go'
April 29, 2008 at 6:53 am
Hi and thanks for your answer! It helps a lot.
However.. : ) I understand this gives me all the column names I need :
SELECT sc.name
FROM sysobjects so
INNER JOIN syscolumns...
April 29, 2008 at 6:48 am
Hi,
try this :
select dateadd(month, 0, 0)
select dateadd(year, 0, 0)
April 29, 2008 at 6:05 am
Hi,
Here is a function that computes the last day of the month :
create function GetLastDayOfTheMonth(@Date datetime)
returns datetime
as
BEGIN
Return dateadd(day,-1* day(dateadd(month,1,@Date)),dateadd(month,1,@Date))
END
Cheers
April 29, 2008 at 4:43 am
Since the number of columns may change, I suggest you put your result in a temp table with the columns added in an exec statement... : )
So it would...
March 11, 2008 at 10:09 am
Just great!
Thank you
March 11, 2008 at 9:38 am
I create the table in a statement so I can insert a variable number of columns according a param's value. I don't feel like going into the 'Pivot' thing since...
March 10, 2008 at 10:27 am
All right, thanks for that answer. The only thing is I am using sql server 2000, so i need to look if pivoting tables is possible there, but i assume...
March 10, 2008 at 5:00 am
Hi and thanks for your answer. I am actually trying to create a report using SQL Reporting Services Server, that would take as parameters the begin date and end date....
March 10, 2008 at 4:36 am
Viewing 12 posts - 1 through 12 (of 12 total)