REGISTER
|
Search Tycoon Talk
|
Freelancer.com
|
Members
Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.
Register Here
Forum Rules
The Database Forum
You are currently viewing our The Database Forum as a guest. Please
register
to participate.
Login
Remember Me?
Login via Freelancer.com
Tycoon Talk
>
Web Administration Support
>
The Database Forum
>
IF Statement
Link Back
Thread Tools
Search this Thread
IF Statement
12-04-2007, 10:27 AM
#
1
(
permalink
)
IF Statement
GemmaLouise1988
Junior Talker
Posts: 3
Trades:
0
Talkupation:
hello
i am trying to get my database so that if the number in a column = to 0 or below it will then display out of stock
so far i have got this but it wont work
=IIf([quantity]="0","out of stock")
Register
now for full access!
12-04-2007, 10:35 AM
#
2
(
permalink
)
Re: IF Statement
hamesy
Webmaster Talker
Posts: 639
Name: Steve
Location: Birmingham, England
Trades:
0
Talkupation:
A little more information would be useful, ie what database are you using? What language are you using? etc.
You might get a few more replies if you add more information.
__________________
Hamesy
Please login or register to view this content.
Registration is FREE
Please login or register to view this content.
Registration is FREE
12-04-2007, 10:38 AM
#
3
(
permalink
)
Re: IF Statement
GemmaLouise1988
Junior Talker
Posts: 3
Trades:
0
Talkupation:
i am using microsoft excel 2000
12-04-2007, 10:38 AM
#
4
(
permalink
)
Re: IF Statement
GemmaLouise1988
Junior Talker
Posts: 3
Trades:
0
Talkupation:
ooops sorry
i mean microsoft access 2000
12-04-2007, 03:09 PM
#
5
(
permalink
)
Re: IF Statement
chrishirst
Missing! presumed drunk.
Latest Blog Post:
A Simple DHTML Tabbed Interface
Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades:
0
Talkupation:
"0" is a string which != 0 (zero)
__________________
Chris. ->>
Links are
advertising
NOT
optimising
!!
<<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
12-04-2007, 06:41 PM
#
6
(
permalink
)
Re: IF Statement
Learning Newbie
Defies a Status
Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades:
0
Talkupation:
I was about to say what Chris said. If it's a number column, the db will probably do an implicit conversion to make it work, but "0" != 0.
Also, it's clear this is Access, because SQL Server supports the if statement, but not iif.
If this is for a web application, you're better off just returning quantity to the page and letting it decide what text to send down to the client.
__________________
Please login or register to view this content.
Registration is FREE
Please login or register to view this content.
Registration is FREE
« Reply to
IF Statement
Previous Thread
|
Next Thread
Tycoon Talk
>
Web Administration Support
>
The Database Forum
>
IF Statement
Thread Tools
Search this Thread
Show Printable Version
Email this Page
Search this Thread
:
Advanced Search
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
Off
Pingbacks
are
Off
Refbacks
are
Off
Forum Rules
Feeds:
RSS
JS
XML
Feeds for this forum:
RSS
JS
XML
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Tweet this thread
Page generated in
0.66771
seconds with
12
queries