Strange Insert Problem

Mar 8, 2007

question structure
- code
- message after execute qurie
- question
- database diagram


CODE:

SET DATEFORMAT dmy;
INSERT INTO tblAddress (fkCityId, strAddressFull)
SELECT pkCityId,'street_209'
FROM tblCity
WHERE strCityName = 'Test-City';

INSERT INTO tblCustomer (fkCustomerLanguageId, fkCustomerGenderId, strCustomerName, strCustomerFirstname, dtCustomerBirthDate) SELECT pkLanguageId, pkCustomerGenderId,'test','user','8/03/2007 9:25:17'
FROM tblCustomerGender, tblCustomerLanguage
WHERE tblCustomerGender.strCustomerGenderName ='Male' and tblCustomerLanguage.strLanguageAbbrev ='Dutch';

INSERT INTO tblCustomerAddress(fkCustomerId, fkAddressId)
SELECT c.pkCustomerId, a.pkAddressId
FROM tblCustomer AS c, tblAddress AS a
WHERE c.strCustomerName = 'test' and c.strCustomerFirstname = 'user' and c.dtCustomerBirthDate = '8/03/2007 9:25:17' and a.strAddressFull ='street_209';

INSERT INTO tblAddressCategorie(fkCategorieAddressId, fkAddressId)
SELECT c.pkCategorieAddressId, a.pkAddressId FROM tblAddress AS a, tblCategorieAddress AS c
WHERE c.strCategorieName = 'Invoice' and a.strAddressFull = 'street_209';

INSERT INTO tblAddressCategorie(fkCategorieAddressId, fkAddressId)
SELECT c.pkCategorieAddressId, a.pkAddressId
FROM tblAddress AS a, tblCategorieAddress AS c
WHERE c.strCategorieName = 'Privat' and a.strAddressFull = 'street_209';



MESSAGE:

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)

(0 row(s) affected)


QUESTION:
last insert query is not done... why, because he is the same as the query before (only the data is different)???

if i only insert 1 thing in tblAddressCategorie, then he insert it correctly
if i insert 2 things he only insert the first
if i insert 3 things he only insert the first 2
if i insert 4 things he only insert the first 3
if i ...


DATABASE DIAGRAM:
database diagram that is involved with this problem:
see picture

View 2 Replies


ADVERTISEMENT

Strange Problem: SQL Insert Statement Does Not Insert All The Fields Into Table From Asp.net C# Webpage

Apr 21, 2008

