• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

Software Error message switching from MSDE to SQL database

We have developed a software package which makes calls to an MSDE database.  A few of them needed something more robust so we install SQL.  Now we are getting call errors to the database.  
Here is a copy of the code.
SELECT     1 AS SORT_ORDER, ISNULL(ZONE_ID, '') AS ZONE_ID
FROM         PRICE_ZONE
WHERE     COUNTRY_CD = 'USA' AND STATE_CD = 'FL' AND COUNTY_NM = 'CLAY'
UNION
SELECT     2 AS SORT_ORDER, ZONE_ID
FROM         PRICE_ZONE
WHERE     COUNTRY_CD = 'USA' AND STATE_CD = 'FL'
ORDER BY SORT_ORDER, ZONE_ID

Any suggestions?
 
0
sjmeiners
Asked:
sjmeiners
  • 2
  • 2
  • 2
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
SQL uses COALESCE(ZONE_ID, '') and not ISNULL(ZONE_ID, '')
Other than that it looks fine.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Now we are getting call errors to the database.  
which errors?

0
 
sjmeinersAuthor Commented:
Thanks Jimhorn.  If we change it to COALESCE(ZONE_ID, '') will that work for MSDE databases also?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>If we change it to COALESCE(ZONE_ID, '') will that work for MSDE databases also?
Not sure, as I've not done an MSDE project.  You'd have to test it.
0
 
sjmeinersAuthor Commented:
Thanks jimhorn
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
just to confirm that COALESCE() will also work in MSDE.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now