I had been frequently encountering these errors when I run my page: "Error converting data type nvarchar to int.
Cannot insert the value NULL into column 'COMPANY_CODE', table 'ZSWAREHOUSE.dbo.ZS_COMPANY_TBL'; column does not allow nulls. INSERT fails.
The statement has been terminated.". How do I solve this, so that I can insert data in my company table?
Why on earth is this not working, It WILL insert if there are NO apostheres (" ' "), but if I say like, "Cedric's Group" It will error out. I thought this approach was suppose to handle this character? Thanks for any insight, String sqlStr = "Insert into cardgroups (username,groupname,insertdt,groupid) values (@username,@groupname,@insertdt,@groupid)";
When i try to insert into a datetime field i keep getting this error.
Msg 242, Level 16, State 3, Procedure Sproc_01220_Tour_PendingPayment, Line 27 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated.
(1 row(s) affected)
i am passing to the date parameters the date in this format dd/mm/yyyy
Any ideas
ALTER PROCEDURE [dbo].[Sproc_01220_Tour_PendingPayment]
I'm getting this message on a replication distribution task after a successful SYNC task. The exact error message is: " Unexpected EOF encountered in BCP data-file.Failed while bulk copying into '<table name>' " I'm running SQL 6.5 Sp4. I tried recreating the article, resyncing and redistributing, with no luck. Is there anything I can do to fix this? Any help would be appreciated
I have a Job that creates .CSV files at predetermined intervals (the delimiter is a tabstop) and every 5 minutes I have to retrieve These files one at a time and Import them into the relevant database.
My solution was to create a list of the files and insert this list into a temporary table where a Cursor would extract each filename one at a time and insert that Name into a BCP Statement. The BCP Statement is constructed using dynamic SQL.
I have a script that inserts rows from a linked server. It basically looks like this:
use mydb; go insert into my.table (col1, col2, ...) select col1, col2, ... from LinkedServer.db.my.table;
The DDL for both tables is identical: 550 columns (de-normalized from a data warehouse), of which 548 are varchar(max). The remaining two are varchar(255). (not my design! but unchangeable at the moment).
Running my query raises an error:
Cannot create a row of size 9948 which is greater than the allowable maximum row size of 8060. The statement has been terminated.
Now, inserting rows on the table on the LinkedServer has never been an issue. (Since most columns are varchar(max), SQL has the option to store the data off-row.) The data is there, intact and whole. However, when pulling it into my target server using a LinkedServer (4-part naming), I get the error.
Three pairs of eyes have confirmed that the table definitions are identical on both source and target.
I've question about how to handle structural datamodel changes in a datasource of PowerPivot. Suppose I'm developing a starmodel in SQL Server and sometimes a datatype changes or a name of a field changes in a table. It seems to me that PowerPivot handle this not gracefully as Analysis MD does (mostly). I received an error because of a wrong fieldname or even no error when a dattype changes in PowerPivot. Is this common or do I something wrong here. Does this mean that every time the datamodel changes the PowerPivot should be recreated? Or am I missing the clue here?
I am trying to insert data into two different tables. I will insert into Table 2 based on an id I get from the Select Statement from Table1. Insert Table1(Title,Description,Link,Whatever)Values(@title,@description,@link,@Whatever)Select WhateverID from Table1 Where Description = @DescriptionInsert into Table2(CategoryID,WhateverID)Values(@CategoryID,@WhateverID) This statement is not working. What should I do? Should I use a stored procedure?? I am writing in C#. Can someone please help!!
I want to write a query where I can see all races and age range as column.
TblRace
ID, RaceName
TblAgeRange
ID,AgeRange.
There is no connection between this two table. I need to display result like below.
Race 17-20 21-30 31-40
A
B
I
W
How do i get this kind of empty data set so that I can fill it out in front end or any better solution. The age range will be displayed as many row as they have. It's not static. Above is just an example.
I have some website work lined up and it involves some simple modifications to a MS SQL 2000 server. What I'll need to do is add some new data fields and insert some data.
I have some experience with databases - MS Access and MySQL, but I have never used or seen MS SQL 2000. My question is, is this a relatively simple thing to do for someone who hasn't used it before? I can do these things quite simply in Access or MySQL, so is MS SQL 2000 going to be any different?
Also, does anyone know of any free tutorials online that would help me out?
Hello friends.... I am looking for 2 things(using c#.net or vb.net and sql svr 2000) 1.convert data from sql server 2000 database (say customers table from northwinds database) to a text file(separated by commas or just plain space) 2.Insert the data from text file back to database. Can someone pls give me the detailed code to achieve this....really need this on urgent basis.......Thank You.
Periodically, I receive these errors in my package:
The "component "Set date to NULL or format" (111)" failed because error code 0xC0049063 occurred, and the error row disposition on "output column "SettlementDate - derived" (544)" specifies failure on error. An error occurred on the specified object of the specified component.
It has to do with the fact that I have a derived column that uses an expression to format a date field. The expression is as follows:
It looks complicated, but it isn't. Basically, I'm just checking to see if the date value is NULL, a blank, less than 8 chars, or if it equals 899999999. If it is, set the date to null.
Anyways, the problem is, that the date field value changes sometimes. That is, I thought I covered the problem by checking for 89999999, but apparently other values are showing up as well, and when this happens it breaks the package.
How can I account for varying values, without having to know in advance what they are? Apparently, this problem is going to continue.
Vimal Kanth writes "I am using SQL Server 2000 and one of my databases has loads of consistency errors. When i try to query a particular record from a table it displays an error message similar to this
Could not find the index entry for RID '168927001232500300' in index page (1:95510), index ID 0, database 'Tristar'.
Then, i executed the DBCC CHECKDB command after going through some documentation. The results of which were something like this
Table error: Database 'Tristar', index 'DMS_VOUCHER.index_1739153241' (ID 1739153241) (index ID 2). Extra or invalid key for the keys:
Index row (1:11229:144) with values (ROWGUID = 22814645-5B2B-4B4E-A1D8-9B49DF7C8CEF`¢0; and DEALER_ID = 10121 and BRANCH_ID = 1.242260474E-307 and VOUCHER_ID = 9507) points to the data row identified by ().
Then, i executed the DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS command. I lost around 3000 records when i excuted this
I dont want any data loss as this is very critical.Can you please help me overcome this problem? Thanks in advance.
Can anyone please tell me why I recieved these errors when running dbcc check db. Thank god it was a user created "test" table in a production database and I was able to just drop the table and rerun dbcc with no errors, but this is the second time this has happened in the last month(I just started this job the week of the first error)- and we ended up having to restore to the last good backup.
Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652192), slot 3, text ID 225434796032 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652192), slot 4, text ID 225434861568 is not referenced. Server: Msg 8928, Level 16, State 1, Line 1 Object ID 1543676547, index ID 255: Page (1:652193) could not be processed. See other errors for details. Server: Msg 8939, Level 16, State 1, Line 1 Table error: Object ID 1543676547, index ID 255, page (1:652193). Test (IS_ON (BUF_IOERR, bp->bstat) &&bp->berrcode) failed. Values are 2057 and -1. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 0, text ID 225434730496 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 1, text ID 225434927104 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 2, text ID 225434992640 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 3, text ID 225435058176 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 4, text ID 225435123712 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 5, text ID 225435189248 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 6, text ID 225435254784 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652194), slot 7, text ID 225435320320 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652195), slot 0, text ID 225435385856 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652195), slot 1, text ID 225435451392 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652195), slot 2, text ID 225435516928 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652195), slot 3, text ID 225435582464 is not referenced. Server: Msg 8964, Level 16, State 1, Line 1 Table error: Object ID 1543676547. The text, ntext, or image node at page (1:652195), slot 4, text ID 225435648000 is not referenced. DBCC results for 'BILL_PRT_DETAIL'. There are 909154 rows in 101409 pages for object 'BILL_PRT_DETAIL'. DBCC results for 'BILLG_ERR_MSGS'. There are 971 rows in 52 pages for object 'BILLG_ERR_MSGS'. DBCC results for 'WORK_COMPCY_LEVEL'. There are 0 rows in 0 pages for object 'WORK_COMPCY_LEVEL'. DBCC results for 'BILL_PRT_HEADER'. There are 196396 rows in 24550 pages for object 'BILL_PRT_HEADER'. DBCC results for 'WORK_COMPCY_TYPE'. There are 0 rows in 0 pages for object 'WORK_COMPCY_TYPE'. DBCC results for 'BILL_PRT_MSGS'. There are 0 rows in 0 pages for object 'BILL_PRT_MSGS'. DBCC results for 'MTR_TMP_DTA_SEL'. There are 0 rows in 0 pages for object 'MTR_TMP_DTA_SEL'. DBCC results for 'WORK_IN_PROGRESS'. There are 1 rows in 1 pages for object 'WORK_IN_PROGRESS'. DBCC results for 'BILL_PYMT'. There are 750053 rows in 19951 pages for object 'BILL_PYMT'. DBCC results for 'NOTES'. There are 26812 rows in 457 pages for object 'NOTES'. DBCC results for 'WORK_ORDER_MASTER'. There are 0 rows in 0 pages for object 'WORK_ORDER_MASTER'. DBCC results for 'BUD_BILLG_AMT'. There are 0 rows in 0 pages for object 'BUD_BILLG_AMT'. DBCC results for 'NOTES_RELSHP'. There are 22428 rows in 252 pages for object 'NOTES_RELSHP'. DBCC results for 'WO_ACT_STAT'. There are 0 rows in 0 pages for object 'WO_ACT_STAT'. DBCC results for 'BUD_BILLG_CNSM_HST'. There are 0 rows in 0 pages for object 'BUD_BILLG_CNSM_HST'. DBCC results for 'NXT_NBR'. There are 7 rows in 1 pages for object 'NXT_NBR'. DBCC results for 'WO_ADDTNL_INFO'. There are 0 rows in 0 pages for object 'WO_ADDTNL_INFO'. DBCC results for 'BUD_BILLG_HST'. There are 0 rows in 0 pages for object 'BUD_BILLG_HST'. DBCC results for 'PARENT_HST'. There are 0 rows in 0 pages for object 'PARENT_HST'. DBCC results for 'WO_APPVL_ROUTING'. There are 0 rows in 0 pages for object 'WO_APPVL_ROUTING'. DBCC results for 'BUD_BILLG_WTHR_HST'. There are 0 rows in 0 pages for object 'BUD_BILLG_WTHR_HST'. DBCC results for 'PHY_ADDR'. There are 70776 rows in 7905 pages for object 'PHY_ADDR'. DBCC results for 'WO_BEHAVIOR_RULE'. There are 0 rows in 0 pages for object 'WO_BEHAVIOR_RULE'. DBCC results for 'BUD_BILLG_WTHR_SEV'. There are 0 rows in 0 pages for object 'BUD_BILLG_WTHR_SEV'. DBCC results for 'POSTAL_TOWN_CD'. There are 29539 rows in 569 pages for object 'POSTAL_TOWN_CD'. DBCC results for 'WO_COMPONENTS'. There are 0 rows in 0 pages for object 'WO_COMPONENTS'. DBCC results for 'BUS_UNT'. There are 1310 rows in 25 pages for object 'BUS_UNT'. DBCC results for 'cash match'. There are 738871 rows in 6720 pages for object 'cash match'. DBCC results for 'POSTED_HISTORY'. There are 1230436 rows in 26768 pages for object 'POSTED_HISTORY'. DBCC results for 'WO_CONSTANTS'. There are 0 rows in 0 pages for object 'WO_CONSTANTS'. DBCC results for 'BUS_UNT_MSTR'. There are 0 rows in 0 pages for object 'BUS_UNT_MSTR'. DBCC results for 'Cashmatch7_30'. There are 727509 rows in 6619 pages for object 'Cashmatch7_30'. DBCC results for 'PROFILE_CAT'. There are 0 rows in 0 pages for object 'PROFILE_CAT'. DBCC results for 'WO_EDIT_RULE'. There are 0 rows in 0 pages for object 'WO_EDIT_RULE'. DBCC results for 'CNSMPTN_SVC_CONTN'. There are 36776 rows in 928 pages for object 'CNSMPTN_SVC_CONTN'. DBCC results for 'Trace_cash_match'. There are 815011 rows in 7412 pages for object 'Trace_cash_match'. DBCC results for 'PROOF_BILL_PRT_DTL'. There are 0 rows in 0 pages for object 'PROOF_BILL_PRT_DTL'. DBCC results for 'WO_MASTER_FILE'. There are 0 rows in 0 pages for object 'WO_MASTER_FILE'. DBCC results for 'cash match 8-24'. There are 815011 rows in 7414 pages for object 'cash match 8-24'. CHECKDB found 0 allocation errors and 17 consistency errors in table 'cash match 8-24' (object ID 1543676547). DBCC results for 'PROOF_BILL_PRT_HDR'. There are 0 rows in 0 pages for object 'PROOF_BILL_PRT_HDR'. DBCC results for 'CNVRGT_BILLG_DTL'. There are 0 rows in 0 pages for object 'CNVRGT_BILLG_DTL'. DBCC results for 'WO_RTG_APPVL_MSTR'. There are 0 rows in 0 pages for object 'WO_RTG_APPVL_MSTR'. DBCC results for 'PYMT_TERMS'. There are 2 rows in 1 pages for object 'PYMT_TERMS'. DBCC results for 'CNVRGT_BILLG_HDR'. There are 0 rows in 0 pages for object 'CNVRGT_BILLG_HDR'. DBCC results for 'WO_STAT'. There are 0 rows in 0 pages for object 'WO_STAT'. DBCC results for 'Cash Matching Process'. There are 836838 rows in 7612 pages for object 'Cash Matching Process'. DBCC results for 'RD_CYCLE'. There are 55 rows in 1 pages for object 'RD_CYCLE'. DBCC results for 'WO_STAT_RULES'. There are 0 rows in 0 pages for object 'WO_STAT_RULES'. DBCC results for 'REASON_CD'. There are 0 rows in 0 pages for object 'REASON_CD'. DBCC results for 'WO_TYP'. There are 0 rows in 0 pages for object 'WO_TYP'. DBCC results for 'COLCT_RULES'. There are 30 rows in 1 pages for object 'COLCT_RULES'. DBCC results for 'RECEIPTS_BTCH'. There are 2109 rows in 44 pages for object 'RECEIPTS_BTCH'. DBCC results for 'nightly107'. There are 344086 rows in 3225 pages for object 'nightly107'. DBCC results for 'WO_TYP_ACT_STAT'. There are 0 rows in 0 pages for object 'WO_TYP_ACT_STAT'. DBCC results for 'COMPONENT_MASTER'. There are 0 rows in 0 pages for object 'COMPONENT_MASTER'. DBCC results for 'RECEIPTS_I_FILE'. There are 51698 rows in 3244 pages for object 'RECEIPTS_I_FILE'. DBCC results for 'NightCash10-12'. There are 64657 rows in 592 pages for object 'NightCash10-12'. DBCC results for 'WRK_CENTER_WRK_SCH'. There are 0 rows in 0 pages for object 'WRK_CENTER_WRK_SCH'. DBCC results for 'CONS_SVC_CONN_CD'. There are 1524 rows in 20 pages for object 'CONS_SVC_CONN_CD'. DBCC results for 'RECEIPT_ITM'. There are 151581 rows in 6334 pages for object 'RECEIPT_ITM'. DBCC results for 'Utiligy Cash Match Trace'. There are 321627 rows in 2928 pages for object 'Utiligy Cash Match Trace'. DBCC results for 'WRTOFF_GL_CLASS_CD'. There are 0 rows in 0 pages for object 'WRTOFF_GL_CLASS_CD'. DBCC results for 'CONTACT_INFO'. There are 1 rows in 1 pages for object 'CONTACT_INFO'. DBCC results for 'REFUND_HISTORY'. There are 906 rows in 24 pages for object 'REFUND_HISTORY'. DBCC results for 'RECEIPTS_I_FILE2'. There are 48343 rows in 3022 pages for object 'RECEIPTS_I_FILE2'. DBCC results for 'CUST_ADDR_REL'. There are 70611 rows in 2258 pages for object 'CUST_ADDR_REL'. DBCC results for 'REPORT_TYPE'. There are 42 rows in 1 pages for object 'REPORT_TYPE'. DBCC results for 'CUST_CNTRCT_RELSHP'. There are 0 rows in 0 pages for object 'CUST_CNTRCT_RELSHP'. DBCC results for 'REQ_READ_SCH'. There are 1 rows in 1 pages for object 'REQ_READ_SCH'. DBCC results for 'RESOURCE_ASGNDS'. There are 0 rows in 0 pages for object 'RESOURCE_ASGNDS'. DBCC results for 'CUST_INFO'. There are 36779 rows in 2480 pages for object 'CUST_INFO'. DBCC results for 'RESOURCE_MASTER'. There are 0 rows in 0 pages for object 'RESOURCE_MASTER'. DBCC results for 'RESOURCE_WORK_SCH'. There are 0 rows in 0 pages for object 'RESOURCE_WORK_SCH'. DBCC results for 'CUST_PYMT_ACCT'. There are 0 rows in 0 pages for object 'CUST_PYMT_ACCT'. DBCC results for 'ROUTE'. There are 95 rows in 2 pages for object 'ROUTE'. DBCC results for 'ADDR'. There are 70767 rows in 861 pages for object 'ADDR'. DBCC results for 'CUST_STMT_HST'. There are 0 rows in 0 pages for object 'CUST_STMT_HST'. DBCC results for 'ROUTE_RD_CYCLE'. There are 0 rows in 0 pages for object 'ROUTE_RD_CYCLE'. DBCC results for 'AGING_DAYS_TBL'. There are 5 rows in 1 pages for object 'AGING_DAYS_TBL'. DBCC results for 'CUST_SVC_RELSHP'. There are 73551 rows in 1415 pages for object 'CUST_SVC_RELSHP'. DBCC results for 'RPT_TYPE_CRITERIA'. There are 116 rows in 2 pages for object 'RPT_TYPE_CRITERIA'. DBCC results for 'AMX_MSG_LG'. There are 0 rows in 0 pages for object 'AMX_MSG_LG'. DBCC results for 'RPT_VERSION'. There are 32 rows in 1 pages for object 'RPT_VERSION'. DBCC results for 'DED_MTR_CONSUM'. There are 0 rows in 0 pages for object 'DED_MTR_CONSUM'. DBCC results for 'ASGND_BILL_CAT_CD'. There are 0 rows in 0 pages for object 'ASGND_BILL_CAT_CD'. DBCC results for 'RPT_VRSN_CRITERIA'. There are 15 rows in 1 pages for object 'RPT_VRSN_CRITERIA'. DBCC results for 'DED_MTR_POS'. There are 0 rows in 0 pages for object 'DED_MTR_POS'. DBCC results for 'ASGND_CUST_CAT_CD'. There are 0 rows in 0 pages for object 'ASGND_CUST_CAT_CD'. DBCC results for 'SCH_POOL'. There are 0 rows in 0 pages for object 'SCH_POOL'. DBCC results for 'DED_MTR_RDING_HIST'. There are 0 rows in 0 pages for object 'DED_MTR_RDING_HIST'. CHECKDB found 0 allocation errors and 17 consistency errors in database 'UtiligyPD'. repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (UtiligyPD ). DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Hi all, I've just started playing with data importing from Excel.
Since I know how to do linked servers, that's where I started. I created a link, querried the spreadsheet and got some strange results where data appearing in the spreadsheet returns as NULL in QA.
So, I noticed that I could use OPENDATASOURCE and OPENROWSET and tried each of them. They're returning the same data (in different column orders) also with strangely intermittant NULL values instead of the data that I see in the source spreadsheet.
I bet that this is something easy once you know what's going on. Anyone know what's going on?
Not that I think it'll matter, but the queries I'm using for these three cases are:
select * from EXCEL_A...EPIQ202$ where SUBSCRIBER_ID = '50664582103'
select * from OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=e:EPIQ202.xls;Extended Properties=Excel 8.0')...EPIQ202$
select* from openrowset( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=E:EPIQ202.xls', 'SELECT * FROM [EPIQ202$]' )
I have a package that archives some old data. It ran fine last month, but today it's failing with the following error messages:
DTS_E_BUFFERGETTEMPFILENAME The buffer manager could not get a temporary file name. The call to GetTempFileName failed.
DTS_E_UNUSABLETEMPORARYPATH The buffer manager could not create a temporary file on the path "__". The path will not be considered for temporary storage again.
DTS_E_CANTCREATEBLOBFILE The buffer manager cannot create a file to spool a long object on the directories named in the BLOBTempStoragePath property. Either an incorrect file name was provided, or there are no permissions.
Hi,I m using Microsoft Visual Studio 2005 and SQL server 2000. I have 2 textboxes and a button, what i wanna do is, when i hit the button, the values in textboxes should be inserted into DB. Would you please help me? Thanks in advance.
Hi friends,I have one text box on my form.i need to insert the data from tat text box to DB without clicking on any button.Now i have written the code under text changed event of that text box.So it is inserting whenever i click on that form.Besides this i need to insert data when i close tat window.But it is not inserting when i close tat window.Plse help me.Thanks in advance With RegardsLijo Rajan
I have created a form with several fields etc and validation.
After pressing the submit button i have a
if Page.IsValid then .....etc But in this then bit I want to do a
INSERT the form details to the db.
I have done inserts etc via gridView etc but I just need a form that lets someone enter info and submit etc, so do not now where to or how to place this code to connect then insert etc
I'm having a problem saving the information from my web form into my sql database when I clicked on the 'Submit' button. This is the error message Server Error in '/Helpdesk' Application.
ExecuteNonQuery: Connection property has not been initialized. I've attached my code below. Please advise me on what is wrong... How should I initialise the ExecuteNonQuery. ========= start code ==================== Dim MySQL As String MySQL = "" Dim MyConn As SqlConnection = New SqlConnection() Dim MyCmd As SqlCommand = New SqlCommand() MyConn.ConnectionString = "Server=ESAWEB2;Database=Helpdesk;Trusted_Connection=True;" MySQL = "INSERT INTO TBL_TROUBLE_TICKET (Priority) values (' ddlpriority ')"
I am not looking for free code but this is driving me out of my mind. I'm a pretty proficient PHP programmer and have been dealing with a form that I was made to program in ASP.Net due to my employer's preferences. I can't attach the code for the form so I have cut and pasted it below. I am needing to know whow do I code this so that the data will go into a MS SQL 2005 database? I already have some coding in it but I don't know if it's correct and any help in getting this fixed would be great as it is slowly driving me up the wall. Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim conebackups As SqlConnection Dim strInsert As String Dim cmdInsert As SqlCommand
I'm trying to insert a record into a master table, but b/c of the foreign key relationship, I know that I need to first insert a record into the child table so I don't get a foreign key error. The problem is that the record that I'm inserting doesn't have any columns that match up (similar)to the child table, and only a few that match up to the master table.
Hi,Is there any way to insert the output of xml_auto into a tablefor eg:select * from categories for xml autoi need the output of the abouve query to be inserted into another tablethe destination table has one column,
Hi all... I've encountered the following error in NT Event Viewer - Application related to SQL Server.
"The description for Event ID ( 263 ) in Source ( CIS ) could not be found. It contains the following insertion string(s): ERROR Communication link failure for CAudit!." & "The description for Event ID ( 263 ) in Source ( CIS ) could not be found. It contains the following insertion string(s): Error Communication link failure in ApplicationLogon."
There are around 30-40 messages (same) in the Event Viewer & I couldn't find the cause of the problem.
& I also have this error messages in SQL Server error log (different server)
"Unable to write to ListenOn connection . pipesqlquery' loginname 'sa'. hostname 'testing'... followed by "OS Error: 232, The pipe is being closed". & this error occurs everyday & few times a day!
Not sure whether the problem is purely SQL Server or got to do with the network/NT. Can't get any help from our network/NT support until I can prove to them that it is related to network/NT!
I need to create a stored procedure that will insert data with some already exsisting data in a table. The data is in a spreadsheet, my issue is that I dont want to violate the primary key rules.
can anyone help please
CREATE PROCEDURE InsertTerms AS INSERT INTO [GamingCommissiondb].[dbo].[TERMINATION] ( [TM #], [FirstName], [LastName], [SocialSecurityNumber], [DateHired], [Status], [Title], [DepartmentName], [Pictures])
SELECT a.TM#, a.FirstName, a.LASTNAME, a.SSN#, a.HIREDATE, a.STATUS, a.JOBTITLE, a.DEPT#, a.PICS FROM EmployeeGamingLicense AS a WHERE a.STATUS = 'TERMINATED' IF @@Error <> '0' RETURN
Has anyone figured out how to test if a string is a valid date without risking a sql conversion error?
I'd really like to avoid parsing the strings myself in an import procedure I am writing.
I can run an insert/select with the text being converted to datetime data, but if it hits text that won't convert correctly (such as '13-1-1999') it fails with a sql error. This could mess me up quite a bit.
Do you have to set the Error Output on DF components to "Fail Component" in order to get the errors?
What I would LIKE to do is a combination of "Ignore Failure" and "Fail Component". You see, I am using the Logging feature in my package that creates the sysdtslog90 table in the SQL database. The errors that I am logging make sense and have enough information for my purposes.
The problem is that I would like to continue processing the data and not have it stop when a data error occurs. I REALLY do not want to Redirect Rows unless it is necessary for me to do what I am asking.
Using Ignore Failure on both the source text file and destination SQL table allows the "good" data to be inserted, but I cannot get any info on the columns in error. Conversely, if I choose to Fail component, I get the info on the columns in error, but only the data that was inserted before the error was encountered is inserted into the table.
hi here´s a new one..... i´ve created a dts that is using an odbc source to connect to an oracle server, the conexion works just fine and i have no problems with it, then, i run this package from mi computer and the data transfer ends succesfully, when i upload it to my server in SQL 2005 and set it into a job.. i get errors like these:
Event Name: OnError Message: Thread "WorkThread0" has exited with error code 0xC0047039.
Event Name: OnError Message: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
Event Name: OnError Message: The PrimeOutput method on component "table" (1) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
Event Name: OnError Message: The component "faccomitecedidos" (1) was unable to process the data.
Event Name: OnError Message: The "component "table" (1)" failed because error code 0x80131541 occurred, and the error row disposition on "output column "diasperm" (1707)" specifies failure on error. An error occurred on the specified object of the specified component.
why is this happening , any solutions or ideas? the data i want to extract comes from an sql command not a table this is the query:
SELECT FCNSS , FITIPOSOLICITUD , FIFOLIO , RTRIM(FCNOMBRE)||' '||RTRIM(FCAPPATERNO)||' '||RTRIM(FCAPMATERNO) AS NOMBREAFILIADO, fdfinicta as FAFIL , fdFecCedido as FCED , (fdFecCedido-fdfinicta) AS diasperm , FNSALARIOACTUAL AS SALAFIL , (SELECT DISTINCT FISDI FROM gentec_own.AFILCEDIDOS WHERE FIFOLIO = gentec_own.faccomite.FIFOLIO AND FITIPOSOLICITUD = gentec_own.faccomite.FITIPOSOLICITUD AND FCNSS = gentec_own.faccomite.FCNSS AND ROWNUM = 1) AS salCED , (SELECT DISTINCT (FISDI/48.60) FROM gentec_own.AFILCEDIDOS WHERE FIFOLIO = gentec_own.faccomite.FIFOLIO AND FITIPOSOLICITUD = gentec_own.faccomite.FITIPOSOLICITUD AND FCNSS = gentec_own.faccomite.FCNSS AND ROWNUM = 1) AS CalSalCED , FCNUMPROMOTOR AS cod_promotor, (SELECT RTRIM(FCNOMBRES)||' '||RTRIM(FCAPEPATERNO)||' '||RTRIM(FCAPEMATERNO) FROM gentec_own.prommaestro where FCNUMPROMOTOR = gentec_own.faccomite.FCNUMPROMOTOR AND ROWNUM = 1) AS NOMPROMOTOR, FICVEENTCED as aforeorig , FCAFORECEDIDO as aforeced , FNINGCOMT , FNCTOPROMOCION , FNCTOADMON , FNCONTRIBUCION , fcCanal as Canal , FCDIVISION as Division , FCREGION as Gerencia FROM gentec_own.FACCOMITE WHERE FCCEDIDO = 1 and (to_char(fdFecCedido,'yyyymmdd')>=to_char(sysdate-8,'yyyymmdd') and to_char(fdFecCedido,'yyyymmdd')< to_char(sysdate,'yyyymmdd')) order by fdFecCedido;
i am asked to check data driven errors while importing data from an excel workbook to a sql server table. what are the data driven errors expected and how to introduce that in this sql code.
SELECT a.* FROM OPENROWSET(BULK 'Microsoft.Jet.OLEDB.4.0',