Forum Replies Created

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

  • RE: Transaction Handling Across Linked Server

    BEGIN DISTRIBUTED TRANSACTION might help you


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

  • 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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

  • RE: alphanumeric sort on inconsistant values

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

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


    Kindest Regards,

    Vasc

  • 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


    Kindest Regards,

    Vasc

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