An insert statement was not inserting all the data into a table. Found it very strange as the other fields in the row were inserted. I ran SQL profiler and found that sql statement had all the fields in the insert statement but some of the fields were not inserted. Below is the sql statement which is created dyanmically by a asp.net C# class. The columns which are not inserted are 'totaltax' and 'totalamount' ...while the 'shipto_name' etc...were inserted.there were not errors thrown. The sql from the code cannot be shown here as it is dynamically built referencing C# class files.It works fine on another test database which uses the same dlls. The only difference i found was the difference in date formats..@totalamount=1625.62,@totaltax=125.62are not inserted into the database.Below is the statement copied from SQL profiler.exec sp_executesql N'INSERT INTO salesorder(billto_city, billto_country, billto_line1, billto_line2, billto_name,billto_postalcode, billto_stateorprovince, billto_telephone, contactid, CreatedOn, customerid, customeridtype,DeletionStateCode, discountamount, discountpercentage, ModifiedOn, name, ordernumber,pricelevelid, salesorderId, shipto_city, shipto_country,shipto_line1, shipto_line2, shipto_name, shipto_postalcode, shipto_stateorprovince,shipto_telephone, StateCode, submitdate, totalamount,totallineitemamount, totaltax ) VALUES(@billto_city, @billto_country, @billto_line1, @billto_line2,@billto_name, @billto_postalcode, @billto_stateorprovince, @billto_telephone, @contactid, @CreatedOn, @customerid,@customeridtype, @DeletionStateCode, @discountamount,@discountpercentage, @ModifiedOn, @name, @ordernumber, @pricelevelid, @salesorderId,@shipto_city, @shipto_country, @shipto_line1, @shipto_line2,@shipto_name, @shipto_postalcode, @shipto_stateorprovince, @shipto_telephone,@StateCode, @submitdate, @totalamount, @totallineitemamount, @totaltax)',N'@billto_city nvarchar(8),@billto_country nvarchar(13),@billto_line1 nvarchar(3),@billto_line2 nvarchar(4),@billto_name nvarchar(15),@billto_postalcode nvarchar(5),@billto_stateorprovince nvarchar(8),@billto_telephone nvarchar(3),@contactid uniqueidentifier,@CreatedOn datetime,@customerid uniqueidentifier,@customeridtype int,@DeletionStateCode int,@discountamount decimal(1,0),@discountpercentage decimal(1,0),@ModifiedOn datetime,@name nvarchar(33),@ordernumber nvarchar(18),@pricelevelid uniqueidentifier,@salesorderId uniqueidentifier,@shipto_city nvarchar(8),@shipto_country nvarchar(13),@shipto_line1 nvarchar(3),@shipto_line2 nvarchar(4),@shipto_name nvarchar(15),@shipto_postalcode nvarchar(5),@shipto_stateorprovince nvarchar(8),@shipto_telephone nvarchar(3),@StateCode int,@submitdate datetime,@totalamount decimal(6,2),@totallineitemamount decimal(6,2),@totaltax decimal(5,2)',@billto_city=N'New York',@billto_country=N'United States',@billto_line1=N'454',@billto_line2=N'Road',@billto_name=N'Hillary Clinton',@billto_postalcode=N'10001',@billto_stateorprovince=N'New York',@billto_telephone=N'124',@contactid='8DAFE298-3A25-42EE-B208-0B79DE653B61',@CreatedOn=''2008-04-18 13:37:12:013'',@customerid='8DAFE298-3A25-42EE-B208-0B79DE653B61',@customeridtype=2,@DeletionStateCode=0,@discountamount=0,@discountpercentage=0,@ModifiedOn=''2008-04-18 13:37:12:013'',@name=N'E-Commerce Order (Before billing)',@ordernumber=N'BRKV-CC-OKRW5764YS',@pricelevelid='B74DB28B-AA8F-DC11-B289-000423B63B71',@salesorderId='9CD0E11A-5A6D-4584-BC3E-4292EBA6ED24',@shipto_city=N'New York',@shipto_country=N'United States',@shipto_line1=N'454',@shipto_line2=N'Road',@shipto_name=N'Hillary Clinton',@shipto_postalcode=N'10001',@shipto_stateorprovince=N'New York',@shipto_telephone=N'124',@StateCode=0,@submitdate=''2008-04-18 14:37:10:140'',@totalamount=1625.62,@totallineitemamount=1500.00,@totaltax=125.62
 
thanks

View 7 Replies View Related

Very Strange SQL INSERT Command Error.

Jun 4, 2007

"INSERT INTO tblEquip(buydate,Country,feature,pc,Provider,Serial,Status,Warranty,Year,Typeid ) VALUES ('12/12/2008','Viet Nam','Supper Power ',0,'IBM','ABCDEF','Out of warranty','12/12/2008',1965,5);"



I use Visual 2005 IDE and code in C# , with an MS Access 2003 Databse.

Above SQL command is gotten from Debug.

It works well when i paste into a query in MS Access 2003.

But in my project, it return an error : Syntax error in INSERT INTO statement when I use a try catch statement.



Where is my wrong ? Please help me.Thanks!

View 3 Replies View Related

Strange, Very Strange (BIDS)

Jul 19, 2006

Hi everyone,

