Showing posts with label null. Show all posts
Showing posts with label null. Show all posts

Friday, March 30, 2012

How can I restore a field back to Null?

Hello,
I need to restore fields for records meeting a certain criteria back to
null. Is there a way to do this in a stored procedure?
dbuchanan
I figured it out.
\\
Update tbl040cmpt SET
cmSmallint08 = cmSmallint05,
cmSmallint04 = null
FROM tbl040cmpt
WHERE fkJob = 'd8779793-5f1a-4092-bad3-bf3ee5b50c3e'
//
dbuchanan

How can I restore a field back to Null?

Hello,
I need to restore fields for records meeting a certain criteria back to
null. Is there a way to do this in a stored procedure?
dbuchananI figured it out.
\\
Update tbl040cmpt SET
cmSmallint08 = cmSmallint05,
cmSmallint04 = null
FROM tbl040cmpt
WHERE fkJob = 'd8779793-5f1a-4092-bad3-bf3ee5b50c3e'
//
dbuchanansql

How can I restore a field back to Null?

Hello,
I need to restore fields for records meeting a certain criteria back to
null. Is there a way to do this in a stored procedure?
dbuchananI figured it out.
\\
Update tbl040cmpt SET
cmSmallint08 = cmSmallint05,
cmSmallint04 = null
FROM tbl040cmpt
WHERE fkJob = 'd8779793-5f1a-4092-bad3-bf3ee5b50c3e'
//
dbuchanan

Friday, March 23, 2012

How can I pass NULL to a parameter

How can I pass NULL to a parameter, if now entry is made in the textbox?

Dim KeywordParamAsNew SqlParameter("@.Keyword",Me.KeyWordText.Text)

MyCommand.Parameters.Add(KeywordParam)

Hi

You could try something like this:

If (Me.KeyWordText.Text="")Then cmd.Parameters("@.Keyword").Value = DBNull.ValueElse cmd.Parameters("@.Keyword").Value =Me.KeyWordText.Text
End If

How can I pass a null DataTime variable

How can I pass a null datetime?
Exampl
http://localhost/LUSReportService/RenderPDF.aspx?ReportName=MeetingNoticeMemorandum&RequestedBy=LISSHOC&Legislature=79&Session=R&CalendarDate=6/10/2005%2012:00:00%20AM&CalendarTime=Leave the parameter off
http://localhost/LUSReportService/RenderPDF.aspx?ReportName=MeetingNoticeMemorandum&RequestedBy=LISSHOC&Legislature=79&Session=R&CalendarDate=6/10/2005%2012:00:00%20AM
"Hugo" wrote:
> How can I pass a null datetime?
> Example
> http://localhost/LUSReportService/RenderPDF.aspx?ReportName=MeetingNoticeMemorandum&RequestedBy=LISSHOC&Legislature=79&Session=R&CalendarDate=6/10/2005%2012:00:00%20AM&CalendarTime=
>sql

Friday, March 9, 2012

how can I insert !

I have a following table :
CREATE TABLE [dbo].[defaultvalue] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[flag] AS ([id] + 1)
) ON [PRIMARY]
GO
I want to insert the data in it, how can I insert ?
Thanks
NOOR
Hi,
Use the DEFAULT VALUES along with insert statement.
insert into dbo.defaultvalue DEFAULT VALUES
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:OO38tPZXEHA.1888@.TK2MSFTNGP11.phx.gbl...
> I have a following table :
> CREATE TABLE [dbo].[defaultvalue] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [flag] AS ([id] + 1)
> ) ON [PRIMARY]
> GO
> I want to insert the data in it, how can I insert ?
> Thanks
> NOOR
>
|||Hi,
Use the DEFAULT VALUES along with insert statement.
insert into dbo.defaultvalue DEFAULT VALUES
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:OO38tPZXEHA.1888@.TK2MSFTNGP11.phx.gbl...
> I have a following table :
> CREATE TABLE [dbo].[defaultvalue] (
> [id] [int] IDENTITY (1, 1) NOT NULL ,
> [flag] AS ([id] + 1)
> ) ON [PRIMARY]
> GO
> I want to insert the data in it, how can I insert ?
> Thanks
> NOOR
>
|||Thanks Hari
Thanks
Noor
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23zRneCcXEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Use the DEFAULT VALUES along with insert statement.
> insert into dbo.defaultvalue DEFAULT VALUES
> --
> Thanks
> Hari
> MCDBA
> "Noor" <noor@.ngsol.com> wrote in message
> news:OO38tPZXEHA.1888@.TK2MSFTNGP11.phx.gbl...
>
|||Thanks Hari
Thanks
Noor
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23zRneCcXEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Use the DEFAULT VALUES along with insert statement.
> insert into dbo.defaultvalue DEFAULT VALUES
> --
> Thanks
> Hari
> MCDBA
> "Noor" <noor@.ngsol.com> wrote in message
> news:OO38tPZXEHA.1888@.TK2MSFTNGP11.phx.gbl...
>

