473,466 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Plz convert NZ() function of access queries to equivalent stored procedure

2 New Member
Hi,
can anybody convert below access NZ()function(Access Queries) to stored procedure:
nz([t_activity_brand]![price_off_amount2]*[t_activity_brand]![nb_std_bt_planned2],0) AS po_x_nb_bt_planned


Thanks!

shovan
Oct 10 '07 #1
2 2568
Jim Doherty
897 Recognized Expert Contributor
Hi,
can anybody convert below access NZ()function(Access Queries) to stored procedure:
nz([t_activity_brand]![price_off_amount2]*[t_activity_brand]![nb_std_bt_planned2],0) AS po_x_nb_bt_planned


Thanks!

shovan
You could overall create a generic user defined function in your SQL server that traps the null converts it and returns a zero value output (this way you would wrap your field with the function and be able to return its value as part of your SQL block in a query) It would also be available obviously for use elsewhere within your system

OR

you could use the CASE expression construct to provide the same result within the body of your stored procedure ie:

Expand|Select|Wrap|Line Numbers
  1. CASE [price_off_amount2] WHEN IS NULL THEN 0 ELSE [price_off_amount2] END
I'll leave you to adapt this logic to your circumstances

If you get stuck get back to me

Regards

Jim
Oct 10 '07 #2
FishVal
2,653 Recognized Expert Specialist
Hi, shovan.

As far as I know some dialects of SQL (e.g. TSQL) support COALESCE function.
http://msdn2.microsoft.com/en-us/library/ms190349.aspx
Oct 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: William Buchanan | last post by:
Hi I have the following stored proc in interbase (which might contain errors - i'm doing it off the top of my head), which I would like to convert into oracle. Can you help? What I want back is...
29
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them...
25
by: cory | last post by:
Hi, I have an Access database and am having an ASP.NEt application written for it. It is almost complete. I have a hosting company that I signed up with a month ago but before I did anything I...
3
by: CFW | last post by:
I have a view (Access .adp fronte end and SQL Server back) that retrieves a currency field from a table that is sometimes a NULL value. That view is the RowSource for a List box that displays the...
4
by: MX1 | last post by:
Help. I have a complex Access database that I've tied into using ASP. Things work great, except I can't seem to have queries that originate in ASP use the NZ function. Need it in case there are...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
42
by: lylefair | last post by:
The file is now available as http://www.ffdba.com/downloads/testingNZ3.dat (rename .dat to .mdb) or http://www.ffdba.com/downloads/testingNZ3.mdb (At time of posting I have not opened the file.)
1
by: shovan mohanty | last post by:
Hi , Can anybody convert below access query into equivalent stored procedure. Also please advice in the below query,user defined function of VBA i.e anneeSelection41510() has been used in the...
2
by: rahuldev999 | last post by:
Hi Can anyone please convert the below access query to the equivalent stored procedure.No problem with the IIF() function but the condition in the "where" clause making problem.so please put some...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.