ADVERTISEMENT

Error 16955, What Is Causing This? (Ignore Other Post)

Sep 19, 2001

Hi,

The following error has started appearing consistently this week (50-100) times a day. No code has been changed in the database and I ran a trace to identify the procs executed in the time before this error.There is not any errors with the procs and the procs are running correctly. Does anyone know what is causing this and the remedy for this?

Thank You

Michael

DESCRIPTION: Error: 16955, Severity: 16, State: 2 Could not create an acceptable cursor.

View 1 Replies View Related

Finding 'Error Column' Causing Error

Apr 16, 2007

Good Morning,



Am I new at this so please bear with me. I searched the site and found threads on identifying the meaning of an error code and have instituted that scripting. It is telling me that I have a 'The data value cannot be converted for reasons other than sign mismatch or data overflow.' error. It identifies the colum as 5301.

I searched the threads and found one telling me I could do an advanced editor search on the lineage id to find the column being referenced. I have traced the entire process using this information and cannot find a reference lineage id of 5301. Was that thread information accurate, and if so what do I do now? If not, can someone tell me how the heck I find column 5301? I cannot load my table from a flat file because of this.



Work so far:

I have checked for integrity between column definitions and source flat file. I applied derived column changes to make the data transform to the appropriate data type/order where necessary. This part works without error. (Or seems to, there is no error output from this piece.) It is only on the final attempt to load that the process errors with these messages.



Thank you in advance to anyone who can help me.



Rog

View 7 Replies View Related

Basic Package Is Causing An Error

Aug 9, 2006

I'm getting the following error message on a basic copy from a datareader (using an ODBC datasource) to a sqlnativeclient. There are no transformations or anything. Don't know what is going on. Any insights are appreciated.

[SQL Server Destination [361]] Error: An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Could not bulk load because SSIS file mapping object 'GlobalDTSQLIMPORT ' could not be opened. Operating system error code 2(The system cannot find the file specified.). Make sure you are accessing a local server via Windows security.".

View 10 Replies View Related

Enterprise Manager Causing Memory Error

Jun 13, 2001

When I try open a table in Enterprise Manager, I am getting the following error:

The instruction at "0x418561c4" referenced memory at "0x00000034". The memory could not be "read".

Any ideas what this is?

Paul

View 1 Replies View Related

One Command Keeps Causing 'tempdb' Is Full Error

Jul 20, 2005

I keep getting the following error message when I run a serie of SQLcommands:Server: Msg 9002, Level 17, State 6, Line 15The log file for database 'tempdb' is full.Back up the transaction log for the databaseto free up some log space.I have tried "dump transaction tempdb with no_log" right before I runthe SQL command. But that doesn't help.The serie of SQL commands that I try to run is the following:create table #NewBatOp(BatchJournalID uniqueidentifier not null,batch_nr varchar(5) null,OperationNum varchar(3) null,OperationHours real null,EmployeeNum varchar(6) null,OperationDate datetime null,IsOverTime tinyint null)-- |-- Comment this one line-- | out will not triggerinsert into #NewBatOp -- <---| the errorselectbj.BatchJournalID, bj.batch_nr, bo.opno,bo.hrs, bo.bonno, bo.dat, bo.otflgfrom batop boinner join BatchJournal bj onbo.bat = bj.batch_nr andbj.BatchJournalID in(select BatchJournalID from BatchControl)if ( @@error <> 0 )goto OnErrordrop table #NewBatOpgoto EndTestOnError:drop table #NewBatOpprint "Error: Failed to import new batch-operations intojournal."EndTest:I have tried running the above statements in ISQL and in QueryAnalyzer, and I get the same error.I didn't have this problem before I have moved the database from oneserver to another server.- The OS in the old server is Windows-NT,and the SQL Server in the old server is the 2000 version.- The OS in the new server is Windows-2000,and the SQL Server in the old server is the 2000 version.The settings in tempdb in both servers are more or less the same.Actually, the tempdb in the new server is actually much bigger thanthe one in the old server. The size of the transaction logs in bothserver are the same (and cannot be changed manually). Both the dataand the transaction log of tempdb can automatically grow in 10%increment and no restriction on size.The data-and-log of the tempdb are both in one hard disk. The harddisk has 10-GB free space available. Moreover the size of the resultset from the "select" statement above is only 530KB (around 3000 rowsin the result-set). I believe it is a very small database operation.Therefore, I don't think the size has anything to do with the error.I don't think the "inner-join" clause is the cause of the problem. Thereason is that I have used the same "inner-join" clause in otherqueries, and they don't have any problem. As a matter of fact, I haveused many other queries that are far more complicated and have createdmuch bigger result set in tempdb, and they don't have this problem.I am very puzzled of this error. Can someone give me a pointer?Thanks in advance for any info.Jay Chan

View 10 Replies View Related

