Question : SQL Server BIT field true and false

I have a field in a  table in sql server it is of type BIT

I am trying to do an insert in  a stored procedure

BEGIN

INSERT INTO dbo.AccessCodes
(
      AccessCode,
      CodeType,
    Active,
      Assigned
)
VALUES
(
   @AccessCode,
   @BillingMethod,
   true
)
END

I get an error message

The name "true" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

I went with 1 and 0

BEGIN

INSERT INTO dbo.AccessCodes
(
      AccessCode,
      CodeType,
    Active
)
VALUES
(
   @AccessCode,
   @BillingMethod,
   1
)
END

Later I want to query

select * from accesscodes where active =false
and get

Invalid column name 'false'.

The column is definitly bit

CREATE TABLE [dbo].[AccessCodes](
      [AccessCode] [varchar](10),
      [CodeType] [varchar](1),
      [Active] [bit] NULL,
....
....
)

What am I doing wrong?  I did try UPPERCASE TRUEand FALSE as well



Answer : SQL Server BIT field true and false

What I believe your going to end up doing is creating a conditional CSS statement for IE 7 by itself so that it obeys.  As the article says, IE 7 uses a Z-index stack that starts @ 0.  

It says to set the parent, because your dropdown is inside of that parent DIV.  So logically it should affect the children as well.

Random Solutions  
 
programming4us programming4us