Forum Replies Created

Viewing 11 posts - 226 through 236 (of 236 total)

  • RE: Help Needed in Complex Logic

    Hi Erikkur,

    Thanks for the reply. Here is my try.

    SELECT *

    FROM

    (

    select Val,Cat,ROW_NUMBER() over (partition by Cat ORDER BY Empid ) AS Rn

    FROM (SELECT Empid,Empname,CAST(Empsalary as varchar(50)) AS EmpSalary,CAST(Empdesignation as varchar(50)) AS...

  • RE: Help Needed in BCP Command

    Finall i am able to achieve with the below line,

    queryout D:\Report.txt -T -c -t, -b 100 -S Resdox-0043\KGJ-DEV -U sa -P Pasword123

  • RE: Help Needed in BCP Command

    Ok, After browsing the web i found and i tried with the below option.

    EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT N from sample.dbo.tally" queryout D:\Report.txt -N -S Resdox-0043\KGJ-DEV -U sa -P Pasword123'.

    ...

  • RE: SqlServer AVG Issue

    thanks, got the difference. If it is float, it does.

    Appreciate your time.

  • RE: Bulk Insert Issue

    Found the issue. It's problem with my text. it has some extra comma's. Thanks.

  • RE: Bulk Insert Issue

    Hi Andrew,

    Thanks for the reply.i did analyse further and seems it's problem with the CSV file. When i convert my excel data to CSV and if i open the CSV...

  • RE: using Gropy by with Tricky Logic

    This is my updated Logic

    declare @dt date,@UserCompanyId int = 100

    declare @year char(4) = '2014',

    @month char(2) = '03'

    set @dt = @year + '-' + @month +...

  • RE: help need in dynamic sql

    Hi Josh.

    Thank you Man. understood how to include quotes. Awesome.

  • RE: help need in dynamic sql

    Hi Jhon,

    Yes, i knew i am missing the quotation for the path. that's what i mentioned on my first post. Here is my another try

    set @sql= 'BULK INSERT...

  • RE: help need in dynamic sql

    Hey guys,

    thanks for your replies.

    my try :

    set @sql= 'BULK INSERT ' + @TableName +

    ' FROM ' + @FilePath + ' WITH (

    FIELDTERMINATOR = ''' + @delimiter +'''

    ,ROWTERMINATOR...

  • RE: Moving Values from Temp table to another tamp Table

    Hi Luis.

    Yes, I don't have duplicates. So the first suggestion should work for me. Thank you for your suggestion and time on this.

Viewing 11 posts - 226 through 236 (of 236 total)