I€™m suffering a queer behaviour when I use BIDS. Concretely, when I open a dtsx from my project (it has 10 packages) many times Sequence Container and Data Flow tasks are invisible. I mean, its lines are not visible at all whereas its titles are. I mean, what you see is just a white box€¦

Then, I€™m gonna Data Flow layer and I have to do double-clik over the tasks and are visible but on Control Flow I don€™t see how to solve.

Curiously in our development and production server such behaviour doesn€™t happen (we are accessing by mean Terminal Server from our workstations)

How odd!. Everything is fine except this.

I want to remark you that such project has been copied from the server, this is, these packages are been built on the server

Thanks for your thougts or ideas,

View 5 Replies View Related

Now This Is A Strange One.

Mar 6, 2007

I have a datasource where i assign the control Parameter value depending on whether theres a value in the querystring or a gridview selectedvalue is indeed selected.When i do this using a querystring it works fine, however, when i do it using gridView_selectedIndexChanged it doesn't work.Here's the code     <asp:SqlDataSource ID="jobDetailsDS" runat="server" ConnectionString="<%$ ConnectionStrings:promanConn %>" SelectCommand="SELECT tblJobs.intJobId, tblJobs.intJobStaffId, tblJobs.intJobUserId, tblJobs.intJobCategoryId, tblJobs.strJobTitle, tblJobs.strJobDesc, tblJobs.strJobNotes, tblJobs.dateJobLogged, tblJobs.dateJobDeadline, tblJobs.dateJobCompleted, tblJobs.intJobPriorityId, tblJobs.strJobSolution, tblJobs.boolJobCompleted, tblPriority.priorityName, tblPriority.id, tblPriority.priorityOrder, tblStaff.staffName, tblStaff.id AS staffID, tblProblemCategoriesLookup.strProblemCatName, tblProblemCategoriesLookup.intProblemCatId, tblStaff_1.id AS Expr1, tblStaff_1.staffName AS UserName FROM tblJobs INNER JOIN tblPriority ON tblJobs.intJobPriorityId = tblPriority.id INNER JOIN tblStaff ON tblJobs.intJobStaffId = tblStaff.id INNER JOIN tblProblemCategoriesLookup ON tblJobs.intJobCategoryId = tblProblemCategoriesLookup.intProblemCatId INNER JOIN tblStaff AS tblStaff_1 ON tblJobs.intJobUserId = tblStaff_1.id WHERE (tblJobs.intJobId = @intJobId)"     InsertCommand="INSERT INTO tblJobs(intJobStaffId, intJobUserId, intJobCategoryId, strJobTitle, strJobDesc, strJobNotes, dateJobLogged, dateJobDeadline, intJobPriorityId, boolJobCompleted) VALUES (@intJobStaffId, 56 , 39, @strJobTitle, @strJobDesc, @strJobNotes,{ fn NOW() }, { fn NOW() }, @intJobPriorityId, 0); ">                <SelectParameters>            <asp:Parameter Name="intJobId" Type="int32" />        </SelectParameters>        <InsertParameters>            <asp:Parameter Name="intJobStaffId" Type="Int32" />            <asp:Parameter Name="strJobTitle" Type="String" />            <asp:Parameter Name="strJobDesc" Type="String" />            <asp:Parameter Name="strJobNotes" Type="String" />            <asp:Parameter Name="intJobPriorityId" Type="Int32" />            <asp:Parameter Name="intJobUserId" Type="Int32" />        </InsertParameters>    </asp:SqlDataSource>Code Behind             ElseIf dest > 0 Then            jobDetailsDS.SelectParameters.Item("intJobId").DefaultValue = Request.QueryString("dest")            notesDS.SelectParameters.Item("intJobId").DefaultValue = Request.QueryString("dest")            notesDS.InsertParameters.Item("intJobId").DefaultValue = Request.QueryString("dest")            gvActiveJobs.Visible = "False"        End If    End Sub    Protected Sub gvActiveJobs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvActiveJobs.SelectedIndexChanged        gvActiveJobs.Visible = "False"        jobDetailsDS.SelectParameters.Item("intJobId").DefaultValue = gvActiveJobs.SelectedValue        notesDS.SelectParameters.Item("intJobId").DefaultValue = gvActiveJobs.SelectedValue        notesDS.InsertParameters.Item("intJobId").DefaultValue = gvActiveJobs.SelectedValue    End Sub I also debugged and checked the value of gvActiveJobs.SelectedValue and it is what i was expecting but its still no good.Can anyone help?ThanksMatt 

