help! conversion of null int value to varchar()

help! conversion of null int value to varchar()

Post by Robert Zanatt » Sat, 18 Jul 1998 04:00:00

What I'm trying to accomplish is doing distributed transactions to another
server, and not having to hard wire the name of the other server into the
stored procedure (with a hundred SPs, and multiple setups, this will make
maintenance a lot easier).

For example, the procedure distrib_foo() would call foo() on another server

Since RemoteServer is dynamic, I'm assuming that the exec string needs to
be dynamically generated.  The remote server name can be pulled from a
local table.

I dynamically generate the exec string in a stored procedure using vars
passed into the stored procedure, i.e.:

via something like:

This works fine unless the stored procedure distrib_foo() is called with
NULL values for a parameter (which can be allowed).

For example, If parm2 is pass in as NULL:
   distrib_foo( 1, NULL, 2)

  exec 1, , 2

it fails.

  exec 1, NULL, 2

which works?  Or is there an easier way to use a dynamic name for the
remote server?



1. Conversion of Varchar for Numeric or Int!!!!

I have a Tabela Usuarios_seat as the following fields with your types of
data, using SQL SERVER 2000:

cod_tec - int
matricula - int
seg_ent - varchar(10)
ter_ent - varchar(10)
qua_ent - varchar(10)
qui_ent - varchar(10)
sex_ent - varchar(10)

He/she/you is table it is the picture of each technician's schedule with
your respective ones patient.

The one that I need:

The sum of the schedules of the fields seg_ent, ter_ent, qua_ent, qui_ent,
sex_ent of each Technician.

Would give to do this, because the field is varchar????


3. Conversion Int to Varchar

4. Database/library of text in VB4

5. Syntax error converting the varchar value to a column of data type int


7. concatenate int with varchar arg in Values clause?

8. Issue with Update Trigger's

9. null values in INT/FLOAT columns........

10. Inserting NULL values in to int Field in SQL

11. E_FAIL Status when accessing null valued varchar columns

12. don't get the decimal value when dividing int by int

13. Null values: Classic null value problem (?)