Forum Replies Created

Viewing 15 posts - 16 through 30 (of 149 total)

  • RE: STUFF

    I thought it will follow the 'CONCAT_NULL_YIELDS_NULL is always ON' rule. But i was wrong.

  • RE: Fun with Time

    Should i drink a second coffee? :crazy:

  • RE: Summed Views

    My coffee has a big delay today! :hehe:

  • RE: Binary Compare

    It's very interesting, because that

    DECLARE

    @a VARBINARY(20) = 0x10

    , @b-2 VARBINARY(20) = 0x1000

    , @C VARBINARY(20) = 0x01

    , @d VARBINARY(20) = 0x0001;

    IF (

  • RE: REPLICATE

    O my God! How much coffee do i need today to recognize a hexa number?:-D

  • RE: Group Concat

    You should do the same in the outer query.

  • RE: Query Help

    select

    r.ID, r.FULL_NAME, r.FULL_ADDRESS,r.MEMBER_TYPE, r.BIRTH_DATE,

    CONVERT (int,DATEDIFF(hour,r.BIRTH_DATE,GETDATE())/8766)as Age,

    r.Parent1_FullName,r.Parent1_Cell,r.Parent1_Email,

    r.Parent2_FullName,r.Parent2_Cell,r.Parent2_Email

    from IMIS.dbo.vw_csys_registrations r

    WHERE r.MEETING_TYPE='PADA' and r.MEMBER_TYPE LIKE '%CH'

    intersect

    select

    r.ID, r.FULL_NAME, r.FULL_ADDRESS,r.MEMBER_TYPE, r.BIRTH_DATE,

    CONVERT (int,DATEDIFF(hour,r.BIRTH_DATE,GETDATE())/8766)as Age,

    r.Parent1_FullName,r.Parent1_Cell,r.Parent1_Email,

    r.Parent2_FullName,r.Parent2_Cell,r.Parent2_Email

    from IMIS.dbo.vw_csys_registrations r

    WHERE r.MEETING_TYPE='TSM' and r.MEMBER_TYPE LIKE '%CH'

    order...

  • RE: How to get minimum date of an ID with respect to startdate?

    select a.*, (select max(Startdate) from @b-2 b where b.id=a.id and b.StartDate<=a.StartDate) StartDateB from @a a

    How the hell shall i type smaller or equal? 🙂

  • RE: EXECUTE AS procedures

    Shame on me! Session is not equal procedure! :blush:

  • RE: COALESCE

    Hmm. I thought COALESCE will return the datatype of the leftmost parameter. Learnt something. Thanks.

  • RE: Get two sales item code exclusively from invoice

    It works as long an item occurs only once in an invoice. For me a self join is a better solution:

    SELECT distinct

    SI_a.invno

    FROM

    ...

  • RE: min and group by help

    select

    id,

    date,

    page

    from

    ( select

    date,

    id,

    ...

  • RE: Trouble with SUM

    Create a tally table with all needed dates and left join it instead of inner join.

  • RE: Round

    select round(cast(0.999 as float),2) does the job. 🙂

  • RE: Need help with DATE should be dynamic for every day summary.

    AND t.StartExport BETWEEN CAST(left(convert(varchar,CURRENT_TIMESTAMP,120),10)+' 16:00:00.000' AS DATETIME) AND CAST(left(convert(varchar,dateadd(day,1,CURRENT_TIMESTAMP),120),10)+' 06:00:00.000' AS DATETIME)

Viewing 15 posts - 16 through 30 (of 149 total)