DTS- Destination Column Name Has Spaces Causing Error

Jan 13, 2007

I am using Advantage ODBC 6.2 to connect to a Advantage Data Server to
push data from a SQL table into this server.  I can view the data from
the ADS with DTS and I can insert data by using "Insert into TempTable ("Last
Name","First Name") values ('test','test)" from a Execute SQL Statement. The issue is when I build
up a DTS package to pull from SQL into the Advantage ODBC, I get a
"missing closing ")"" error.  I have narrowed it down to the column
names in the destination table having spaces (Last Name, First Name,
and a bunch of others.  DBA 101 here).  How do I beat this?


I have tried editing the destination column names in disconnected edit
by adding the double quotes but get a "Column Name '"Last Name"' not
found" error.  Wrapping them with [] doesn't work.  I think this is a
limit on Advantage.


When I try to use Advantage OLE DB, I get an 'Ace32.dll must be newer
then the other dll" error.  I am afraid of upgrading Ace32.dll and not
break other things.

 

So with this said my two questions:

How do I get the destniation column names wrapped in double quotes when using transformations?

or

Is there a way I can do an Insert into Advantage connection(column names) values (Select Values from SQL Server connection)?

View 7 Replies View Related

Stored Procedure Definition Not Updating, Causing DTS Copy Error

Jun 27, 2007

I've got a weird one here. I'm running a DTS package on SQL Server2005. It copies a bunch of stored procedures. I renamed them on theoriginating server and ran the DTS again.The came over with the old name and code!I deleted the DTS and built it from scratch, and the same thinghappened.I ran SELECT * FROM sys.objects where type = 'P' on the source serverand the names were correctI'm explicitly checking which sp to copy rather than using Copy all. Ican see the sp namesI've deleted and recreated the sp on the source server using scriptsI've checked the source server nameI've Refreshed everywhereNothing worksWhy is up_Department_GetAllBySchool trying to be be pulled over whenit doesn't exist?Why is up_Department_GetBySchool not being pulled over when it doesexist?I've heard that SQL 2005 pre-SP2 has a problem where renaming anobject that has a text definition (like sprocs, functions, triggers,views) doesn't update the definition. So if you pull that objectdefinition and run it into your new database, it will use the originalscript, which has the original name.I ransp_helptext 'up_Department_GetBySchool'and checked the CREATE statement at the top. Sure enough, it had theold textI asked our NetAdmin to install SP2 on our server. Then I ransp_refreshsqlmodule 'up_Department_GetForSchool'and got this error:Invalid object name 'up_Department_GetAllForSchool'.So even the code which was supposed to fix it, doesn't. Has anyoneelse had this problem, and managed to fix it?--John Hunter

View 1 Replies View Related

Transact SQL :: Aggregate Function Causing Error In Complex Join

May 13, 2015

I have a few tables I am trying to join to create a report. Everything was working fine until I tried to add an aggregate Sum function to a column (MaxCap) in table ctfBarn. 

