Forum Replies Created

Viewing 15 posts - 3,391 through 3,405 (of 3,543 total)

  • RE: Declare Cursor using a Select w/ Variable

    Interesting Tim, my code worked OK for me in QA. I'm running SQL7 SP4.

    nb Your code runs OK in QA with or without the GLOBAL option.

  • RE: Inner Joining Results from multiple SP's

    Better still combine both into one single proc with selection param (eg Boys, Girls or Both).

  • RE: xp_sendmail

    If you embed the query you need to add more quotes as in

    @query ='DECLARE @A1 CHAR (20)

    DECLARE @A2 CHAR (2)

    SET @A1 = ''Yvette Palomo''

    SET @A2 = ''N''...

  • RE: SQL 6.5 DATABASE TO SQL 7.0

    Create the database/tables etc on SQL7 and use DTS.

  • RE: Access to SQL Server Conversion Problem

    Andy, I think formatting is an issue and it depends on what you are using to do the transfer. DTS for example will use select to get data and the...

  • RE: stored procedure

    The advantage of using a command object is being able to pass any text inc single quotes without undue processing or conversion and you can specify the CommandType (StoredProcedure or...

  • RE: Declare Cursor using a Select w/ Variable

    declare @sql nvarchar(200)

    set @sql = 'declare Update_IndexID cursor for Select '+@IndexColumn+' from ##CopyCaseIDtbl'

    exec sp_executesql @sql

    OPEN Update_IndexID

    FETCH NEXT FROM Update_IndexID

    WHILE @@FETCH_STATUS = 0

    BEGIN

    FETCH NEXT FROM Update_IndexID

    END

    CLOSE Update_IndexID

    DEALLOCATE Update_IndexID

  • RE: Inner Joining Results from multiple SP's

    Could try using temp table

    create #tmp ([Name] varchar(10),C int)

    insert into #tmp exec SP1

    insert into #tmp exec SP2

    select * from #tmp

  • RE: Callking Stored Proc from another Stored Proc

    You are returning two recordsets. QA displays each recordset in a separate result window in grid mode or both together in text mode. If you are using ADO with ASP...

  • RE: text field that contains varying strings

    Bit stumped really.

    I'm using SQL7 so don't know if that is the problem!!.

    In the first sample you posted is all the data in one text field or is it split?

    Can...

  • RE: text field that contains varying strings

    When I use the code with your sample data and Greg's it works for me!

    Is there something different about the data?

    Can u post small sample?

  • RE: text field that contains varying strings

    My answer depends on each row of text having both 'User Name:' and 'Domain:', also if there is no name will give you the error.

    Try

    select LTRIM(RTRIM(SUBSTRING(test_text,CHARINDEX('User Name:', test_text)+10,CHARINDEX('Domain:', test_text)-CHARINDEX('User Name:...

  • RE: formula

    Depends on whether you want the avg to be of 17 weeks or the number of weeks worked!

    This code uses the data available and will calc the average of the...

  • RE: how to copy proc from one db to another

    I always script my procs in text files and use ISQL to load/update them in one or more DB's. This way I never have to copy procs and also...

  • RE: text field that contains varying strings

    How about

    select SUBSTRING(test_text,CHARINDEX('User Name: ', test_text)+11,CHARINDEX(' Domain:', test_text)-CHARINDEX('User Name: ', test_text)-11)

    from x

Viewing 15 posts - 3,391 through 3,405 (of 3,543 total)