Buy Questpond's video subscriptions on
huge discount
.
Online: 10996
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
Sql Server
>
Loading ...
how to fill value in colu;mn is active
Posted by
Shanky11
under
Sql Server
on 3/22/2013 |
Points: 10
| Views : 1913 | Status :
[Member]
| Replies : 7
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
u have a table in sql server in it ;columns are
message id ,message chapter ,session, word ,is Active
I have to fill data in it
how can i fill data to isActive column
session chapter word can be null so leave it
mesasage id is unique identifier
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
.Netlearner
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
Hello,
Can you please make your question more clear. Do you need a query to insert data in the table
as follows ?
MessageID|MessageChapter|Session|Word|IsActive
----------------------------------------------------------------------
1 null null null 1
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
.Netlearner
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
And the "IS Active" Column is of what datatype? is that boolean?
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Shanky11
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
yes i need to fill this row by my own
message id ,message ,chapter ,session,word,is Active
chapter ,session,word these columns can be null
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Shanky11
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
bit
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
.Netlearner
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
Use the following Query,Just enter 0 or 1 value for Is Active Field.
U can either specify the values for chapter,session,word nor just dont mention as those fields allow null.
insert into tblname values(1,''message','chapter',session','word',0)
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Shanky11
on: 3/22/2013
[Member]
Starter
|
Points: 25
0
see what am i doing
i m fillingmessage column and message id is unique identifier so no need to fill this chapter sesso=ion word are null
isActive i tried 0,1 but it shoing error
strng was not recognised as valid boolean
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Jayakumars
on: 3/22/2013
[Member]
[MVP]
Bronze
|
Points: 25
0
Try this Code.
-- Set which Field Do u need null put allow null option in sql Table Design
--Table Script and Insert Query
CREATE TABLE [dbo].[Table10](
[Id] [int] IDENTITY(1,1) NOT NULL,
[MessageID] [varchar](50) NULL,
[MessageChapter] [varchar](50) NULL,
[IsActive] [bit] NULL,
CONSTRAINT [PK_Table10] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Insert INTO Table10 VALUES('Test2','TestChapter2',NULL)
--Mark as answer if it is useful to u
Mark as Answer if its helpful to you
Kumaraspcode2009@gmail.com
Shanky11
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...