select
x.*, y.division, y.department, y.location
,(right(z.SvcMgrName,len(z.SvcMgrName)-len(left(z.SvcMgrName,CHARINDEX(', ',z.SvcMgrName)-1))-2)+' '+
left(z.SvcMgrName,CHARINDEX(', ',z.SvcMgrName)-1))AS SvcMgrName
,(right(z.SrSvcName,len(z.SrSvcName)-len(left(z.SrSvcName,CHARINDEX(', ',z.SrSvcName)-1))-2)+' '+

[Code] .....

I think I probable need to include a group by but can't figure out the correct syntax.

View 12 Replies View Related

SQL Tools :: Import Export Wizard Default Data Source Causing Error / Crash

Sep 1, 2015

I have several versions of SQL Server and have been using SQL 2008 on a regular basis due to this issue. Our SQL 2014 when I do the Import Data process, it opens up the dialog window, hit next, and the data source is currently defaulting to ".NET Framework Data Provider for IBM i" - when it does this it immediately errors out with:

"An error occurred which the SQL Server Integration Services Wizard was not prepared to handle.

Additional Information:
> Exception has been thrown by the target of an invocation (mscrolib)
>> Failed to find or load the registered .NET Framework Data Provider (System.Data)"

It immediately crashes/closes the Import/Export wizard with me unable to change the data source to what I need it to be.

My 2008 defaults to SQL Server Native Client 10.0 and does allow me to change to that same option (at which point it errors) but it does not close the wizard.

I need a way to either:

> Default the starting Data Source to be something else
> Fix whatever error is causing it to crash - I am at a loss as to what the error is looking for
> Not have the wizard crash whenever it defaults to this source.

Any of the above solutions would work fine - but at the moment I am unable to use the Import/Export wizard at all in SQL 2014.

View 3 Replies View Related

SQL Server 2012 :: Determine Which Column Is Causing Error Converting Data Type Varchar To Numeric?

Aug 14, 2014

I'm moving data from one database to another (INSERT INTO ... SELECT ... FROM ....) and am encountering this error:

Msg 8114, Level 16, State 5, Line 6
Error converting data type varchar to numeric.

My problem is that Line 6 is:

set @brn_pk = '0D4BDE66347C440F'

so that is obviously not the problem and my query has almost 200 columns. I can go through one by one and compare what column is int in my destination table and what is varchar in my source tables, but that could take quite a while. How I can work out what column is causing the problem?

View 3 Replies View Related

Data Adapter FILL Causing Data Corrupt Error In C# Web Service

Apr 2, 2008

I hope someone has seen this one...I've got a very simple web method that returns a DataTable from my database. It worked fine until I changed this line of code:

string SqlString = @"SELECT Timestamp, Confession FROM Confessions WHERE ConfessionID = ? ORDER BY Timestamp desc";

To this line of code:

string SqlString = @"SELECT Timestamp, Confession FROM Confessions WHERE ConfessionID = ? AND CategoryID = ? ORDER BY Timestamp desc";


Here is the complete webmethod:

[WebMethod]
public DataTable GetConfession (int ConfessionID, int CategoryID) {

DataTable dt = new DataTable();
dt.TableName = "XMLConfession";

string SqlString = @"SELECT Timestamp, Confession FROM Confessions WHERE ConfessionID = ? AND CategoryID = ? ORDER BY Timestamp desc";

using (OleDbConnection cn = new OleDbConnection (ConnectionString)) {
using (OleDbCommand cmd = new OleDbCommand (SqlString, cn)) {

cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue ("@ConfessionID", ConfessionID);
cmd.Parameters.AddWithValue ("@CategoryID", CategoryID);
cn.Open();

OleDbDataAdapter da = new OleDbDataAdapter (cmd);

da.Fill (dt);
}
}

return dt;
}
To cause the error, all I did was add the AND statement into the query. Now I get this .NET error message every time I try to run this program:


System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Data.Common.UnsafeNativeMethods.ICommandWithParameters.SetParameterInfo(IntPtr cParams, IntPtr[] rgParamOrdinals, tagDBPARAMBINDINFO[] rgParamBindInfo) at System.Data.OleDb.OleDbCommand.ApplyParameterBindings(ICommandWithParameters commandWithParameters, tagDBPARAMBINDINFO[] bindInfo) at System.Data.OleDb.OleDbCommand.CreateAccessor() at System.Data.OleDb.OleDbCommand.InitializeCommand(CommandBehavior behavior, Boolean throwifnotsupported) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

I am using SQL Server Compact Edition 3.5 and C# .NET 2.0. It's worth noting that the web service does this outside of the program as well, so I don't think the problem is in the code that calls it. Also worth noting is that the query itself works fine when I substitute values in and run it in .NET Server Explorer.

Thanks in advance for any assistance.

View 5 Replies View Related

BDE/SQL Causing GENERAL_SQL_ERROR And Crashing App

Aug 27, 2007

Dear Folks:

I am currently engaged in finding the reason why a certain SQL client application (now running under XP SP2) fails when it attempts to query an sql database. This "failure" happens after the nth operation of the same. The application can run anywhere between 2 seconds and 2 hours before it displays a GPF dialog window and is terminated by the user. The application was developed more than 10 years ago using Borland c++ 4.52 (I am using 5.01) and was deployed as a 16 bit windows app. Since then, they've the client) "apparently" had some success running it under Win95/Win98 and 32 bit OSs like W2K and XP.

At this time, I (think I) know that a specific query operation (runing through the KDBF framework) that returns a 13059 BDE code before the returned object is accessed and the KERNAL reports a NULL Handle error. Inside the KBDEF framework, the query function translates to a DbiQExecDirect(,,) function call to the BDE. I have looked at the code and can not find anything wrong.. nor would i expect too. The application worked at one time. But,clearly, something has changed in the environment of both the test system I have, and one installed at a customer site. I have modifed just about every modifiable parameter I can think of. The system in question is an IBM branded machine running XP pro with SP2 applied. I do not know if the app run under XP SP1 correctly, however.

Any suggestions would be greatly appreciated. (i know.. stop using BDE)

Thank you
JRC

View 1 Replies View Related

NOT FOR REPLICATION Causing PK Errors

Nov 30, 2007

Hi all

I have set up Transactional Replication from 2005 to 2000. After running a few transactions I disabled the replication, pointed one of our IIS servers to the 2000 database to do a quick functional test and validate replication. We are getting "Cannot insert duplicate value in object XXXX with violation of PK constraint errors. I was able to figure out the cause. This was happening for tables with Identity columns which have been set NOT FOR REPLICATION. The IDENT_CURRENT values are different than the MAX value in the table. so doing a DBCC CHECKIDENT with RESEED seemed to have fixed the issue. Now I am running the DBCC command on ALL tables that have been used for Replication and have NFR set to true. Its taking a while as the tables are big.

Now I am wondering if anyone has faced similar issue? Is this a known issue? I have googled and have found nothing or no one complaining about this. I believe most people have used replication for reporting where they are just querying the databases. We are testing replication as a fall back scenario.

Opinions welcome..
thanks,
Don

View 8 Replies View Related

Big Tables Causing Issues

Mar 3, 2008

I have a very rubbish connection!! And have been having prodlems with "Protocol error in TDS stream" when trying to save a copy locally through a dts. Basically i have a table with about 11,000 rows, but this table had 28 columns. I've now normalised to a certain extent and now have 2 tables one of 11 columns mostly ints and one of 18 columns, but they will both be excess of 11,000 rows.

So, on to the question ... Will these 2 tables likely ease my network issues... The application works fine on 1 big table. It's just copying to my local machine that's always been the issue since the table hit 10,000 rows

If only I knew what I was doing ... Thanks in advance of any guidence

View 3 Replies View Related

Autonumbering Causing Deadlocks.

Jul 20, 2005

Gents,I have come into a system that uses a secondary table to generate (forwant of a better word) Identities.egcreate table myidents( name sysname not null, ident int not null)create procedure getnextident @table sysname, @ident int outputasbeginif not exists (select top 1 1 from myidents where name = @table)insert into myidents values (@table, 0)update myidentsset @ident = ident = ident + 1where name = @tableendnow, (ignoring for now the use of reserved words) the problem is thatthis is called frequently, from other procedures. Trouble is that thecalling procedures call it from within a transaction. We now have awickedly hot spot on this table, with frequent deadlocks.Is there any relatively quick fix for this? Some locking hints orwhatever.Or do we need to go and recode, moving this kind of thing outside thetransaction (which are all rather too long for my liking), and evencosidering using identity columns as a replacement?Thanks

View 4 Replies View Related

Database For BCM Causing Errors??

Feb 28, 2007

Hi All,

I tried to create a new project in BCM and I get an error indicating that there is already a project with that name. There is no project with that name in my list of projects! However, I think during one of the frequent installs and uninstalls before I was able to install a somewhat stable BCM, i might have created a project with that name prior to one of the many crashes (it still hangs and has to be killed in task manager periodically). I suspect I might have a rogue database that was created during one of the reinstalls which included installing and uninstalling small business accounting, which I have since also uninstalled. I have tried to use studio manager express to look at the tables in the databases, of which there are two, "mssmallbusiness" and "contctmgr 16022007" , in order to find an instance of a record with the name in question, no joy yet. Do I need the "mssmallbusiness" database to run BCM and if not can I delete it? I suspect that the mssmallbusiness database could be interfering somehow with the "contctmgr 16022007".

Since installing BCM, my outlook has slowed down considerably and hangs often on launch, I would abandon BCM, but I think it's a really cool tool and I would like to install small business accounting too! My machine is a centrino duo with 1 GB RAM and plenty HD space.

I know this message is somwhat convoluted, but if you can make sense of my issues, pls help.

Regards,

EdincoT

View 1 Replies View Related

End Conversation Causing Blocks

Apr 9, 2007

Hi



I was trying to clean up some conversation in Service Broker and caused alot of blocking that I seem to unable to kill. there was 1 conversation that I was not able to end, so I wanted to restart sql service, But I can't even restart the SQL service. I get the following in Event Viewer



Timeout occurred while waiting for latch: class 'SERVICE_BROKER_TRANSMISSION_INIT', id 00000001A2B03540, type 2, Task 0x0000000000C2EDA8 : 0, waittime 5400, flags 0xa, owning task 0x00000002DEBCA5C8. Continuing to wait.



Has anyone come across this



thanks



Paul

View 1 Replies View Related

Leap Year Dates Causing Error When You Pull Dates For Non Leap Year

Feb 28, 2008



I'm trying to generate this query, that displays Budget Current Year , Actual Current Year and Prior Year Revenue. When It comes to the Budget and Actual everything works fine, however when I try to add the query for the Prior Year I get an error, and I realized that the leap date is causing the error


Here is what I'm trying to generate






InnCodeID
Quarterly
Monthly
Days
Period
Year
BARmRev
AARmRev
PYRmRev

ADDIS
Q1
Jan
1
1
2008
NULL
NULL


ADDIS
Q1
Jan
1
1
2008
3462.14
5107.65


ADDIS
Q1
Jan
1
1
2008
NULL
NULL


ADDIS
Q1
Jan
1
1
2008
NULL
NULL



Here is the error that I'm getting:



Code Snippet

Msg 242, Level 16, State 3, Line 1

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

(4834 row(s) affected)



Here is my Transact-SQL Syntax (summarized because I Couldn't post it):

SELECT

(CASE WHEN (CASE WHEN dbo.Trans.Tr_Dept = '10' AND dbo.Trans.TR_Main = '5120' AND dbo.Trans.tR_sub = '01'

AND Year(dbo.Trans.TR_Date) = Year(dbo.CurrentDate.CurrDate) AND dbo.trans.Datatype = '1'

THEN dbo.trans.Tr_Amount ELSE NULL END) IS NOT NULL THEN

(SELECT Trans1.TR_Amount

FROM dbo.Trans Trans1

WHERE Trans1.TR_Dept = '10' AND TR_Main = '5120' AND TR_Sub = '01' AND trans1.TR_Date = CAST((CAST(Month(dbo.Trans.TR_Date)

AS varchar(2)) + '/' + CAST(Day(dbo.Trans.TR_Date) AS varchar(2)) + '/' + CAST(Year(dbo.CurrentDate.CurrDate) AS varchar(4))) AS datetime)

AND Trans1.TR_Entity = dbo.Trans.TR_Entity AND trans1.datatype = dbo.Trans.DataType) ELSE NULL END) * - 1 AS BARmRev,


--AA Script Here AS AARmRev,

(CASE WHEN (CASE WHEN dbo.Trans.Tr_Dept = '10' AND dbo.Trans.TR_Main = '5120' AND dbo.Trans.tR_sub = '01' AND Year(dbo.Trans.TR_Date)

= Year(dbo.CurrentDate.CurrDate) AND dbo.trans.Datatype = '1' THEN dbo.trans.Tr_Amount ELSE NULL END) IS NOT NULL THEN

(SELECT SUM(Trans1.TR_Amount)

FROM dbo.Trans Trans1

WHERE RIGHT(RTRIM(Trans1.TR_Dept), 2) = '10' AND Trans1.TR_Main = '5120' AND Trans1.TR_Sub NOT BETWEEN '04' AND '05' AND

trans1.TR_Date = CAST((CAST(Month(dbo.Trans.TR_Date) AS varchar(2)) + '/' + CAST(Day(dbo.Trans.TR_Date) AS varchar(2))

+ '/' + CAST(Year(dbo.CurrentDate.CurrDate)-1 AS varchar(4))) AS datetime) AND Trans1.TR_Entity = dbo.Trans.TR_Entity AND

trans1.datatype = '0') ELSE NULL END) * - 1 AS PYRmRev



FROM dbo.EntityDef INNER JOIN

dbo.Trans ON dbo.EntityDef.ED_Property_ID = dbo.Trans.TR_Entity INNER JOIN

dbo.CurrentDate INNER JOIN

dbo.DimTime ON YEAR(dbo.DimTime.TimeDate) = YEAR(dbo.CurrentDate.CurrDate) ON dbo.Trans.TR_Date = dbo.DimTime.TimeDate

WHERE (dbo.EntityDef.ED_Property_ID = 'ADDIS')

ORDER BY dbo.EntityDef.ED_Property_ID, dbo.DimTime.TimeDate


I appreciate all your help

Thanks

View 13 Replies View Related

DateTime Param For SP Causing BIG Headache...!!

Aug 8, 2006

I've got a stored procedure and one of the parameters is a DateTime.  But no matter what I do to the string that's passed into the form for that field, it doesn't like the format.  Here's my code: SqlConnection conn = new SqlConnection(KPFData.getConnectionString());
SqlCommand cmd = new SqlCommand("KPFSearchName", conn);
cmd.CommandType = CommandType.StoredProcedure;

SqlParameter param = cmd.Parameters.Add("@DOB", SqlDbType.SmallDateTime);
param.Direction = dir;
param.Value = txtDOB.Text;

// also have tried this:

param.Value = Convert.ToDateTime(txtDOB.Text);

// and

param.Value = Convert.ToDateTime(txtDOB.Text).ToShortDateString;

No matter what I do I always get a formatting error - either I can't convert the string to a DateTime, or the SqlParameter is in the incorrect format, or something along those lines.  I've spent a couple hours on this and hoping someone can point out my obvious mistake here...??Thanks for your help!!eddie

View 5 Replies View Related

SQL Query Assistance. MAX Causing Issue

May 23, 2007

I got some help on here before with building my query. I thought this was working fine but it turns out when there are multiple records for a column type, it only grabs the first one. I need to get all records. Is there an alternative to MAX? I needed to structure it like this because I needed to return each row as a column and this was the way suggessted before.
My query:SELECT TOP (100) PERCENT PRODUCT_NUMBER, PRODUCT_NAME,
MAX(CASE WHEN ColumnName = 'Federal Specification Number' THEN TheValue ELSE NULL END) AS [Federal Specification Number]FROM (SELECT dbo.PRODUCT_FEATURE_VALUES.PRODUCT_ID AS ProductID, dbo.SHARED_FEATURE_VALUES.FEATURE_TEXT_VALUE AS TheValue,
dbo.SHARED_FEATURE_TYPES.FEATURE_TYPE AS ColumnName, dbo.PRODUCTS.PRODUCT_NUMBER, dbo.PRODUCTS.PRODUCT_NAME
FROM dbo.PRODUCT_FEATURE_VALUES INNER JOINdbo.SHARED_FEATURE_TYPES ON
dbo.PRODUCT_FEATURE_VALUES.FEATURE_TYPE_ID = dbo.SHARED_FEATURE_TYPES.FEATURE_TYPE_ID INNER JOINdbo.SHARED_FEATURE_VALUES ON
dbo.PRODUCT_FEATURE_VALUES.FEATURE_VALUE_ID = dbo.SHARED_FEATURE_VALUES.FEATURE_VALUE_ID INNER JOINdbo.PRODUCTS ON dbo.PRODUCT_FEATURE_VALUES.PRODUCT_ID = dbo.PRODUCTS.PRODUCT_ID
UNIONSELECT dbo.EXTENDED_ATTRIBUTE_VALUES.PRODUCT_ID AS ProductID, ISNULL(dbo.EXTENDED_ATTRIBUTE_VALUES.SMALL_TEXT_VALUE,
dbo.EXTENDED_ATTRIBUTE_VALUES.LARGE_TEXT_VALUE) AS TheValue, dbo.EXTENDED_ATTRIBUTES.COLUMN_NAME AS ColumnName, PRODUCTS_1.PRODUCT_NUMBER, PRODUCTS_1.PRODUCT_NAME
FROM dbo.EXTENDED_ATTRIBUTE_VALUES INNER JOINdbo.EXTENDED_ATTRIBUTES ON
dbo.EXTENDED_ATTRIBUTE_VALUES.EXT_ATT_ID = dbo.EXTENDED_ATTRIBUTES.EXT_ATT_ID INNER JOIN
dbo.PRODUCTS AS PRODUCTS_1 ON dbo.EXTENDED_ATTRIBUTE_VALUES.PRODUCT_ID = PRODUCTS_1.PRODUCT_ID) AS t1
WHERE PRODUCT_NUMBER = '02083'
GROUP BY PRODUCT_NUMBER, PRODUCT_NAME
ORDER BY PRODUCT_NUMBER
 
This returns:
Product_Number    Product_Name                                 Federal Specification Number 
02083                   Di-Electric Grease, 10.5 Wt Oz          FDZ-CFR-21-178.3570
There is another record for Federal Specification Number I need to return as well. If I change to MIN, it gets the other record. Anyway I can get both?

View 15 Replies View Related

InnerJoins Causing No Rows To Be Returned

Jun 11, 2008

I have my SQLDataSource configured as shown in the picture. I ran the Execute Query and input an ID I know is in the database and it returned nothing. I ran into this probelm on another part of my site and i got it working by using 2 SQLDataSources, but im trying to keep the amount of code down.
 
http://junk.icore-studios.com/junk/Codeissues/Innerjoins.JPG
 
Any ideas on why it would be behaving this way?

View 2 Replies View Related

Deletes Causing Tran Log To Fill

Aug 2, 2000

I seem to be having a problem on all of my SQL servers. WHen I or a developer attmept to do a delete on a table i get a Log file for database is full. I truncate the log try again and get the same error. IT doesnt seem to matter how much is being deleted or how big the table is. THis is very strange and very frustrating.

Thanks
David

View 5 Replies View Related

CASE Statement Causing Too Many Rows To Appear

Jul 5, 2007

Here's my basic syntax:


Code:

select
dma.dma_market_area,
count(fc.contactid) as Number_Of_QCs,
(case when fc.ctca_currenttier = 1 then count(fc.contactid) end) as P1,
(case when fc.ctca_currenttier = 2 then count(fc.contactid) end) as P2,
(case when fc.ctca_currenttier = 3 then count(fc.contactid) end) as P3,
(case when fc.ctca_currenttier = 4 then count(fc.contactid) end) as c1,
(case when fc.ctca_currenttier = 5 then count(fc.contactid) end) as c2,
(case when fc.ctca_currenttier = 6 then count(fc.contactid) end) as c3



from ...



And then I get output like this:

dma_market_areaNumber_Of_QCsP1P2P3c1c2c3
ALBANY-SCHENECTADY-TROY66NULLNULLNULLNULLNULL
ALBANY-SCHENECTADY-TROY1NULL1NULLNULLNULLNULL
ALBANY-SCHENECTADY-TROY1NULLNULLNULL1NULLNULL
ALBANY-SCHENECTADY-TROY1NULLNULLNULLNULLNULL1


How can I get there all to group to one row, based on the first column?

View 1 Replies View Related

Check Constarint Causing Problems

Apr 17, 2006

I have been having problems inserting data with dates.

If I do not use a constraint then the data is inserted without a problem but if the constraint is added I get this error.
Code:

"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value"



What is the problem here?

I have the logins set to British English

View 3 Replies View Related

Replicating 3 Databases Causing Problems?!

Aug 8, 2004

We are trying to deal with replication in a legacy design involving 2 SQL servers each taking INSERTS from about 100 call centre client PCs. In each case a client logs into either SQL Server and upon each INSERT is handed a unique Call_ID to use when inserting additional information in relation to that specific call.

Each of the two databases are subsequently being replicated into a third database where reports are being pulled.

The problem is that to prevent each database giving the same Call_ID to a client we have setup SQL 1 to use a Call_ID starting with 1 and incremented by 2 (i.e odd numbers!). SQL 2 starts with 0 and increments by 2, (even numbers). These ‘increment’ rules are built into the table schema and seem to be causing a problem when we try to replicate into the third database as the two initial schemas are not considered identical.

The first database to be replicated will work and the second will fail. We get messages saying it is due to unique values.

I thought we may be able to have identical schemas by changing the ID field to a fixed 12 digit number and prefix it with a 10xxxxxxxxxx on one server and 11xxxxxxxxxx on the other. The 10 and 11 would be held in a table with the value being pulled based upon server name.

ServerValue
SQL110
SQL211

Hence we would be able to extract the value and prefix the ID with it.

Has anyone come across the reason as to why the first replication will work but the second will always fail? And would this mod solve the problem?

Moreover I suspect that our design is fundamentally flawed and that we need to have two servers handling a single database? This single database would then more easily be replicated to the reports database.

Thanks for any input!

Paul

View 1 Replies View Related

Backups Causing Connectivity Issues

Sep 21, 2004

I'm maintaining a database with an automated backup process.

Periodically, it does a "BACKUP DATABASE" to a local file and then do a file copy across the network to another system. This file is 2.7GB and when it is being copied it causes network problems; specifically ADO connections to the database get broken.

Does anyone have experience with this kind of issue?

View 8 Replies View Related

Too Many Writes At Once Causing Time Outs?

Feb 18, 2004

Hi everyone! I'm new to this forum and I suspect I'll be using this forum frequently. Good stuff.

Allow this question may appear to be Web-related, I think the problem is with what I'm doing with the database. Please read.

I'm trying to implement a page tracking solution using ASP and SQL 2000. It basically writes a new record to a table every time a user visits a page on the site. It appeared to work fine at first, then I've increasingly been getting time out errors on my pages -- all pointing to the include file that fires the database write.

Here's the code that's referenced on every page:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "dsn=x;uid=y;pwd=z;"

Set objRecordset1= Server.CreateObject("ADODB.Recordset")
objRecordset1.Open "SELECT * FROM table",Conn,1,2
objRecordset1.AddNew
objRecordset1.Fi elds("PAGE") = Left(request.servervariables("SCRIPT_NAME"),100)
objReco rdset1.Fields("QUERY_STRING") = Left(request.servervariables("QUERY_STRING"),100)
objRec ordset1.Fields("DATE") = Date()
objRecordset1.Fields("TIME") = Time()
objRecordset1.Fields("PLATFORM") = Left(request.servervariables("HTTP_USER_AGENT"),100)
obj Recordset1.Fields("REFERRER") = Left(request.servervariables("HTTP_REFERER"),100)
objRec ordset1.Fields("USER_IP") = Left(request.servervariables("REMOTE_ADDR"),20)
If Request.Cookies("TEST")("ID")<>"" Then
objRecordset1.Fields("VISITOR_ID") = Request.Cookies("TEST")("ID")
End If
objRecordset1.Update

Conn.Close
Set Conn=Nothing
%>

After taking out the reference to the above code everything speeds back up. So, I know the performance hit and time out issues have to do with the code above.

Is it the simultaneous write to the table, the constant opening and closing of the recordset, the cursor type, the lock type – or combination of things?

HELP!! Thanks!

David

View 3 Replies View Related

Simple Query Causing Frustration

May 27, 2008

Hi, I am a new learner and user to SQL Sever 2005 and am having some major frustration trying to write a simple query.

I have two tables, 1) Ticket_Purchase, 2) Flight.

