+ Reply to Thread
Results 1 to 8 of 8

Need Help for correcting a SQL Query

  1. #1
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Need Help for correcting a SQL Query

    Hi All,

    i am trying to extract data from PUR REG CO Table by writing below query but its displaying nothing..

    anyone plz can rectify this..

    Please Login or Register  to view this content.
    what my condition is creditdt should be blanks & rejdate should be (14/06/2013 & as well as blanks) & trtype should be (does not end with R)
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need Help for correcting a SQL Query

    Hi,

    Did you try executing this query with only 1 condition for [creditdt]="" ?
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,769

    Re: Need Help for correcting a SQL Query

    Change your blanks "" to Null. Access doesn't recognize "" as Null but as a string with nothing displayed. When you use a wildcard, you need to precede it with a Like or Not Like.

    Is your field for rejdate text? If not, then remove the quotation marks, and replace them with hash tags # so the where statement looks like this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need Help for correcting a SQL Query

    Sir

    Thanks for quick response..

    i tried whatever statement u have given but its displaying nothing...

  5. #5
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need Help for correcting a SQL Query

    Thank you for your support sir

    i changed that statement with below statement and its working fine...

    Please Login or Register  to view this content.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,769

    Re: Need Help for correcting a SQL Query

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need Help for correcting a SQL Query

    Sir one more thing

    everyday i am manually changing the date, is there any way so that query can take current date or yesterday day....

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,769

    Re: Need Help for correcting a SQL Query

    Instead of inputting the date manually, change it to Date()

    This is equivalent to the Today() function in Excel.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Correcting formula
    By mistral in forum Excel General
    Replies: 1
    Last Post: 08-11-2006, 08:50 AM
  2. Correcting a #REF!
    By David Hauck in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-20-2005, 01:20 PM
  3. [SOLVED] need help in correcting the formula
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 07:05 AM
  4. [SOLVED] need help in correcting the formula
    By JE McGimpsey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] need help in correcting the formula
    By azmi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1