Hi,
When I qury data form a View, the system say that :
The are smallint overload in RECORD=RECORD=4891467
How can I get the 4891467th record?Hi
Smallint will hold values between -32,768 and 32,767. It is not clear where
your conversion to smallint is occurring as you have not posted DDL, but you
could use CAST to force it to be converted to int or bigint.
John
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:e4DoKsfYGHA.4884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> When I qury data form a View, the system say that :
> The are smallint overload in RECORD=RECORD=4891467
> How can I get the 4891467th record?
>
Showing posts with label system. Show all posts
Showing posts with label system. Show all posts
Wednesday, March 28, 2012
How to show the ##th record.
Hi,
When I qury data form a View, the system say that :
The are smallint overload in RECORD=RECORD=4891467
How can I get the 4891467th record?Hi
Smallint will hold values between -32,768 and 32,767. It is not clear where
your conversion to smallint is occurring as you have not posted DDL, but you
could use CAST to force it to be converted to int or bigint.
John
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:e4DoKsfYGHA.4884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> When I qury data form a View, the system say that :
> The are smallint overload in RECORD=RECORD=4891467
> How can I get the 4891467th record?
>
When I qury data form a View, the system say that :
The are smallint overload in RECORD=RECORD=4891467
How can I get the 4891467th record?Hi
Smallint will hold values between -32,768 and 32,767. It is not clear where
your conversion to smallint is occurring as you have not posted DDL, but you
could use CAST to force it to be converted to int or bigint.
John
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:e4DoKsfYGHA.4884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> When I qury data form a View, the system say that :
> The are smallint overload in RECORD=RECORD=4891467
> How can I get the 4891467th record?
>
Monday, March 26, 2012
How to show all aliases in SQL 7 ?
Does anybody know a command that shows ALL aliases on the database?
Or could I search for them in the system table and make a SELECT for them?
pls. helpRE: Q1 Does anybody know a command that shows ALL aliases on the database?
Or could I search for them in the system table and make a SELECT for them?
pls. help
A1 To get the alias [member] or user status for each login on a Sql Server run:
exec sp_helplogins
If run without specifing a login, the information will appear in the last column (UserOrAlias) of the second result set that the sp_helplogins stored proc returns.
Or could I search for them in the system table and make a SELECT for them?
pls. helpRE: Q1 Does anybody know a command that shows ALL aliases on the database?
Or could I search for them in the system table and make a SELECT for them?
pls. help
A1 To get the alias [member] or user status for each login on a Sql Server run:
exec sp_helplogins
If run without specifing a login, the information will appear in the last column (UserOrAlias) of the second result set that the sp_helplogins stored proc returns.
How to share user-defined data type in different database?
Hi,everyone.
I have defined a data type "OC_BUN_NAME" in database "CVPRO". I want to create a table tempdb.dbo.CVPRO in SQL SERVER 2005 system Database tempdb. But SQL SERVER 2005 DBMS gives a Error Messages:"Can not find the data type OC_BUN_NAME".
How can I do? How to use data types in the other database?
Please give me some advice. Thank you in advance.Hi
You should define the same data type in tempdb.
Also it would be good to define it in model database.
The tempdb is destroyed and recreated (from model) after each SQL Server restart. So if you define your data type in model database you do not have to redefine it in tempdb each time you reboot the server or restart SQL Server service.
Regards,
Kris Zywczyk|||Follow Kris, and also FYI,
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm (http://vyaskn.tripod.com/sql_server_administration_best_practices.htm)|||Thank you,Kris Zywczyk.
Thank you, rudra.
However, after I define my data types in MODEL system databse, if I create a new database, the defined data types will automatically be added into the new database. I hope it can not happen. How can I do?
Thank you!|||Why do you want to create any tables in tempdb?|||Good lord. Don't even touch tempdb.
And in my opinion, don't bother with user-defined datatypes. They have little purpose.|||In SQL Server 2005, we can create a table in tempdb database so that different users can get access to data in the table. At the same time, when the SQL Server Services stop, tables created in tempdb database will be automatically destroyed. So in our project we want ot create a table in the tempdb database. However when we create the table, we can not use user-defined data type(the data types are defined in database "CVPRO"). Please give me some help.
Thanks!|||Hi
If you want to use user-defined data type you need to define it in current database (database where you create the table).
Can't you use standard tables in your 'CVPRO' database and delete it when it is not used?
You can always create the SQL Server Agent job dropping not needed tables and schedule it to run daily at i.e. 11 PM...
What exactly you want to do?
I have defined a data type "OC_BUN_NAME" in database "CVPRO". I want to create a table tempdb.dbo.CVPRO in SQL SERVER 2005 system Database tempdb. But SQL SERVER 2005 DBMS gives a Error Messages:"Can not find the data type OC_BUN_NAME".
How can I do? How to use data types in the other database?
Please give me some advice. Thank you in advance.Hi
You should define the same data type in tempdb.
Also it would be good to define it in model database.
The tempdb is destroyed and recreated (from model) after each SQL Server restart. So if you define your data type in model database you do not have to redefine it in tempdb each time you reboot the server or restart SQL Server service.
Regards,
Kris Zywczyk|||Follow Kris, and also FYI,
http://vyaskn.tripod.com/sql_server_administration_best_practices.htm (http://vyaskn.tripod.com/sql_server_administration_best_practices.htm)|||Thank you,Kris Zywczyk.
Thank you, rudra.
However, after I define my data types in MODEL system databse, if I create a new database, the defined data types will automatically be added into the new database. I hope it can not happen. How can I do?
Thank you!|||Why do you want to create any tables in tempdb?|||Good lord. Don't even touch tempdb.
And in my opinion, don't bother with user-defined datatypes. They have little purpose.|||In SQL Server 2005, we can create a table in tempdb database so that different users can get access to data in the table. At the same time, when the SQL Server Services stop, tables created in tempdb database will be automatically destroyed. So in our project we want ot create a table in the tempdb database. However when we create the table, we can not use user-defined data type(the data types are defined in database "CVPRO"). Please give me some help.
Thanks!|||Hi
If you want to use user-defined data type you need to define it in current database (database where you create the table).
Can't you use standard tables in your 'CVPRO' database and delete it when it is not used?
You can always create the SQL Server Agent job dropping not needed tables and schedule it to run daily at i.e. 11 PM...
What exactly you want to do?
Wednesday, March 7, 2012
How to Set Max Memory?
I don't have much (if any) experiance running an SQL server. I
currently have Windows SBS2k installed with 2gb of memory for the
system. I would like to install more, but my budget doesn't allow for
it at the moment.
I know there is a way to set the max memory an SQL instance can use,
but I can't find a real step by step instruction.
The server is running SBS 2k3 standard, so its only the SQL desktop
edition.
First thing I need to know is how I know what instance is associated
w/ what PID.
Next, I need some hand holding on what I need to do to set the max
memory.
Any help would be appreciated.
Thanks!You could execute the following statements in Query
Analyzer, osql or whatever you get with that version of SBS:
select serverproperty('ProcessID')
will give you the PID for the instance you are logged into.
sp_configure 'max server memory', 1024
will set the max server memory to 1024 MB (1 GB)
-Sue
On 12 Feb 2007 20:40:26 -0800, trump26901@.gmail.com wrote:
>I don't have much (if any) experiance running an SQL server. I
>currently have Windows SBS2k installed with 2gb of memory for the
>system. I would like to install more, but my budget doesn't allow for
>it at the moment.
>I know there is a way to set the max memory an SQL instance can use,
>but I can't find a real step by step instruction.
>The server is running SBS 2k3 standard, so its only the SQL desktop
>edition.
>First thing I need to know is how I know what instance is associated
>w/ what PID.
>Next, I need some hand holding on what I need to do to set the max
>memory.
>
>Any help would be appreciated.
>Thanks!|||Adding to Sue we can use SP_WHO to find out in detail which user with with
pid and to which database and server instance there is an activity.
"Sue Hoegemeier" wrote:
> You could execute the following statements in Query
> Analyzer, osql or whatever you get with that version of SBS:
> select serverproperty('ProcessID')
> will give you the PID for the instance you are logged into.
> sp_configure 'max server memory', 1024
> will set the max server memory to 1024 MB (1 GB)
> -Sue
> On 12 Feb 2007 20:40:26 -0800, trump26901@.gmail.com wrote:
> >I don't have much (if any) experiance running an SQL server. I
> >currently have Windows SBS2k installed with 2gb of memory for the
> >system. I would like to install more, but my budget doesn't allow for
> >it at the moment.
> >
> >I know there is a way to set the max memory an SQL instance can use,
> >but I can't find a real step by step instruction.
> >
> >The server is running SBS 2k3 standard, so its only the SQL desktop
> >edition.
> >
> >First thing I need to know is how I know what instance is associated
> >w/ what PID.
> >
> >Next, I need some hand holding on what I need to do to set the max
> >memory.
> >
> >
> >Any help would be appreciated.
> >Thanks!
>|||On Feb 13, 12:20 am, Sue Hoegemeier <S...@.nomail.please> wrote:
> You could execute the following statements in Query
> Analyzer, osql or whatever you get with that version of SBS:
> select serverproperty('ProcessID')
> will give you the PID for the instance you are logged into.
> sp_configure 'max server memory', 1024
> will set the max server memory to 1024 MB (1 GB)
> -Sue
> On 12 Feb 2007 20:40:26 -0800, trump26...@.gmail.com wrote:
>
> >I don't have much (if any) experiance running an SQL server. I
> >currently have Windows SBS2k installed with 2gb of memory for the
> >system. I would like to install more, but my budget doesn't allow for
> >it at the moment.
> >I know there is a way to set the max memory an SQL instance can use,
> >but I can't find a real step by step instruction.
> >The server is running SBS 2k3 standard, so its only the SQL desktop
> >edition.
> >First thing I need to know is how I know what instance is associated
> >w/ what PID.
> >Next, I need some hand holding on what I need to do to set the max
> >memory.
> >Any help would be appreciated.
> >Thanks!- Hide quoted text -
> - Show quoted text -
well that sounds nice and simple. I"ve gotta make my way to work now
so I"ll try it out in about two hours and keep my fingers crossed.
Thanks for the help.
currently have Windows SBS2k installed with 2gb of memory for the
system. I would like to install more, but my budget doesn't allow for
it at the moment.
I know there is a way to set the max memory an SQL instance can use,
but I can't find a real step by step instruction.
The server is running SBS 2k3 standard, so its only the SQL desktop
edition.
First thing I need to know is how I know what instance is associated
w/ what PID.
Next, I need some hand holding on what I need to do to set the max
memory.
Any help would be appreciated.
Thanks!You could execute the following statements in Query
Analyzer, osql or whatever you get with that version of SBS:
select serverproperty('ProcessID')
will give you the PID for the instance you are logged into.
sp_configure 'max server memory', 1024
will set the max server memory to 1024 MB (1 GB)
-Sue
On 12 Feb 2007 20:40:26 -0800, trump26901@.gmail.com wrote:
>I don't have much (if any) experiance running an SQL server. I
>currently have Windows SBS2k installed with 2gb of memory for the
>system. I would like to install more, but my budget doesn't allow for
>it at the moment.
>I know there is a way to set the max memory an SQL instance can use,
>but I can't find a real step by step instruction.
>The server is running SBS 2k3 standard, so its only the SQL desktop
>edition.
>First thing I need to know is how I know what instance is associated
>w/ what PID.
>Next, I need some hand holding on what I need to do to set the max
>memory.
>
>Any help would be appreciated.
>Thanks!|||Adding to Sue we can use SP_WHO to find out in detail which user with with
pid and to which database and server instance there is an activity.
"Sue Hoegemeier" wrote:
> You could execute the following statements in Query
> Analyzer, osql or whatever you get with that version of SBS:
> select serverproperty('ProcessID')
> will give you the PID for the instance you are logged into.
> sp_configure 'max server memory', 1024
> will set the max server memory to 1024 MB (1 GB)
> -Sue
> On 12 Feb 2007 20:40:26 -0800, trump26901@.gmail.com wrote:
> >I don't have much (if any) experiance running an SQL server. I
> >currently have Windows SBS2k installed with 2gb of memory for the
> >system. I would like to install more, but my budget doesn't allow for
> >it at the moment.
> >
> >I know there is a way to set the max memory an SQL instance can use,
> >but I can't find a real step by step instruction.
> >
> >The server is running SBS 2k3 standard, so its only the SQL desktop
> >edition.
> >
> >First thing I need to know is how I know what instance is associated
> >w/ what PID.
> >
> >Next, I need some hand holding on what I need to do to set the max
> >memory.
> >
> >
> >Any help would be appreciated.
> >Thanks!
>|||On Feb 13, 12:20 am, Sue Hoegemeier <S...@.nomail.please> wrote:
> You could execute the following statements in Query
> Analyzer, osql or whatever you get with that version of SBS:
> select serverproperty('ProcessID')
> will give you the PID for the instance you are logged into.
> sp_configure 'max server memory', 1024
> will set the max server memory to 1024 MB (1 GB)
> -Sue
> On 12 Feb 2007 20:40:26 -0800, trump26...@.gmail.com wrote:
>
> >I don't have much (if any) experiance running an SQL server. I
> >currently have Windows SBS2k installed with 2gb of memory for the
> >system. I would like to install more, but my budget doesn't allow for
> >it at the moment.
> >I know there is a way to set the max memory an SQL instance can use,
> >but I can't find a real step by step instruction.
> >The server is running SBS 2k3 standard, so its only the SQL desktop
> >edition.
> >First thing I need to know is how I know what instance is associated
> >w/ what PID.
> >Next, I need some hand holding on what I need to do to set the max
> >memory.
> >Any help would be appreciated.
> >Thanks!- Hide quoted text -
> - Show quoted text -
well that sounds nice and simple. I"ve gotta make my way to work now
so I"ll try it out in about two hours and keep my fingers crossed.
Thanks for the help.
Friday, February 24, 2012
How to set default date in SQL to
somthing other than 1/1/1900? I use Visual Studio.NET and Aspx.
Even if I pass a system.dbnull.value to the table, it keeps showing
a default date of the above. I want to end-up with a <NULL> for the
date entry from my code when a user deletes a date from my
aspx page.
Thanks,You can mix something from:
use a DEFAULT constraint to your date column
use NULLIF() function with an out-of-range date
use ISNULL() function with an out-of-range date
and check that your table supports NULLs in your date column
we also have problems passing nulls via VB6 (must be variants).
Cesar.|||Thanks Cesar,
I saw a KB on Microsoft saying that functionality is a bug but don't see
they fixed it. I will give the ole variant a try. Thanks again.
BobbyJ
Even if I pass a system.dbnull.value to the table, it keeps showing
a default date of the above. I want to end-up with a <NULL> for the
date entry from my code when a user deletes a date from my
aspx page.
Thanks,You can mix something from:
use a DEFAULT constraint to your date column
use NULLIF() function with an out-of-range date
use ISNULL() function with an out-of-range date
and check that your table supports NULLs in your date column
we also have problems passing nulls via VB6 (must be variants).
Cesar.|||Thanks Cesar,
I saw a KB on Microsoft saying that functionality is a bug but don't see
they fixed it. I will give the ole variant a try. Thanks again.
BobbyJ
Subscribe to:
Posts (Atom)