Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • RE: Database creation

    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'

  • RE: Stored procedure

    Hi ;

    I did not understand the question clearly. Please can you explain it with a sample.

  • RE: View column datatypes

    Hi ;

    I suggest this :

    CREATE VIEW [Students_vw] (NAME , Surname)

    AS

    SELECT CAST([Name] AS NVARCHAR(50)) , CAST([Soyad], AS NVARCHAR(50))

    FROM Students

  • RE: Accessing a named instance with local or computer's name

    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...

  • RE: Trouble with subquery

    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

  • RE: assigning zeros to duplicate rows

    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...

  • RE: MAX Date returns more than one row

    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...

  • RE: insert into a table

    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...

  • RE: insert into a table

    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...

  • RE: need help in my SP

    Hi;

    For multiple values ;

    DECLARE

    @CategoryID varchar(50) ,

    @Severity varchar(50) ,

    ...

  • RE: Index Scan Vs. Index Seek

    In these situations , you can use FORCESEEK table hint. For more details look http://msdn.microsoft.com/en-us/library/bb510478(SQL.100).aspx

  • RE: T-sql variable to file ?

    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...

Viewing 12 posts - 1 through 12 (of 12 total)