?
Solved

Sql Query returning Blanks

Posted on 2011-10-06
2
Medium Priority
?
293 Views
Last Modified: 2012-05-12
could anybody tell me the query where in a column if it just blank what query would i need to return these values

is it
where column name = ' '

John
0
Comment
Question by:pepps11976
2 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 2000 total points
ID: 36923312
Blank or null?

If null then:


where column is null

if bkank/null then:

where isnull(column, '') = ''

0
 

Author Comment

by:pepps11976
ID: 36923326
The column is blank this is my query so far  
SELECT [ih_doc]
      ,[ih_account]
      ,[ih_name]
      ,[ih_addr1]
      ,[ih_addr2]
      ,[ih_addr3]
      ,[ih_addr4]
      ,[ih_date]
      ,[ih_custref]
      ,[ih_desp]
      ,[ih_delad1]
      ,[ih_delad2]
      ,[ih_delad3]
      ,[ih_delad4]
      ,[ih_delad5]
      ,[ih_deladpc]
      ,[ih_ignore]
      ,[ih_sdis1]
      ,[ih_sdis2]
      ,[ih_odisc]
      ,[ih_narr1]
      ,[ih_narr2]
      ,[ih_prodate]
      ,[ih_quodate]
      ,[ih_credate]
      ,[ih_invdate]
      ,[ih_deldate]
      ,[ih_orddate]
      ,[ih_proform]
      ,[ih_quotat]
      ,[ih_invoice]
      ,[ih_credit]
      ,[ih_deliv]
      ,[ih_sorder]
      ,[ih_exvat]
      ,[ih_vat]
      ,[ih_sdays1]
      ,[ih_sdays2]
      ,[ih_samnt1]
      ,[ih_samnt2]
      ,[ih_overval]
      ,[ih_postacc]
      ,[ih_loc]
      ,[ih_docstat]
      ,[ih_memo]
      ,[ih_priorty]
      ,[ih_region]
      ,[ih_terrtry]
      ,[ih_route]
      ,[ih_due]
      ,[ih_revquo]
      ,[ih_revpro]
      ,[ih_revord]
      ,[ih_revdel]
      ,[ih_revinv]
      ,[ih_revcrn]
      ,[ih_prtstat]
      ,[ih_dcontr]
      ,[ih_scontr]
      ,[ih_econtr]
      ,[ih_fcurr]
      ,[ih_fcdec]
      ,[ih_fcval]
      ,[ih_fcrate]
      ,[ih_fcvat]
      ,[ih_addpc]
      ,[ih_delt]
      ,[ih_ntrn]
      ,[ih_mtrn]
      ,[ih_fcmult]
      ,[ih_edi]
      ,[ih_editx]
      ,[ih_edivn]
      ,[sq_user]
      ,[ih_raised]
      ,[ih_analsys]
      ,[ih_ebridge]
      ,[ih_ccard]
      ,[ih_expiry]
      ,[ih_cauth]
      ,[ih_cname]
      ,[ih_taxpoin]
      ,[ih_project]
      ,[ih_job]
      ,[ih_revchrg]
      ,[ih_validto]
      ,[ih_contid]
      ,[ih_ownerid]
      ,[ih_sprojid]
      ,[ih_status]
      ,[ih_prospec]
  FROM [DB_Opera_Copy].[dbo].[ihead]
  where ih_proform like '%PRO%'

Open in new window


and i want to add to the where "where ihsorder is blank"

john
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question