isnull wrong number of arg error

isnull wrong number of arg error

am 03.06.2006 01:34:22 von goomba

i am trying find whether or not a value in a field is null, but i keep
coming up with 'wrong number of arguments' error. as far as i am aware, the
isnull function takes two arguments, and those i have defined. im not sure
what else is wrong.

SELECT title, isnull(season, 'undefined') as season
FROM movies

the database im using is MS Access 2002.

thanks for any input!

Re: isnull wrong number of arg error

am 03.06.2006 14:36:08 von zac.carey

Does this work?

SELECT title,replace(ISNULL(hint),'1','Undefined') FROM movies;

Goomba wrote:
> i am trying find whether or not a value in a field is null, but i keep
> coming up with 'wrong number of arguments' error. as far as i am aware, the
> isnull function takes two arguments, and those i have defined. im not sure
> what else is wrong.
>
> SELECT title, isnull(season, 'undefined') as season
> FROM movies
>
> the database im using is MS Access 2002.
>
> thanks for any input!

Re: isnull wrong number of arg error

am 03.06.2006 16:27:51 von zac.carey

Oops,

I think I meant

SELECT title,replace(ISNULL(season),'1','Undefined') season FROM
movies;

but anyway, this is probably more appropriate:

SELECT title,coalesce(season,NULL,'undefined') season FROM movies;


strawberry wrote:
> Does this work?
>
> SELECT title,replace(ISNULL(hint),'1','Undefined') FROM movies;
>
> Goomba wrote:
> > i am trying find whether or not a value in a field is null, but i keep
> > coming up with 'wrong number of arguments' error. as far as i am aware, the
> > isnull function takes two arguments, and those i have defined. im not sure
> > what else is wrong.
> >
> > SELECT title, isnull(season, 'undefined') as season
> > FROM movies
> >
> > the database im using is MS Access 2002.
> >
> > thanks for any input!

Re: isnull wrong number of arg error

am 03.06.2006 23:11:08 von goomba

thanks for the response!

the first one
- SELECT title,replace(ISNULL(season),'1','Undefined') season -
i receive a missing operator error

the second one
- SELECT title,coalesce(season,NULL,'undefined') season -
i just get a database error.., but no information about it.

i am finding answers everywhere.., but when i apply them all i get is errors
with no information. i dont understand whats wrong.

i am also trying to do a case expression such as:
SELECT title, season
case when season is null then 'undefined'
end as season
FROM movies

i have tried different variations of the null such as = null, = '', i even
tried on other fields with numbers using <> and = and i still get "Error
Executing Database". i dont get it. =(



"strawberry" wrote in message
news:1149344871.276697.114140@j55g2000cwa.googlegroups.com.. .
> Oops,
>
> I think I meant
>
> SELECT title,replace(ISNULL(season),'1','Undefined') season FROM
> movies;
>
> but anyway, this is probably more appropriate:
>
> SELECT title,coalesce(season,NULL,'undefined') season FROM movies;
>
>
> strawberry wrote:
>> Does this work?
>>
>> SELECT title,replace(ISNULL(hint),'1','Undefined') FROM movies;
>>
>> Goomba wrote:
>> > i am trying find whether or not a value in a field is null, but i keep
>> > coming up with 'wrong number of arguments' error. as far as i am
>> > aware, the
>> > isnull function takes two arguments, and those i have defined. im not
>> > sure
>> > what else is wrong.
>> >
>> > SELECT title, isnull(season, 'undefined') as season
>> > FROM movies
>> >
>> > the database im using is MS Access 2002.
>> >
>> > thanks for any input!
>