tokei's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
44 (0.03 per day)
Joined:
15-December 11
Profile Views:
1,346
Last Active:
User is offline Jul 07 2015 08:50 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   tokei has not set their status

Posts I've Made

  1. In Topic: How to join two tables with column value condition

    Posted 21 May 2015

    View Postbaavgai, on 05 May 2015 - 08:31 PM, said:

    Because LeadIDs doesn't exist yet. First:
    SELECT rhs.AppointmentNo AS RunningNo,
        (CASE WHEN rhs.CustomerLeadID IS NOT NULL THEN rhs.CustomerLeadID ELSE rhs.MemberLeadID END) AS LeadIDs
        FROM ReservationHS rhs
    
    


    Actually, stop here. In this particualar case, there is a handy function:
    SELECT rhs.AppointmentNo AS RunningNo, IsNull(rhs.CustomerLeadID,rhs.MemberLeadID) AS LeadIDs
        FROM ReservationHS rhs
    
    


    Then:
    select a.RunningNo, a.LeadID, b.LeadFullName
        from (
            SELECT rhs.AppointmentNo AS RunningNo, IsNull(rhs.CustomerLeadID,rhs.MemberLeadID) AS LeadID
                FROM ReservationHS rhs
            ) a
            inner join Lead b
                on b.LeadID = a.LeadID
    
    


    However, since the IsNull makes this pretty trivial, you can simply do:
    select a.AppointmentNo AS RunningNo,
            IsNull(a.CustomerLeadID,a.MemberLeadID) AS LeadID
            b.LeadFullName
        FROM ReservationHS a
            inner join Lead b
                on b.LeadID = IsNull(a.CustomerLeadID,a.MemberLeadID)
    
    


    Hope this helps.


    Thanks so much for your helps, baavgai
  2. In Topic: How to save data from gridview to another table ?

    Posted 13 Aug 2014

    Please help me .

    At least give me the links that teach how to do that ?

    Thanks
    tokei
  3. In Topic: How to save data from gridview to another table ?

    Posted 12 Aug 2014

    The tutorial there , there show gridview which load data from one table.

    But in my case , I have created gridview which have 3 column.

    1 column for checkbox, 1 column load data from another table, 1 column have dropdownlist which datasource from another table.

    Below is the illustration image
    Posted Image


    Database diagram
    Posted Image


    Sorry if you found resource, you can recommend link here. I am newbie

    Thanks
    tokei
  4. In Topic: How to save data from gridview to another table ?

    Posted 12 Aug 2014

    Thank you modi123_1 for help me.

    The language is C# , ASP.Net WebForm
    The zip file contains 2 images screenshot

    Thanks
    tokei
  5. In Topic: Can I customize the connectionstring ?

    Posted 10 Aug 2014

    Thanks for your help Skydiver

    tokei

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

tokei hasn't added any friends yet.

Comments

tokei has no profile comments yet. Why not say hello?