69 users online (0 members and 69 guests)  

Thread: Select Query


  Results 1 to 3 of 3

Related

  1. Replies: 5
  2. Propogating select box    Forum: PHP Forum
    Replies: 0
  3. CSS and select    Forum: CSS Forum
    Replies: 1
  4. links and select box    Forum: CGI Perl Forum
    Replies: 0
  5. Replies: 2
  1. #1
    jigi_27's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2008
    Posts
    1

    Select Query

    i have a two fields

    Schedule1 and Schedule2 and i want a query in to delete a row which have a record in schedule 1 and schedule 2 also
    for example
    Schedule1 Schedule2

    Branch / Divisions NULL
    Capital Account NULL
    Current Assets NULL
    Current Liabilities NULL
    Expenses Direct NULL
    Expenses InDirect NULL
    Fixed Assets NULL
    Income Direct NULL
    Income Indirect NULL
    Investments NULL
    Loans (Liabilities) NULL
    Misc. Expenses (Asset) NULL
    Suspense Account NULL
    Purchase Account NULL
    Sales Account NULL
    Reserves & Surplus Capital Account
    Deposits (Asset) Current Assets
    Loans & Advances Current Assets
    Stock-in-hand Current Assets
    Sundry Debtors Current Assets
    Cash-in-hand Current Assets
    Bank Accounts Current Assets
    Duties & Taxes Current Liabilities
    Provisions Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Bank OD accounts Loans (Liabilities)
    Secured Loans Loans (Liabilities)
    UnSecured Loans Loans (Liabilities)

    and i want result like below from query/procedure
    red color row should be deleted beacuse
    Schedule1 ' data same in schedule 2

    Schedule1 Schedule2

    Branch / Divisions NULL

    Capital Account NULL
    Current Assets NULL
    Current Liabilities NULL

    Expenses Direct NULL
    Expenses InDirect NULL
    Fixed Assets NULL
    Income Direct NULL
    Income Indirect NULL
    Investments NULL
    Loans (Liabilities) NULL
    Misc. Expenses (Asset) NULL
    Suspense Account NULL
    Purchase Account NULL
    Sales Account NULL
    Reserves & Surplus Capital Account
    Deposits (Asset) Current Assets
    Loans & Advances Current Assets
    Stock-in-hand Current Assets
    Sundry Debtors Current Assets
    Cash-in-hand Current Assets
    Bank Accounts Current Assets
    Duties & Taxes Current Liabilities
    Provisions Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Sundry Creditors Current Liabilities
    Bank OD accounts Loans (Liabilities)
    Secured Loans Loans (Liabilities)
    UnSecured Loans Loans (Liabilities)


    i think u got it
    please reply
    its urgent

    Thanks

  2. #2
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: Select Query

    DELETE FROM table WHERE Schedule1 IN (SELECT Schedule2 FROM table WHERE Schedule2 IS NOT NULL GROUP BY Schedule2)

  3. #3
    Girishchouhan5's Avatar
    Disabled

    Status
    Offline
    Join Date
    Sep 2014
    Posts
    10

    Re: Select Query

    select * from table name where name ("value")



Tags for this Thread