View 2 Replies View Related

Very Strange

Nov 19, 2001

I moved a table from one file group to another file group. After moving the table the row count show 0 but when I open the table it’s returning all the rows. Is something wrong with the table? Do I have created a cluster index and drop on the table?

View 1 Replies View Related

Strange Fix

Aug 2, 2006

Hi,
I have table in my db thats used as a temporary table. At the end of the day it contains thousands of records which get summarized then all are deleted. I recently moved the application over to a new server with pretty much the same hardware config and noticed a big performance hit when running queries on this temp table (455 milliseconds as opposed to 1) In short, the fix was dropping the table and re-creating it.
Anybody know how this could be? I know that even if you delete records from a table, the table still seems to retain its physical size on the hard drive, could this have something to do with it?

Thanks

View 3 Replies View Related

Strange!

May 4, 2004

CREATE TABLE #users(users varchar(50),pasw varchar(50),title varchar(50))
insert into #users select 'test','abcdef','ceo'
SELECT * FROM #users
alter table #users alter column pasw nvarchar(50)
update #users set pasw=pwdencrypt(pasw)
SELECT * FROM #users

What happens to the TITLE column?
I had a table like the above with users and passwords in the Production DB. The password column had VARCHAR type. I changed it to NVARCHAR and encrypted the passwords. When i executed the SELECT *, the title column appeared like this. :eek:
If i query the table by column names instead of * i see the correct values. I couldn't understand what behaviour is it.

Howdy!

View 7 Replies View Related

Strange

May 22, 2008

Hi Experts,
Am able to restart my local sql server using a login which dont have a sysadmin privileage.This login only have access to a particular database .Its only having datareader and datawriter as DB roles but still am able to restart the server.Please help


TIA


RKNAIR

View 5 Replies View Related

Insert :) I Have Different Insert Code Lines (2 Insert Codelines) Which One Best ?

Jun 4, 2008

hello friends
my one insert code lines is below :) what does int32 mean ? AND WHAT IS DIFFERENT BETWEEN ONE CODE LINES AND SECOND CODE LINES :)Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Dim cmd As New SqlCommand("Insert into table1 (UserId) VALUES (@UserId)", conn)
'you should use sproc instead
cmd.Parameters.AddWithValue("@UserId", textbox1.text)
'your value
Try
conn.Open()Dim rows As Int32 = cmd.ExecuteNonQuery()
conn.Close()Trace.Write(String.Format("You have {0} rows inserted successfully!", rows.ToString()))
Catch sex As SqlExceptionThrow sex
Finally
If conn.State <> Data.ConnectionState.Closed Then
conn.Close()
End If
End Try
MY SECOND INSERT CODE LINES IS BELOWDim SglDataSource2, yeni As New SqlDataSource()
SglDataSource2.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ToString
SglDataSource2.InsertCommandType = SqlDataSourceCommandType.Text
SglDataSource2.InsertCommand = "INSERT INTO urunlistesi2 (kategori1) VALUES (@kategori1)"
SglDataSource2.InsertParameters.Add("kategori1", kategoril1.Text)Dim rowsaffected As Integer = 0
Try
rowsaffected = SglDataSource2.Insert()Catch ex As Exception
Server.Transfer("yardim.aspx")
Finally
SglDataSource2 = Nothing
End Try
If rowsaffected <> 1 ThenServer.Transfer("yardim.aspx")
ElseServer.Transfer("urunsat.aspx")
End If
 
 
cheers