The Ticket_Purchase table has these columns: Ticket_Purchase_Number(PK), Flight_Number(FK), Date_Purchase_Made, Ticket_Price, Class_of_Ticket, Passenger_ID

The Flight table has these columns: Flight_Number(PK), Flight_Date, Flight_Departure_Time, Flight_Arrival_Time, Flight_Origin, Flight_Destination

I am trying to create a query that will tell me: On which flight were the most first class tickets sold?

There are only two types of classes; 'E' for economy and 'F' for First Class.

So far I am able to get a list of all the First class flights for each flight and can visually see which flight has the most first class tickets by counting them manually on the report generated, but I am totally confused on how to simply pull the single flight with the most First class tickets sold. I wonder if this requires something more like a join or a nested sub query?

The SQL I wrote for the above is:

Select Class_of_Ticket, Flight_Number
From Ticket_Purchase
Where Class_of_Ticket = ('F')
Order By Flight_Number;


And it produces:

Class_of_Ticket Flight_Number
--------------- -------------
F 1
F 1
F 1
F 2
F 2
F 3
F 3
F 3
F 3
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 4
F 5
F 5
F 6
F 6
F 6
F 7
F 7
F 8
F 8
F 8
F 9
F 9
F 9
F 9
F 9

(38 row(s) affected)



