Forum Replies Created

Viewing 15 posts - 106 through 120 (of 321 total)

  • RE: Transaction Handling Across Linked Server

    BEGIN DISTRIBUTED TRANSACTION might help you

  • RE: RECURSIVE PROCEDURE help!

    Use the trace to see if the proc is called recursivly

     

    Anyway from what I can see here your code is a little wrong

    NOTICE that @tblMenuID is a VARIABLE...

  • RE: Finding and Deleting Duplicate Data

    Well rsharma is deleting all the post made by a user in one dep but keeps 1 (a user will have MAX 1...

  • RE: Finding and Deleting Duplicate Data

    select t2.comment_id, t1.site_id, t1.date_entered, t1.[user_id], t1.comment

    from dbo.statusrptcomments1 t1 inner join

    (select min(comment_id) as comment_id from dbo.statusrptcomments1

    group by site_id, [user_id],comment) t2 on t1.comment_id = t2.comment_id

    DELETE t1

    FROM  dbo.statusrptcomments1 t1 LEFT OUTER JOIN...

  • RE: Special character search

    maybe this will help you

    DECLARE @T TABLE (shipto nvarchar(50))

    insert into @T select N'aaaaa'+nchar(140)+N'bbbbbbbb'

    insert into @T select N'bbbbbb'+nchar(140)+N'bbbbbbbb'

    insert into @T select N'aaaaa'+N'aaaaaaa'

    select * from @T

    where shipto like N'%'+nchar(140)+N'%'

    select * from...

  • RE: script help!!!

    DECLARE @T TABLE (FILE_EXT varchar(50))

    INSERT INTO @T SELECT 'intra_005561.xxx.pdf'

    INSERT INTO @T SELECT 'intra_005561xxxpdf'

    SELECT

    CASE WHEN CHARINDEX('.',REVERSE(FILE_EXT))>0 THEN

    REVERSE(SUBSTRING(REVERSE(FILE_EXT),1,CHARINDEX('.',REVERSE(FILE_EXT))-1))

    ELSE ''

    END as Ext,

    CASE WHEN CHARINDEX('.',REVERSE(FILE_EXT))>0 THEN

    REVERSE(SUBSTRING(REVERSE(FILE_EXT),CHARINDEX('.',REVERSE(FILE_EXT))+1,LEN(FILE_EXT)))

    ELSE FILE_EXT

    END as FileName

    FROM @T

    SELECT REVERSE(SUBSTRING(REVERSE(FILE_EXT),1,CHARINDEX('.',REVERSE(FILE_EXT)))) as Ext

    ,REVERSE(SUBSTRING(REVERSE(FILE_EXT),CHARINDEX('.',REVERSE(FILE_EXT))+1,LEN(FILE_EXT)))...

  • RE: Slow Query

    Order clause can be:

    ORDER BY

    dbo.tbl_execParam.cycleName,

    dbo.tbl_tool.className,

    dbo.tbl_execParam.framework,

    dbo.tbl_execParam.taskName,

    dbo.tbl_failedSeeds.status,

    sd.dispositionStatus,

    dbo.tbl_execParam.toolName,

    sd.seedName,

    dbo.tbl_failedSeeds.testendtime,

    sd.lastModifiedTime

    You can alose try this

    FROM 

    (SELECT MAX(lastmodifiedtime) as lastmodifiedtime,seedName

    FROM dbo.tbl_seedDisposition

    GROUP BY lastModifiedTime)sd1 inner join  dbo.tbl_seedDisposition sd...

  • RE: Need Help by Update Table !

    update svlisteks

    set sollstart=a.sollstart,sollstop=a.sollstop, DEP=a.DEP

    from

    (

    select sv.* from

    svliste sv left outer join svlisteks svks

    on svks.agent = sv.agent  --same agent

    and svks.datum=sv.datum --same datum

    and ISNULL(sv.sollstart,'')=ISNULL(svks.sollstart,'')

    and ISNULL(sv.sollstop,'')=ISNULL(svks.sollstop,'')

    and ISNULL(sv.DEP,'')=ISNULL(svks.DEP,'')

    where svks.agent IS NULL

    ) a

    where...

  • RE: Speedy Sub-Queries??

    I think the problem is the way that you wrote your query ...you have so many joins with the same table.

    Probably it will be better to post the DDL and...

  • RE: Referencing MDX Query results in SQL Server

    set quoted_identifier on

    declare @t table("[Date].[Year].[MEMBER_CAPTION]" varchar(1))

    insert into @t select '1'

    select "[Date].[Year].[MEMBER_CAPTION]" from @t

  • RE: alphanumeric sort on inconsistant values

    ya I added the GO

    But I didn't inted the first time to post a QA batch to create the function and run the query...

    Like I said it is...

  • RE: alphanumeric sort on inconsistant values

    Strange ... the function has only 65 lines ... Did you copy paste correct?

  • RE: alphanumeric sort on inconsistant values

    This is a working sol IF you don't mind the speed...

    The idea is to padd all numbers from your strings to a certain len ( a max len that should...

  • RE: stored procedure

     

    declare @Skill table(skillID int,skillName varchar(30))

    declare @Topic table(skillid int,code varchar(30),Descr varchar(30))

    insert into @skill

    select 1,'Computers' union all

    select 2,'Communications' union all

    select 3,'Human Development'

    insert into @topic

    select 1,'A001A','Access Basic' union all

    select 1,'A001B','Access Intermediate' union...

  • RE: Update a column to an EMPTY STRING not working

    COL_1 CHAR(1) will padd your string to ' '

    so if you wanna store '' than use VARCHAR(1) or treat ' ' like an empty string

Viewing 15 posts - 106 through 120 (of 321 total)