Viewing 15 posts - 391 through 405 (of 443 total)
The code is fine. there is something with the configuration of the linked server.
Check the Linked Server properties --> Options --> RPC = True
This will enable the Remote Procedure Calls...
July 28, 2008 at 6:03 am
How about this query...
Select Top 1 TrainingPlanID from
(Select Top 90 Percent TrainingPlanID from
(Select top 5 TrainingPlanID from tblTrainingPlan Order by TrainingPlanID DESC) Q1
order By TrainingPlanID ASC ) Q2
Atif...
July 28, 2008 at 5:56 am
I think you are looking for CHARINDEX,
Declare @YourVal as varchar(12)
Set @YourVal = 'V104 - Luis'
Select Left(@YourVal, Charindex('-',@YourVal)-1)
I hope it will help you...
Atif Sheikh
July 28, 2008 at 5:36 am
ALOT of stuff on the net. Check this out...
http://blog.sqlauthority.com/2007/06/03/sql-server-2005-explanation-and-example-self-join/">
http://blog.sqlauthority.com/2007/06/03/sql-server-2005-explanation-and-example-self-join/
Atif Sheikh
July 28, 2008 at 4:50 am
SET DATEFORMAT setting is used only in the interpretation of character strings as they are converted to date values. It does not affect the display of date values.
MSDN http://msdn.microsoft.com/en-us/library/ms189491.aspx
To get...
July 28, 2008 at 4:24 am
Dear thomas ,
The logic described by dolly is right but I think that the syntax is incorrect...
Set CId =if EXISTS (select CompanyID From Company Where CompanyName Like @CompanyName...
July 28, 2008 at 4:17 am
Sorry...
didn't looked at the where clause...
Atif Sheikh
July 22, 2008 at 5:36 am
There is a way to get the query text of the executed query on the server. I think you can filter the information on UPDATE / INSERT basis.
This article was...
July 22, 2008 at 5:33 am
I think the following link can answer your question...
http://www.sqlserverandxml.com/2008/01/varcharnvarchar-n-vs-max.html">
http://www.sqlserverandxml.com/2008/01/varcharnvarchar-n-vs-max.html
Atif Sheikh
July 22, 2008 at 5:11 am
back-up and restoring with different name is the solution. But do keep in mind that teh physical names are not changed when you specify the name of the database while...
July 22, 2008 at 4:51 am
use the following in the Order by clause instead of ct.date.
CONVERT(float, ct.Date, 105)
I hope it will help you.
Atif Sheikh
July 21, 2008 at 5:16 am
It will be better for you to create PKs and FKs. But, generally these kind of databases (without PKs and FKs) have alot of data problems. Alot of Duplications, wrong...
July 21, 2008 at 5:09 am
Select Distinct a.rows,b.Object_id,b.name from sys.partitions a inner join sys.objects b on b.Object_id = a.Object_id
where b.type = 'U'
The logic is same as of Abhijit. It contains all the tables, regardless of...
July 21, 2008 at 4:54 am
Is there any PK FK relationship between the two tables?
If yes, create a join between the tables using that column.
Atif Sheikh
July 21, 2008 at 4:34 am
Viewing 15 posts - 391 through 405 (of 443 total)