Rather I would like it to produce:
First_Class_Seats Purchased Flight_Number
--------------------------- ------------
14 4


I hope I didn't make this to confusing to understand as I am still learning the syntax and 'lingo' of how to communicate this stuff verbally.

Thank you for any help you could offer. It would be much appreciated.

Edit: the query report I pasted from SQL should have the flight number directly under the column header. For some reason the space between Class and Flight_number is being eliminated in the post.

View 5 Replies View Related

Group By Alias Causing Problem...

May 30, 2008

Hi,

I am getting odd result while executing the below query.

SELECT COUNT(DISTINCT(D.image_id)),
(CASE WHEN D.stage_id IN (SELECT SS_STAGE.stage_id FROM SS_STAGE WHERE SS_STAGE.STAGE_ID = D.STAGE_ID )
THEN (SELECT SS_STAGE.STAGE_ID FROM SS_STAGE WHERE SS_STAGE.STAGE_ID = D.STAGE_ID)
ELSE D.stage_id
END) stage_id
FROM deadline D, OCCURRENCE O
WHERE O.image_id = D.image_id
AND (D.APPROVED_STAGE IS NULL OR D.CONFLICT = 1)
AND D.LOGON = 'pbitest2'
AND O.delete_ind = ' '
GROUP BY stage_id


