Forum Replies Created

Viewing 11 posts - 1 through 12 (of 12 total)

  • RE: Compare two columns

    I have written finally the query.

    create function testtable (@address varchar(200))

    returns @table table (alias varchar (200))

    as begin

    declare @alias varchar (200)

    declare @value varchar (200)

    declare @email varchar (200)

    --set @alias='fff@dd.com, helper@sql-server-helper.com,vc@.com'

    set @alias=@address

    while...

  • RE: Compare two columns<!-- 864 --><!-- 864 -->

    How I can get 'good'?

    DECLARE @Email VARCHAR(100)

    DECLARE @Email2 VARCHAR(100)

    Set @email= 'helper@sql-server-helper.com'

    set @email2='fff@dd.com, helper@sql-server-helper.com,vc@.com'

    SELECT case when @email like @email2...

  • RE: Compare two columns

    Thank you for the simple query.

    Yes,the table alias column has more than 1 value.

    I would like to compare address column with alias column.

    If address column is equal alias column then...

  • RE: Compare two columns

    Hello,

    I have added to declare table:

    declare @info-2 table ( nr int, [address] varchar(100), alias varchar(100))

    INSERT INTO @info-2 (nr, [address],alias)

    Select 1,'x1@yahoo.com','X1@exc.yahoo.ex'

    union all

    Select 2,'X2@gmail.com','X2@exc.gmail.ex,X3@exc.bcm.ex'

    union all

    Select 3,'X4@gmail.com','X4@exc.gmail.ex,X5@exc.bbx.ex,X6@exc.bbx.ex'

    union all

    Select 4, 'X7@co.com', 'X8@exc.gmail.ex,X2@exc.yahoo.ex,X10@exc.coo.ex'

    union all

    Select...

  • RE: Strange situation for result

    Yes, I understand that i don't get any rows for this query.

    Yes, It is the really data and it is very strange for this that i have written for you.

  • RE: Strange situation for result

    "Isin't working" is meaning that after this qeury in my db:

    update numbers

    set oper=1

    from numbers where [Zvans no] like '%'+[Zvans uz]+'%'

    I am getting - (0 row(s) affected)

  • RE: Strange situation for result

    Yeas, this code is good, but some is bad in my table, perhaps with data, because this query doesn't working and I don't know why...

  • RE: Can it change columns of a table values to rows

    Thanks, I have done with unpivot, it is nice.

  • RE: How many users are working till specify date?

    Thank you very much!

    I have added insteed retired this:

    SUM(CASE WHEN D.Date BETWEEN ISNULL(W.StartDate,'1970-01-01')

    ...

  • RE: How many users are working till specify date?

    Nice Job for working.

    Yes I have done, but my query is working long, about 1minute, you one second 🙂

    Talking about retired people some incorrect. I will try it, if I...

  • RE: How many users are working till specify date?

    I thinking too about a data table, but I haven't thought how do it.

    User - It is employee of company

    Retired date - the last working day in company

    working day -...

Viewing 11 posts - 1 through 12 (of 12 total)