Viewing 15 posts - 5,146 through 5,160 (of 7,505 total)
there must be an art at SSC
but I found this one in my examples http://www.simple-talk.com/sql/t-sql-programming/sql-server-error-handling-workbench
BEGIN TRY
SELECT CONVERT(INT, 'XYZ')
END TRY
BEGIN CATCH
-- ERROR_...
March 4, 2008 at 4:38 am
your sqlstatement is returing a resultset !
What are you trying to do ?
Why are you using dynamic sql to fulfill this need ?
March 4, 2008 at 4:32 am
I'm not familiar with mysql :blush:
But hooking it op with sql2000 can be done using a linked server;
The code below works for msaccess
USE [master]
GO
-- EXEC master.dbo.sp_dropserver @server=N'LSTEST', @droplogins='droplogins'
EXEC master.dbo.sp_addlinkedserver...
March 4, 2008 at 2:29 am
Thank you for the excelent feedback, berto.
It's always nice to get test scripts and results of comparison..
March 4, 2008 at 1:10 am
one of the caveots is that your server gets dependent to another server.
This will make maintenance for the connected ones more difficult.
To be able to connect with mysql, you'll need...
March 4, 2008 at 1:03 am
and sqlserver is getting equipped with such a broad scale toolset,
it's getting hard to just know it all 😉
HTH
March 4, 2008 at 12:54 am
- as long as you don't forget to perform full maintenance after your restore, you should be fine.
- the data purity check
- reindex all tables
- sp_updatestats
- dbcc updateusage (0) with...
March 3, 2008 at 11:52 am
- if you don't need to use the linked server for direct querying, don't
define it, but switch to SQLDTS or SSIS !
IMO one should avoid linked servers because you...
March 3, 2008 at 5:30 am
I was asked this question in an interview...
My answer would be exactly the same.
IMO your interviewer was only interested in the fact how you would
play along with this kind...
March 3, 2008 at 5:24 am
how did you reattach the db ?
- using EM ? (may bite you in the back because it reads what's stated in
the mdf-file (still pointing to the old...
March 3, 2008 at 5:10 am
.... where Month(datefield)='mm' will probably not use an index because of the function you apply to the column.
- replace 'mm' by just the number (avoid implicit conversions)
- Can you switch...
March 3, 2008 at 4:59 am
first things to check:
- this query comes within brackets ... is it a kind of subquery or nested table expression ?
SELECT COUNT(DISTINCT ( RecordedCalls.ID )) AS CallsCount
...
March 3, 2008 at 4:53 am
y the way, my local machine is 2005, remote 2000.
That's another story :doze:
Did you apply http://support.microsoft.com/default.aspx?scid=kb;en-us;906954 at the sql2000 instance ?
March 3, 2008 at 4:14 am
no problem
Update T2
set LastnameFirstname = T1.au_lname + ' ' + T1.au_fname
FROM [pubs].[dbo].[authors] T1
inner join [pubs].[dbo].[TheOtherTable] T2
on T1.au_id = T2.theFKtoAuthors
March 3, 2008 at 3:32 am
SELECT [FirstName] + ' ' + isnull([MiddleName], '') + ' ' +[LastName]
FROM [AdventureWorks].[Person].[Contact]
SELECT [au_lname] + ' ' + [au_fname] as lastname_Firstname
FROM [pubs].[dbo].[authors]
March 3, 2008 at 3:28 am
Viewing 15 posts - 5,146 through 5,160 (of 7,505 total)