My actual requirement is to group by using the alias name.
This query getting the results by grouping the STAGE_ID from DEADLINE table!!!.

Please help me on this...Thanks in Advance.


Sudheer

View 5 Replies View Related

Attach DB Causing Cachestore Flush

Mar 16, 2007

I have detached a SQL Server 2005 database from one server and attached it to another SQL Server 2005 and I now get the following in the error Log and in the event viewer evry 10 - 20 minutes or so.

SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

2007-03-16 12:37:14.64 spid17s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

2007-03-16 12:37:14.64 spid17s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

Starting up database 'DBName'

It appears under different SPID's 18, 20, 24 ...... and consistently has the 4 errors in a row
Full Text indexing is running for both servers but I dont know if this is the cause of the error.

I would greatly appreciate any help to get rid of this as I have trawled the net and not found anything of use.

Thank You.

View 8 Replies View Related

Cursor Causing Infinite Loop

Dec 13, 2007

Hi i have a cursor in a Stored Procedure. The problem is that it's poiting to the first row and causing an infinite loop on it.
How can i stop this and make it go to all rows. Here is my code.

Declare @CountTSCourtesy int
Declare @WaiterName nvarchar(100), @CursorRestaurantName nvarchar (100)
Declare waiter_cursor CURSOR FOR

