Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Friday, March 30, 2012

Increase Indentity value

How do I increase the current Indentity value for an existing Indentity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want it to return: 99999
dbcc checkident
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:FAF19510-1D09-4D1C-BEA9-6934A3C8C473@.microsoft.com...
> How do I increase the current Indentity value for an existing Indentity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want it to return: 99999
>
|||Ken,
DBCC CHECKIDENT (Quote, RESEED, 99999)
GO
Cheers,
Paul
|||http://www.aspfaq.com/5003
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:FAF19510-1D09-4D1C-BEA9-6934A3C8C473@.microsoft.com...
> How do I increase the current Indentity value for an existing Indentity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want it to return: 99999
>
|||Excellent, I have bookmarked this.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Aaron [SQL Server MVP] wrote:
> http://www.aspfaq.com/5003
>

Increase Indentity value

How do I increase the current Indentity value for an existing Indentity colu
mn?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want it to return: 99999dbcc checkident
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:FAF19510-1D09-4D1C-BEA9-6934A3C8C473@.microsoft.com...
> How do I increase the current Indentity value for an existing Indentity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want it to return: 99999
>|||Ken,
DBCC CHECKIDENT (Quote, RESEED, 99999)
GO
Cheers,
Paul|||http://www.aspfaq.com/5003
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:FAF19510-1D09-4D1C-BEA9-6934A3C8C473@.microsoft.com...
> How do I increase the current Indentity value for an existing Indentity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want it to return: 99999
>|||Excellent, I have bookmarked this.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Aaron [SQL Server MVP] wrote:
> http://www.aspfaq.com/5003
>sql

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,
http://www.aspfaq.com/5007
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:C5A7066B-D4E3-48C3-B1E2-54B7E8DC4A14@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,
http://www.aspfaq.com/2237
For more information, please see DBCC CHECKIDENT in Books Online.
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:4BE94FEA-4CCF-4EA1-AE9E-F5A5B8057EAC@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,
>

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,http://www.aspfaq.com/2237
For more information, please see DBCC CHECKIDENT in Books Online.
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:4BE94FEA-4CCF-4EA1-AE9E-F5A5B8057EAC@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,
>

Increase field size AND linked tables

I would like to increase a field size to allow input of up to 16 characters
versus the current 11, but the message is that I can't do the modification
due to linked tables. I believe the modification must be done at the server
,
but I wouldn't know where to start. It would seem that it should be an easy
fix if someone could point me in the right direction. I hate to call the
tech guys out to open a couple windows and type 16. The database was done i
n
access converted to SQL.
ThanksDear rtucker913,
Please post DDL or any example which clarifies your request.
Thanks in advance,
"rtucker913" wrote:

> I would like to increase a field size to allow input of up to 16 character
s
> versus the current 11, but the message is that I can't do the modification
> due to linked tables. I believe the modification must be done at the serv
er,
> but I wouldn't know where to start. It would seem that it should be an ea
sy
> fix if someone could point me in the right direction. I hate to call the
> tech guys out to open a couple windows and type 16. The database was done
in
> access converted to SQL.
> Thankssql

Friday, March 23, 2012

Incorrect syntax near ).

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Incorrect syntax near ')'.

Source Error:

Line 42: objAdapter.SelectCommand = New System.Data.SqlClient.SqlCommand(strSQL, objConn)
Line 43: ' Fill the dataset.
Line 44: objAdapter.Fill(objDataset)
Line 45: ' Create a new view.
Line 46: Dim oView As New DataView(objDataset.Tables(0))

 Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim AllorOne As String Dim company As String AllorOne = Request.QueryString("AllorOne") company = Request.QueryString("company")' Create a connection and open it. Dim objConn As New System.Data.SqlClient.SqlConnection("User ID=******;Password=******;Initial Catalog=customer_config;Data Source=rqa4-sql01;") objConn.Open() Dim strSQL As String Dim objDataset As New DataSet() Dim objAdapter As New System.Data.SqlClient.SqlDataAdapter() ' Get all the sql If AllorOne ="All" Then strSQL ="SELECT [Company_Name] as 'Company Name', [Entity_Code] as 'Entity Code', [YTD_Transactions] as 'YTD_Transactions', [Num_Reports_DB] as 'Num_Reports_DB', [Reports_Advanced_Workflow] as 'Reports_Advanced_Workflow', [Has_Customization] as 'Has_Customization',[TA_Trans_All] as 'TA Trans All', [TA_Trans_US] as 'TA Trans US', [Using_VAT] as 'Using VAT', [Total_Users] as 'Total Users',[Non_English_Langages] as 'Non English Langages',[Non_English_Users] as 'Non English Users', [Using_Offline] as 'Using Offline', [Using_Audit_Services] as 'Using Audit Services' from(v_customer_master_list) order by company_name" Else strSQL ="SELECT [Company_Name] as 'Company Name', [Entity_Code] as 'Entity Code', [YTD_Transactions] as 'YTD_Transactions', [Num_Reports_DB] as 'Num_Reports_DB', [Reports_Advanced_Workflow] as 'Reports_Advanced_Workflow', [Has_Customization] as 'Has_Customization',[TA_Trans_All] as 'TA Trans All', [TA_Trans_US] as 'TA Trans US', [Using_VAT] as 'Using VAT', [Total_Users] as 'Total Users',[Non_English_Langages] as 'Non English Langages',[Non_English_Users] as 'Non English Users', [Using_Offline] as 'Using Offline', [Using_Audit_Services] as 'Using Audit Services' from(v_customer_master_list) where lower(company_name) like '%" & company &"%' order by company_name" End If objAdapter.SelectCommand = New System.Data.SqlClient.SqlCommand(strSQL, objConn)' Fill the dataset. objAdapter.Fill(objDataset) ' Create anew view. Dim oView As New DataView(objDataset.Tables(0)) ' Set up the data grid and bind the data. SimpleDataGrid.DataSource = oView SimpleDataGrid.DataBind() End Sub

Can anyone tell me what causes this type of error, what they think is wrong, or what IS wrong if someone wants to take the time to go through the code. Anything helps. Eh, I feel like one of those guys on a street corner with a sign when I say that.

Since the exception that was thrown is of type: System.Data.SqlClient.SqlException, then the error is in the sql statement itself and not in the code that is calling it.

can you run your sql statement in query analyzer?

|||

Visual Web Developer "helped" me out by adding "(" and ")" around my "from" statement in the SQL. Thanks for pointing out it had to be in the SQL.

|||

I am having the same problem except I dont know where the problem is after reading your posts. Could someone please explain a bit more on where I can find/fix the error in SQL statement??

Sunday, February 19, 2012

in sql server 2000+ is there some stored procedure that shows your current disk space usag

in sql server 2000+ is there some stored procedure that shows your current
disk space usage?xp_fixeddrives is one.
Linchi
"Daniel" wrote:
> in sql server 2000+ is there some stored procedure that shows your current
> disk space usage?
>
>