Viewing 15 posts - 16 through 30 (of 121 total)
If interviewer is System Admin, then he might think to reject the candidate. 😉
March 6, 2009 at 8:52 am
It has some errors.
- It is RAISERROR not RAISEERROR.
- Function can be passed as argument.
Use below code for it
DECLARE @Error VARCHAR(150)
SET @Error = ERROR_MESSAGE()
RAISERROR (@Error,16,1)
March 5, 2009 at 5:51 am
Replace semi-comma(;) with comma(,) in below line (third line of SELECT statement).
ERROR_MESSAGE() as ErrorMessage;
March 5, 2009 at 3:55 am
Try to write whole query in single line (one last hope).
SET @Query = 'Update [SQLSERVER\SQLINSTANCE].[Databasename].dbo.[Tablename] SET ...
March 5, 2009 at 3:41 am
Same thing will be application to
Where [Upload job] = ' + CAST(@UploadJob AS NVARCHAR) + '
chnage above to
Where [Upload job] = ''' + CAST(@UploadJob AS NVARCHAR)...
March 4, 2009 at 7:44 am
Modify this line to add single quote (')
SET [Last run] = ' + CAST(@LastRun2 AS...
March 4, 2009 at 7:43 am
GilaMonster (3/4/2009)
March 4, 2009 at 7:37 am
Dugi (3/4/2009)
Sorry man, now is correct little mistake during the test of your script! So sorry! But ok the declaration is not correct for this forum ( SQL Server 2000/2005)!...
March 4, 2009 at 7:06 am
Yes, it gives the third part database connection but not with development support. It looks that I have to work manually for Sybase 🙂 .
March 4, 2009 at 6:53 am
Dugi (3/4/2009)[hr
Declaration of your variable here is wrong we are not in SQL Server 2008, please check the forum we are SQL Server 2000! So your code here will not...
March 4, 2009 at 6:50 am
Use this
DECLARE
@LastRun2 datetime,
...
March 4, 2009 at 6:29 am
Try this
DECLARE @dt DATE
SET @dt = '2008-03-04'
SELECT DATEADD(D, -1, (CAST(YEAR(DATEADD(M,2,@DT)) AS VARCHAR)+'-'+ CAST(MONTH(DATEADD(M,2,@DT)) AS VARCHAR) + '-01'))
This will return the last date of next month.
March 4, 2009 at 6:21 am
Then there is no way to do so using T-SQL. You can use managment studio to modify your SPs. Create Script for all SP in single file and use management...
February 26, 2009 at 2:58 am
This is very silly question. Interviewer must be crazy.
But you can say here. for mamagement studio it is mmc.exe for 2000, SqlWb.exe for 2005 and Ssms.exe in 2008.
February 26, 2009 at 2:40 am
Viewing 15 posts - 16 through 30 (of 121 total)