SELECT new_waiteridname, new_restaurantname
FROM dbo.FilteredNew_CommentCard
Where new_dateofvisit between @FromDate and @ToDate and new_restaurantname = @Restaurant
Open waiter_cursor
FETCH NEXT FROM waiter_cursor
into @WaiterName,@CursorRestaurantName
While @@FETCH_STATUS=0

BEGIN
Exec WaitersCountExCourtesy @WaiterName,@CursorRestaurantName

END
Close waiter_cursor
Deallocate waiter_cursor
END


Thanks in advance...

View 1 Replies View Related

Sql Server 2000 Causing TCP/IP To Crash?

Nov 23, 2005

I installed Sql Server 2000 on a Windows 2003 machine and everythingappeared to be fine. It has Sql Server SP4 and Windows 2003 SP1 installed.The problem occurs whenever I use Enterprise Manager or Query Analyzer formore than a few minutes. After a while, all internet connectivity on theserver machine is broken. I cannot connect to it through Enterprise Manager,and on the machine itself, nothing related to the internet works at all.There are no errors in the Windows log or the Sql log. Disabling andenabling the Ethernet adapter fixes connectivity, until the next time I useEnterprise Manager for a while. What is going on?The machine is a Dell PowerEdge SC420 with a BroadCom NetXtreme Gigabitadapter and Windows 2003 Enterprise Edition.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved