Forum Replies Created

Viewing 15 posts - 226 through 240 (of 321 total)

  • RE: Matching Values

    Check this :

    CREATE FUNCTION [dbo].[FUNCTION_NAME]

    (

     @Pos int,

     @MyNumb int

    )

    RETURNS  varchar(400)

    AS 

    BEGIN

     DECLARE @TempResult varchar(400)

     DECLARE @MinValue int

     DECLARE @NewValue int

     --check to see if a number matches myValue

     IF EXISTS(SELECT Value FROM MyTable WHERE Value=@MyNumb)

      RETURN...

  • RE: Matching Values

    RECURSIVE ...

    Your alg is tottally different ...

    I ll explain more:

    bool MyFunction(NoOfElemInList,MyNumb,List)

    {

    while (NoOfElemInList>0) and List(NoOfElemInList)>MyNumb

         NoOfElemInList--;

    if List(NoOfElemInList)=MyNumb return true

    else 

    While (NoOfEleminList>0) and NOT MyFunction(NoOfElemInNewList,MyNumb-List(NoOfElemInList),NewLIst)

         NoOfElemInList--;

    return false;

    }

     

    smthing like that you need

     

    OBSERVE the RECURSIVE call...

  • RE: Matching Values

    Your problem SHOULD be solved at the client side since it will require loops and math calc...

    Actually you don't have so many combinations...

    An sample RECURSIVE alg is

    1--arrange numbers in...

  • RE: Can''''t register new instance in EM

    Everithing K in ClientNetworkUtility for network comm with the server?

  • RE: Bulk Insert Source Files

    try to put UNC path and make sure that the account under wich SQL is started has access to you shared folder

  • RE: DTS Text File Import Loop

    Better put 4 txtfiles as source in you DTS and 4 connection to dest and 4 transf task so you can use the pararelism offered by DTS

  • RE: metadata services error prevents access to DTS packages

    Hmm I have same issue with EM bloking but when I want to access properties for a DB

  • RE: run dts package from asp.net page

    can't you use BulkInsert instead of DTS?

  • RE: Grant permissions with Dynamic Sql

    Write your select that returns the commands add GO after each command in your select and run the result in QA

    or if you think that your result in commands is...

  • RE: Openrowset

    Or try table variable

    DECLARE @tblvar(...)

    INSERT INTO @tblvar

    SELECT ....

  • RE: Index and table scan

    it is faster an index seek than an index scan

  • RE: Index and table scan

    You WANT index scan : ) or index seek

  • RE: Increment Column

    set nocount on

    declare @t table(CODE varchar(50),DESCRIPTION varchar(50))

    insert into @t values ('03354718', 'FIRST_DESCRIPTION')

    insert into @t values ('54654654','SECOND_DESCRIPTION')

    insert into @t values ('62173620','THIRD_DESCRIPTION')

    select * From @t

    select a.code,a.description,count(*)

    from @t a join @t b

    on a.code>=b.code

    group...

  • RE: Remove Column

    If you have only SP and no foreign key or contraints or triggers, or VIEWS where you can show the col with a different name is enaugh to script the SP

  • RE: Remove Column

    Generate a script for your DB with and search for every column name in the script

Viewing 15 posts - 226 through 240 (of 321 total)