View 2 Replies View Related

Strange Error

Aug 3, 2006

I am using c# and ASP.NET 2 and I am getting a very strange error. I
have a field called CompanyID in SQL Server 2005, and it allows null
values in it. When this CompanyID is not NULL, ie for example it is
202, then when i press the update button it allows me to update
perfectly in the database. However if the CompanyID is NULL,
and I try to update the companyID, to lets say 202, the application
just crashes with the following message:- System.InvalidCastException: Object cannot be cast from DBNull to other types. I tried to set some breakpoints in the application to debug, however it does not even pass through these breakpoints! Any ideas on what the problem can be or how I can debug? Thanks for your help and time Johann

View 6 Replies View Related

Strange Behaviour

Oct 3, 2006

This is the actual statement displayed from Response.Write in classic ASP. INSERT INTO WOTasks (WoNum,TaskNum,TaskDesc,TaskMemo,Account,ModifyDate,Estimate,TaskHours,Unit,UnitCost,TotalCost) SELECT '06-012497',TaskNum,TaskDesc,TaskMemo,Account,'2006-Oct-3',1,TaskHours,Unit,UnitCost,TotalCost FROM Tasks WHERE procnum = '000002' There are 4 records returned from the SELECT part of the statement. In some situations, 4 records are inserted to WOTasks table, in others, only 1 record is inserted. I can't find out why 1 record, instead of 4, record is inserted. A form page submits the form to the save page using post method. The above statement is contained in the save page. When one of the form textbox is filled, 1 record is inserted. When the textbox is not filled, 4 records are inserted. You may think the textbox has something to do with the behaviour. I also think so but the content of the textbox does not affect the sql statement. In both cases, the insert statement is the same. In the actual codes, only strings in quotes are variables and the rest are hardcoded. When I run the statement in SQL Server, 4 records are affected. No such problem when connected with Access.The actual code belowSub AddTask(ByVal proc, ByVal wonum)   Dim sSQL   sSQL = "INSERT INTO WOTasks (WoNum,TaskNum,TaskDesc,TaskMemo,Account,ModifyDate,Estimate,TaskHours,Unit,UnitCost,TotalCost) SELECT '" & wonum & _          "',TaskNum,TaskDesc,TaskMemo,Account,'" & curDate & "',1,TaskHours,Unit,UnitCost,TotalCost FROM Tasks WHERE procnum='" & proc & "'" 'Response.Write sSQL:Response.End   conn.Execute sSQL, , 128 End Sub

View 2 Replies View Related

Strange SQL Issue

Jan 20, 2008

Hi there I have this statement I have written as follows:strCommand = "SELECT * FROM tblstock WHERE Type='"&Statement &"' AND Description like'"&criteria &"%' OR Tag like'"&criteria &"%'OR Location like'"&criteria &"%' OR LAN like'"&criteria &"%' OR RAM like'"&criteria &"%' OR CD like'"&criteria &"%' OR OS like '" &criteria &"%' OR SN like'" &criteria &"%' OR DeviceStatus like'" &criteria &"%' ORDER BY " &sSortStr     The variable "Statement" is passed into the sub as "PC"  which means only records of type "PC" should be displayed along with any other criteria.  The issue I'm having is that when I specify criteria I'm also recieving other types eg "Cameras" if they contain any of my criteria..  I can't understand how because in the statement I tell it only to display records of type "PC".. Anybody know what I'm doing wrong? Thanks 

View 3 Replies View Related

Strange Behavior

Feb 1, 2008

 I've done a new tabel that insert the UserId that in a uniqueidentifier get from Membership.GetUser().ProviderUserKeySo if I want to make a select statement threw storedprocedure in codebehind it runs as it shouldCode behindDim GetCustomersCars As CustomerCarByUserId = New CustomerCarByUserId MyCars.DataSource = GetCustomersCars.CarByUserId(Membership.GetUser().ProviderUserKey)MyCars.DataBind() But in when I use ObjectDataSource it fails<asp:ObjectDataSource id="ObjectDataSource1" runat="server" selectmethod="CarByUserId"                            typename="CustomerCarByUserId">                            <SelectParameters>                                <asp:Parameter defaultvalue="Membership.GetUser().ProviderUserKey" name="UserId" type="Object" />                            </SelectParameters>                        </asp:ObjectDataSource>I've tried with Membership.GetUser().ProviderUserKey.ToString(), but that doesnt work. Error message:InvalidCastExceptionI connect to the same source in both cases.Any one with an Idee ?

View 1 Replies View Related

A Strange Error Here...

May 13, 2008

So we currently are running a SQL 7 Server, which hopefully we will be updating this year but untill then we're stuck.  I've got a web app using ASP.NET 2.0 and on occasion I get this error:
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - Only one usage of each socket address (protocol/network address/port) is normally permitted.) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open()

View 2 Replies View Related

Very Strange Error Can Anyone Help With .

Mar 25, 2004

I Some sql that it keeps throwing the following error

SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

Here is the sql

UPDATE dbo.temptable
SET code = 'MM'
FROM dbo.temptable T
JOIN dbo.Item I WITH (NOLOCK)
ON T.ProductID = P.ProductID
JOIN dbo.cars C WITH (NOLOCK) ON I.ModelID = C.ModelID
JOIN dbo.carmakes CM WITH (NOLOCK) ON CM.MakeID = C.MakeID
JOIN dbo.CarDealerMakes CDM WITH (NOLOCK)
ON CM.MakeID = CDM.MakeID
WHERE T.ProductID NOT IN (

SELECT distinct A.ProductID
FROM dbo.Action A WITH (NOLOCK)
JOIN dbo.ActionPurchases AP WITH (NOLOCK)
ON A.ActionID = AP.ActionID
WHERE A.CustomerID = 2

UNION

SELECT distinct A.ProductID
FROM dbo.Action A WITH (NOLOCK)
JOIN dbo.ActionServices S WITH (NOLOCK)
ON A.ActionID = S.ActionID
WHERE 2 = A.ProductID)

That sql will run on windows 2000 but it will not run on windows 2003.
I have the latest service pack.

Has anyone ever come across this before or have and suggestions ?

View 2 Replies View Related

Strange In Query

Jul 9, 2005

I have a query as follow:
SELECT @resRate = (SELECT resRate FROM ProjectAssign WHERE proNo =                                                             (SELECT projNo FROM Timer_Cust WHERE refNum = @actProjNo  AND                                                                        username= (SELECT username FROM Timer_Emp WHERE refNum = @actEmployee)                                                             )                                        )
 the definition of table Timer_cust contains refNum(int),  projNo(varchar) and projName(varchar).Timer_cust table doesn't contain column username. So  this query shoud generate a runtime error. however it works fine without error.But if I run                      SELECT projNo FROM Timer_Cust WHERE refNum = @actProjNo  AND                                                                        username= (SELECT username FROM Timer_Emp WHERE refNum = @actEmployee)A runtime error message appears.Why?

View 3 Replies View Related

Strange Indexes

Aug 13, 2001

Can any one tell me why sp_helpindex shows several indexes though there is only one index on the table. When i use Enterprise manager it shows only one index..Any idea..is it a bug ..do I need to apply latest service pack ?

Here is the output shows

IX_tbl_ncf_bo
_WA_Sys_Deal_No_2902ECC1
_WA_Sys_fwddate_2902ECC1
_WA_Sys_deal_type_2902ECC1
_WA_Sys_RegionID_2902ECC1
_WA_Sys_CompID_2902ECC1
_WA_Sys_To_Include_2902ECC1
_WA_Sys_SvcChoice_2902ECC1
_WA_Sys_UtilityID_2902ECC1

First one is actual index that I created, remaining

View 1 Replies View Related

Strange!any Explanations????

Jul 31, 2000

i have four separate jobs which run at scheduled time daily..out of which one job has run properly and the other three have not run at all(there is no details of it in "View job history")for only one day in between..again from the next day all the four jobs are running properly.what could be the reason for the three jobs not running on a particular day?(The jobs were scheduled between 3 and 4am in the morning..so nobody would be using the system at that time and the system was definitely up at that time as that one job has run)
i could afford to have such strange behaviour in future as the jobs are important and should run daily.any ideas by which i could make sure all four jobs run daily?

View 6 Replies View Related

Strange Indexes.

Feb 6, 2001

We've been finding some strange indexes in our SQL 7 database. They are not indexes we put in, but seem to be system generated. They always have the format "hind_" and then a series of numbers and underscores. Most of the time they replicate indexes we already had in place. The strangest part is that in some cases they seem to be generating multiple clustered indexes on the same table. A previous question recieved an answer saying that they were statistical indexes. Could someone shed a little more light on what these are, where they came from, and how I can prevent them from coming back? Our queries usually take much longer on tables with these "rogue" indexes on them. Thanks.

View 1 Replies View Related

Strange Len Function

Mar 13, 2003

Why is it so?

select len("Test")
--returns 4

select len("Test ")
--returns 4

select len(" Test ")
--returns 7

why not all 4 ?
why not 4,11,14?

View 6 Replies View Related

Strange Behavior

Nov 29, 2005

I have a SP that usually works fine (0-16 CPU time, 40 ms Duration), but from time to time the server hangs with apparently no reason. The SP has a lock timeout set to 500, so it should abort if a lock timeout error (1222) occurs but it doesn't. The Profiler reports very long execution time (over 30 sec), and because of that all other SP calls are blocked, 'cause the transaction opened by the first sp execution is not finished yet.
Any other attempts to identify other blocking queries did not show me anything suspect (sp_lock, dbcc opentran) other then the usual blocked chain. I'm starting to think about an IO bottleneck, or IO failure, that could block the disk access and cause the delay. The status of RAID 5 is healthy.

The server is used as storage system for a website (approx. 2000 concurrent users), and occasionally I noticed an ASP queue, but this strange behavior occurs even during the peak-off hours.


Any thoughts ?
-----
HP Server - 2 CPU @ 3,4 ; 4 GB RAM; SCSI - RAID 5
Windows 2000 Advanced Server - SQL Server 2000 SP4

View 1 Replies View Related

Strange Table

Apr 24, 2006

I have a table. It shows "Rows: 2" when I open it in the table properties dialog. But there is no record in the table when I open it from Open Table -> Return All Rows.

I don't understand how this can happen. Any help is appreciated.

Thanks.

View 6 Replies View Related

Strange Error

Nov 19, 2006

Hello
I have one PC with SQL server 2000 and I am working on one database called TaxReg but today I found it gray and (suspect) beside it
could you please tell what is the problem and how to fix it ?

View 1 Replies View Related

It's Really A Strange World Over In....

Jul 16, 2007

...the Access forum...so many bad practices

Like this one

http://www.dbforums.com/showthread.php?p=6284279&posted=1#post6284279

View 12 Replies View Related

Strange Results Using IN

Mar 2, 2004

I received some strange results after typing the wrong column in a subselect using IN. I've been puzzling over it a while now and can't quite figure out why it is doing what it is.
Here's an example of what is happening.


use northwind
go

select * from Customers where CustomerID in
( select CustomerID from Employees where 1 = 0 )


Now, there is no customerid on the Employees table, so running the subquery alone will produce an error. However when the full query above is run, all rows in the customer table are returned.

It was my understanding that the inner querry is evaluated first, and the results used by the outer query. I'm having a hard time seeing how this query is going anywhere.

Any ideas?

View 13 Replies View Related

A Very Strange Problem

Mar 24, 2004

I have a simple query which ran fine for the last 12 months. All of sudden, it's dragging and couldn't finish in 6 hours. I tried to trace down where the problem resided but it's such a simple query there is nothing to break down. By chance, I commented out all the column names and replace with ' SELECT * ', the query finished in 14 seconds. Once I replace the * with column names, it ran over 20 minutes and I had to cancel it because it doesn't seem to be returning any results. Any help would be appreciated. Thanks.

View 11 Replies View Related

Strange Problem In AS - Please Help

Apr 20, 2004

Hi,

When I use only 2 dimensions linked with my fact and process the cube, I get the correct results for my measure (I have checked this will all
possible combinations of the 2 dimensions)....

However when I add more dimensions, link them with the fact, process the cube, and check the same results I get totally different totals for my
measure :confused:

I realize that ideally I should post the DDLs for all dimensions etc.
but to start with can anyone think of what could be causing this.

I'll appreciate your help.

Thanks.
P.S

Exhausted :(

View 1 Replies View Related

Strange View!!!

May 4, 2004

NO MIRACLES !!!!!!!!!!!!!!

(see point number 8 in Brett's list)

View 14 Replies View Related

Sql Profiler Very Strange.

Apr 9, 2008

SQL profiler displays duration 70610. But textdata doesn't display anything. Anyone know why?

View 3 Replies View Related

Strange Error

May 19, 2008

SELECT TOP 9 id,vehicleref,capid,manufacturer,model,derivative,ch,'3' as term,'10000' as mileage,'orderby' as orderby,cvehicle_shortmodtext,source,studioimages FROM vwAllMatrixWithLombardAndShortModel
WHERE locatcode =1
GROUP BY id,vehicleref,capid,manufacturer,model,derivative,ch,term,mileage,orderby,cvehicle_shortmodtext,source,studioimages

Msg 207, Level 16, State 1, Line 2
Invalid column name 'mileage'.
Msg 207, Level 16, State 1, Line 2
Invalid column name 'orderby'.

Can anyone help?

Thanks

View 2 Replies View Related

A Strange Table

Apr 24, 2006

I have a table. It shows "Rows: 2" when I open it in the table properties dialog. But there is no record in the table when I open it from Open Table -> Return All Rows.

I don't understand how this can happen. Any help is appreciated.

Thanks.

View 3 Replies View Related

A Strange Query

Jun 8, 2007

hi there , i'm using sql server 2005 express and i have some problems with the two of my tables :), iwant to query both of my tables but the table entries are not in an equal count of rows for example:

incoming(table) outgoing(table)

money date corp money date corp
15 1,1,2006 ar 17 1,1,2006 ar
25 1,2,2007 ar 21 2,2,2007 es
35 2,2,2007 es
6 3,3,2007 ar


in this example the first table has more rows but the opposite is possible in my tables because this is an (account extract) query and here's my problem: first i used the "select incoming.money as m1,incoming date as d1,incoming.corp as c1,outgoing.money as m2,outgoing.date as d2,outgoing.corp as c2 from incoming left outer join outgoing on incoming.corp=outgoing.corp where incoming.corp='ar'(or don't use the where eliminating)" any way i couldn't get the correct results, then i used the (union all) select , the result was ok but the results form is not what i want here's the form i want and is it possible to query to tables to get this?
in this query i just wanted the elements with the corporation named 'ar' for example:


m1 m2 d1 d2 c1 c2

15 17 1,1,2006 1,1,2006 ar ar
25 null(or (0)) 1,2,2007
6 null(or (0)) 3,3,2007


is it possible to achieve this form(and may be any of the tables may have more rows than the other, it's not exact) , i am in a very difficult position :) and now i need your help , thanks anybody to think of helping me

View 4 Replies View Related







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