Viewing 12 posts - 1 through 12 (of 12 total)
If you have spaces in the filename you can use it like this : FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorks_Data.mdf'
July 6, 2010 at 12:11 am
Hi ;
I did not understand the question clearly. Please can you explain it with a sample.
May 16, 2008 at 1:03 am
Hi ;
I suggest this :
CREATE VIEW [Students_vw] (NAME , Surname)
AS
SELECT CAST([Name] AS NVARCHAR(50)) , CAST([Soyad], AS NVARCHAR(50))
FROM Students
May 16, 2008 at 1:02 am
Hi;
There is a file in "C:\Windows\System32\drivers\etc\host" spo open it with nnotepad and check if your local ip address is matched with the local . In my...
May 16, 2008 at 12:53 am
Hi;
This is a self join example.
SELECT e2.*--e2.firstname + ' ' + e2.lastname
FROM [Employees] e1 INNER JOIN [Employees] e2
ON e1.employeeID = e2.reportsto
May 16, 2008 at 12:47 am
Here is the solution you want
Create table #new(id int null, Keyvalue varchar(2),amt int)
insert into #new(id,keyvalue,amt) values (1,'aa',11)
insert into #new(id,keyvalue,amt) values (2,'bb',22)
insert into #new(id,keyvalue,amt) values (1,'aa',11)
insert into #new(id,keyvalue,amt) values (1,'aa',11)
with numbered...
May 15, 2008 at 2:16 am
Hi;
In the group by clause , you used multiple columns and so the max function must return value for each row in the output. The problem...
May 15, 2008 at 2:07 am
SORRY;
I updated my solution :
DECLARE @t1 TABLE (memberid INT,initialjob VARCHAR(50))
DECLARE @t2 TABLE (memberid INT,intermediatejob VARCHAR(50))
DECLARE @t3 TABLE (memberid INT,lastjob VARCHAR(50))
INSERT INTO @t1
SELECT 123,'GS' UNION
SELECT 124,'PDR'
INSERT INTO @t2
SELECT 123,'AAP' UNION...
May 15, 2008 at 1:57 am
HI;
SOLTION 1 . :
DECLARE @t1 TABLE (memberid INT,initialjob VARCHAR(50))
DECLARE @t2 TABLE (memberid INT,intermediatejob VARCHAR(50))
DECLARE @t3 TABLE (memberid INT,lastjob VARCHAR(50))
INSERT INTO @t1
SELECT 123,'GS' UNION
SELECT 124,'PDR'
INSERT INTO @t2
SELECT 123,'AAP' UNION
SELECT...
May 15, 2008 at 1:39 am
Hi;
For multiple values ;
DECLARE
@CategoryID varchar(50) ,
@Severity varchar(50) ,
...
May 15, 2008 at 1:32 am
In these situations , you can use FORCESEEK table hint. For more details look http://msdn.microsoft.com/en-us/library/bb510478(SQL.100).aspx
May 14, 2008 at 7:35 am
CREATE PROCEDURE dbo.uspWriteToFile
@FilePath as VARCHAR(255),
@DataToWrite as TEXT
-- @DataToWrite as VARCHAR(8000)
AS
SET NOCOUNT ON
DECLARE @RetCode int , @FileSystem int , @FileHandle int
EXECUTE @RetCode = sp_OACreate 'Scripting.FileSystemObject' , @FileSystem OUTPUT
IF (@@ERROR|@RetCode > 0...
May 14, 2008 at 7:27 am
Viewing 12 posts - 1 through 12 (of 12 total)