What I'm I missing?
-
Hi all, I've created a website the is using SQL 2000/SQL2005 as the back end and I've been tasked to take the catalog I've build for the website and allow it to be ran on a CD. So With the CD version of the website I'm using a Access 2003 database, but for some reason my T-SQL queries wont work with Access. I have a bit field in my SQL database that I use as an Active flag. Access use a "Yes/No" field for this and I'm not sure why the query isn't working. I did notice that Access uses -1/0 and not 1/0, so I changed my query to reflect this:
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE (Active) = -1)Is there any reason why this wouldn't work?
-
Hi all, I've created a website the is using SQL 2000/SQL2005 as the back end and I've been tasked to take the catalog I've build for the website and allow it to be ran on a CD. So With the CD version of the website I'm using a Access 2003 database, but for some reason my T-SQL queries wont work with Access. I have a bit field in my SQL database that I use as an Active flag. Access use a "Yes/No" field for this and I'm not sure why the query isn't working. I did notice that Access uses -1/0 and not 1/0, so I changed my query to reflect this:
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE (Active) = -1)Is there any reason why this wouldn't work?
I see two closing parenthesis )) and only 1 open parenthesis. (
-
I see two closing parenthesis )) and only 1 open parenthesis. (
*slaps forehead* I should have seen that. But changing it to this doesn't work either. I tried all of the following and none seem to work.
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE ((Active) = -1)or
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE ((Active) = TRUE)or
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE (Active = TRUE) -
Hi all, I've created a website the is using SQL 2000/SQL2005 as the back end and I've been tasked to take the catalog I've build for the website and allow it to be ran on a CD. So With the CD version of the website I'm using a Access 2003 database, but for some reason my T-SQL queries wont work with Access. I have a bit field in my SQL database that I use as an Active flag. Access use a "Yes/No" field for this and I'm not sure why the query isn't working. I did notice that Access uses -1/0 and not 1/0, so I changed my query to reflect this:
SELECT *
FROM tblWeb_E_Catalog_Categories
WHERE (Active) = -1)Is there any reason why this wouldn't work?
Hi,
... WHERE NOT (Active = 0)
might work for both database systems. :)Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
-
Hi,
... WHERE NOT (Active = 0)
might work for both database systems. :)Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
Holy smokes Batman... it worked! Thanks!!!
-
Holy smokes Batman... it worked! Thanks!!!
You're welcome. :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.