Sunday, February 19, 2012

How can I find the allocated size of an index?

I ran sp_statistics on a table and the indexes were displayed along with the
SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
table and the indexes SIZE's remained NULL. So what's the trick to obtain the
size of an indexe's allocation?
Thanks
Michael
Snake wrote:
> I ran sp_statistics on a table and the indexes were displayed along
> with the SIZE of the table, but the index SIZE's are NULL. I ran
> statistics on the table and the indexes SIZE's remained NULL. So
> what's the trick to obtain the size of an indexe's allocation?
> Thanks
> Michael
See "Estimating the Size of a Table with a Clustered Index" in BOL for
all required calculations.
David Gugick
Imceda Software
www.imceda.com
|||Try using sp_MSindexspace. It's not documented but it's reasonably simple.
It will give the size on nonclustered indexes.
"Snake" <Snake@.discussions.microsoft.com> wrote in message
news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
>I ran sp_statistics on a table and the indexes were displayed along with
>the
> SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
> table and the indexes SIZE's remained NULL. So what's the trick to obtain
> the
> size of an indexe's allocation?
> Thanks
> Michael
|||Thanks Danny!
"DANNY SCROGGINS" wrote:

> Try using sp_MSindexspace. It's not documented but it's reasonably simple.
> It will give the size on nonclustered indexes.
>
> "Snake" <Snake@.discussions.microsoft.com> wrote in message
> news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
>
>

How can I find the allocated size of an index?

I ran sp_statistics on a table and the indexes were displayed along with the
SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
table and the indexes SIZE's remained NULL. So what's the trick to obtain the
size of an indexe's allocation?
Thanks
MichaelSnake wrote:
> I ran sp_statistics on a table and the indexes were displayed along
> with the SIZE of the table, but the index SIZE's are NULL. I ran
> statistics on the table and the indexes SIZE's remained NULL. So
> what's the trick to obtain the size of an indexe's allocation?
> Thanks
> Michael
See "Estimating the Size of a Table with a Clustered Index" in BOL for
all required calculations.
--
David Gugick
Imceda Software
www.imceda.com|||Try using sp_MSindexspace. It's not documented but it's reasonably simple.
It will give the size on nonclustered indexes.
"Snake" <Snake@.discussions.microsoft.com> wrote in message
news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
>I ran sp_statistics on a table and the indexes were displayed along with
>the
> SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
> table and the indexes SIZE's remained NULL. So what's the trick to obtain
> the
> size of an indexe's allocation?
> Thanks
> Michael|||Thanks Danny!
"DANNY SCROGGINS" wrote:
> Try using sp_MSindexspace. It's not documented but it's reasonably simple.
> It will give the size on nonclustered indexes.
>
> "Snake" <Snake@.discussions.microsoft.com> wrote in message
> news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
> >I ran sp_statistics on a table and the indexes were displayed along with
> >the
> > SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
> > table and the indexes SIZE's remained NULL. So what's the trick to obtain
> > the
> > size of an indexe's allocation?
> >
> > Thanks
> >
> > Michael
>
>

How can I find the allocated size of an index?

I ran sp_statistics on a table and the indexes were displayed along with the
SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
table and the indexes SIZE's remained NULL. So what's the trick to obtain th
e
size of an indexe's allocation?
Thanks
MichaelSnake wrote:
> I ran sp_statistics on a table and the indexes were displayed along
> with the SIZE of the table, but the index SIZE's are NULL. I ran
> statistics on the table and the indexes SIZE's remained NULL. So
> what's the trick to obtain the size of an indexe's allocation?
> Thanks
> Michael
See "Estimating the Size of a Table with a Clustered Index" in BOL for
all required calculations.
David Gugick
Imceda Software
www.imceda.com|||Try using sp_MSindexspace. It's not documented but it's reasonably simple.
It will give the size on nonclustered indexes.
"Snake" <Snake@.discussions.microsoft.com> wrote in message
news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
>I ran sp_statistics on a table and the indexes were displayed along with
>the
> SIZE of the table, but the index SIZE's are NULL. I ran statistics on the
> table and the indexes SIZE's remained NULL. So what's the trick to obtain
> the
> size of an indexe's allocation?
> Thanks
> Michael|||Thanks Danny!
"DANNY SCROGGINS" wrote:

> Try using sp_MSindexspace. It's not documented but it's reasonably simple
.
> It will give the size on nonclustered indexes.
>
> "Snake" <Snake@.discussions.microsoft.com> wrote in message
> news:FA336D35-BB8C-4172-8AA7-919DFC96759A@.microsoft.com...
>
>