Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:32:33+00:00 2026-06-12T14:32:33+00:00

I have got one field column called ‘ id ‘ in the Oracle database,

  • 0

I have got one field column called ‘id‘ in the Oracle database, the value of ‘id’ can be null or 2-space(i.e. ” “) string. That field value is mapped by a third party application (Serena Business Manager). I am supposed to write a javascript to tell whether the field is null or with 2 spaces.

I tried so by the javascript statement:

if(id === '')
{
     doSomething()
}

This will allow those ‘id’s with a null value in the database pass. So here is the question: how to let string with spaces(not necessarily two) in the database pass a javascript ‘if’ statement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:32:35+00:00Added an answer on June 12, 2026 at 2:32 pm

    In Oracle, there is no difference between a NULL and an empty string. The empty string is NULL. You can’t differentiate between the two in code because you can’t differentiate between them in the database.

    There is another thread on StackOverflow where we discuss why Oracle treats the empty string as NULL despite the fact that the ANSI standard specifies that the two should be treated differently.

    Since it sounds like you’re actually not looking for empty strings but for strings with two spaces

    if(id === '' || id == '  ')
    {
         doSomething()
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a database with one field that contains a comma delimited list that
i have done some learning on struts based on one project that i got.Now
I've got a class with many string arrays. I'd like to have one generic
One of my entities Machinery has got a String property called notes . JPA
I have got a column of type DATE in my Oracle DB. 06.09.12 is
i've got a jquery datatable (http://www.datatables.net/), and one column has a largish text field.
I've got an MS SQL database with 3 inherent tables. A general one called
I've got a table that has a column where the codes are a string
I've got an asp.net gridview inside an updatepanel. One of the fields I have
I have got one weird issue. I am working on an asp .net mvc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.