Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select (SQL) -- field does not accept NULL values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00692839
Message ID:
00693045
Vues:
18
>Hello,
>
>I got an error and I am trying to understand why this is a problem.
>
>For example if I run the following code
lcName='Kevin Emmrich'
select lcName, pk from usersecurity into cursor temp  && works fine
lcName = .NULL.
select lcName, pk from usersecurity into cursor temp  && error
>
>When I set lcName to NULL I get the error ' does
>not accept null values'. Why wouldn't the sql*select just
>create a field in temp that can accept nulls. Is the problem
>that the sql*select can't figure out the data type even though
>it is a "C"?

Also, it can't figure out how wide to make the field. A .NULL. has no data type of its own, so SQL shouldn't try to guess what it means.

I tried to fake it out by doing
SELECT SPACE(20), 0 FROM usersecurity UNION ;
select lcName, pk from usersecurity into cursor temp
but got the same error.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform