Forum Replies Created

Viewing 9 posts - 16 through 24 (of 24 total)

  • RE: SQL Join, Joining Two Tables

    inner join instead of left outer join

  • RE: Tricky Ranking Problem...

    HI I think i understand your so-called formula

    select ID,DealA,DealB,Profit from

    (

    select *,(select COUNT(1) from (select row_number() over(order by Profit Desc, DealA, DealB)as rank,* from

    #tmpDeal)c where a.DealA=c.DealA and c.rank<a.rank) as COUNTDealA,...

  • RE: Script Help Please!

    HI You can try to use sql-code below

    select * from [MCM_DQ_PASS1B].[dbo].[View_Pass1bAccounts] where dqflag = 'M' or dqflag is null and expr2 is null and pass2 is null

    The Value 'null' can't...

  • RE: UPDATE without listing all columns?

    You can use sql-code below instead of update

    truncate table table_1

    &

    INSERT INTO table_1 A (col1, col2, col3, col4, ....)

    SELECT B.col1, B.col2, B.col3... FROM table_2 B

  • RE: UPDATE without listing all columns?

    You can use sql-code below instead of update

    truncate table table_1

    &

    INSERT INTO table_1 A (col1, col2, col3, col4, ....)

    SELECT B.col1, B.col2, B.col3... FROM table_2 B

  • RE: Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".

    firstly ,make sure you have the full control permission of this folder

  • RE: Problem with partitioning table

    I cannot find anything wrong with you sql-code

    the one thing you can do is to re-create the filegroup EOD_2010_FG

    You can use the sql-code below to delete the filegroup EOD_2010_FG

    DBCC SHRINKFILE...

  • RE: Problem with partitioning table

    firstly, you must make sure that you have already created the error filegroup

    can you take a Screenshot of database Properties?

  • RE: Converting rows into columns

    HI you can use the sql-code below

    ----a=first table;b=second table

    declare @sql varchar(8000)

    set @sql=''

    select @sql=@sql+',max(case when skill='''+skill+''' then skill end) [skill'+skill+'],

    max(case when skill='''+skill+''' then proficiency end)[proficiency]' from (select * from B)t

    set @sql=STUFF(@sql,1,1,'')

    set...

Viewing 9 posts - 16 through 24 (of 24 total)