Indexes Being Improperly Used When Selecting Data Through A View

Nov 23, 2005

I am having a problem with indexes on specific tables. For some reason
a query that runs against a view is not selecting the correct index on
a table. I run the same query against the table directly and it looks
fine. Can anyone give me some insight? Thanks.

PRODUCTION1:
CREATE TABLE MyTest1 (ID INT IDENTITY(1,1), COLUMN1 CHAR(10), COLUMN2
CHAR(10))
CREATE CLUSTERED INDEX IDX_MyTest1 ON MyTest1 ON (ID)
CREATE NONCLUSTERED INDEX IDX_MyTest2 ON MyTest1 ON (COLUMN2, ID)

ARCHIVE1:
CREATE TABLE MyTest1 (ID INT IDENTITY(1,1), COLUMN1 CHAR(10), COLUMN2
CHAR(10))
CREATE CLUSTERED INDEX IDX_MyTest1 ON MyTest1 ON (ID)
CREATE NONCLUSTERED INDEX IDX_MyTest2 ON MyTest1 ON (COLUMN2, ID)

REPORTDB:
CREATE VIEW MyTest1 AS
SELECT ID, COLUMN1, COLUMN2 FROM PRODUCTION1..MyTest1
UNION ALL
SELECT ID, COLUMN1, COLUMN2 FROM ARCHIVE1..MyTest1

While in PRODUCTION1:
SELECT ID, COLUMN2 FROM MyTest1 WHERE COLUMN2 = 'Testing'
--> Clustered index seek PRODUCTION1..IDX_MyTest2
--> Results returned

While in ARCHIVE1:
SELECT ID, COLUMN2 FROM MyTest1 WHERE COLUMN2 = 'Testing'
--> Clustered index seek ARCHIVE1..IDX_MyTest2
--> Results returned

While in REPORTDB:
SELECT ID, COLUMN2 FROM MyTest1 WHERE COLUMN2 = 'Testing'
--> Index seek PRODUCTION1..IDX_MyTest2
--> Bookmark lookup PRODUCTION1..IDX_MyTest1
--> Index seek ARCHIVE1..IDX_MyTest2
--> Bookmark lookup ARCHIVE1..IDX_MyTest1
--> Concatenate data and results returned

View 3 Replies


ADVERTISEMENT

Transact SQL :: Key And Indexes On Two Column Data Table Or Parsed View (Large String Of Data And Filename)

Oct 4, 2015

I am studying indexes and keys. I have a table that has a fixed width of data to be loaded in the first column which is parsed in a view based on data types within the fixed width specifications.

Example column A:
(name phone house cost of house,zipcodecountystatecountry)
-a view will later split this large varchar string based 
column b: is the source filename of the data load (varchar 256)
....

a. would there be a benefit of adding a clustered or nonclustered index (if so which/point in direction on why)

b. is there benefit of making one of these two columns a primary key (millions of records) or for adding a 3rd new column as a pk?

c. view: this parses the data in column a so it ends up looking more like "name phone house cost of house zipcode county state country" each having their own column.

-any pros/cons of adding indexes (if so which) to the view instead of the tables or both for once the data is parsed?

View 4 Replies View Related

Selecting A View And Selecting FROM A View Is Wildly Different

Feb 21, 2006

A colleague of mine has a view that returns approx 100000 rows in about 60 seconds.

He wants to use the data returned from that view in an OLE DB Source component.

When he selects the view from the drop-down list of available tables then SSIS seems to hang without any data being returned (he waited for about 15 mins).



He then changed the OLE DB Source component to use a SQL statement and the SQL statement was: SELECT * FROM <viewname>

In this instance all the data was returned in approx 60 seconds (as expected).





This makes no sense. One would think that selecting a view from the drop-down and doing a SELECT *... from that view would be exactly the same. Evidently that isn't the case.

Can anyone explain why?

Thanks

-Jamie

View 2 Replies View Related

Selecting Indexes

May 8, 2001

We are developing an Access application that will be used to run adhoc reports against a SQL Server table. Selection criteria is entered on a form, a passthru query is built on the fly, and the results are formatted for output via an Access report.

There are 16 different fields on the query form. Two are date fields (from / to), the rest are text. The user is required to supply a date range for the report. They may specify any combination of the remaining query fields.

Examples:
From/To dates, part number, work order number
From/To dates, location, operation, sales order number, operator

What is the best scheme to use for the indexes? One index for each potential query field? Or, a single index that includes ALL query fields? Or, some other combination?

I should also mention that there will be no realtime updates to the table. On a weekly basis, we will import updates from a mainframe extract (dropping the indexes prior to the import, rebuilding them afterwards).

View 1 Replies View Related

How To Use Different Indexes In View

Aug 18, 2005

I have a "employee" table. This table has a primary key "emp_id" this by default becomes the cluster index of the table.

There is a view "empl" defined with the index on "emp_id" field as "Emp_ID". This becomes the cluster index for the view. There are other two non clustered indexes "Fname" and "Lname".

I want to use Both indexes without using "Order By" Clause. Can I get the order of the "Fname" or "Lname" without using "Order By" Clause? How?

View 3 Replies View Related

Creating Indexes On View

Nov 9, 2000

Hi

I want to know if we can create indexes on Views in SQL 7.0. If yes, then how

Thanks

alsi

View 1 Replies View Related

Selecting From A View, Permissions Issue?

Oct 3, 2001

I have created a view where the data is a subset of the table. When a non dbo user selects only the first column from that view, the query returns the value. However, when the non dbo user selects any of the other columns or a combination of columns I get an invalid column name error. The syntax of my query is correct because it works when I use QA using a login with dbo permissions. Ideas?

Any help would be appreciated.

View 1 Replies View Related

View Returning 0 When Selecting, But Fine In QA

Feb 6, 2006

I have created the view below, when I highlight the select statement in QA it works fine, but when I try to access the view I get back 0 records!
ie:
select * from Email_All

It believe its something to do with the last not in section:
EmailsAddresses.Email not in (
if I comment it out everything works fine!

does not make any sense...anyone have any clues?

they are all views except the EmailSubscriptions table.

-------------------------------------------
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[Email_All]
AS




select * from
(
--SHELBY
select * from hcf..HM_EmailAddressShelby
union all
--KMS
select * from hcf..HM_EmailAddressKmai
union all
--EMAIL SUBSCRIPTIONS
select * from hcf..HM_EmailAddressWeb
where id in (select distinct id from hcf.dbo.EmailSubscriptions where List = 'PeriodicEmailsFromGreg' and status = 1)
) as EmailsAddresses
where
ltrim(rtrim(isnull(EmailsAddresses.Email,''))) <> ''
and
EmailsAddresses.Email not in (
select Email from hcf..ShelbyIdEmailSkip --OFF list SHELBY
union
select Email from hcf..KmaiIdEmailSkip --OFF list KMAI
union
select Email from hcf..EmailSubscriptions where List = 'PeriodicEmailsFromGreg' and status = 0 --OFF list PERIODIC FROM GREG
)




GO

SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

View 2 Replies View Related

Conversion Error When Selecting From View?

Sep 11, 2013

I have a view that is involved in an import. Sometimes the import will fail with the following error:

Msg 242, Level 16, State 3, Line 2
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

I can recreate the error just from selecting from the view. Why would something be converting when just selecting from view?

View 4 Replies View Related

A Deadlock When Selecting From A View With Replicated Tables.

Dec 15, 2006

I moved this from another forum because it seems more related to replication the longer I look into it!
The following code often dies on a deadlock. I have also seen "Spid x blocked by Spid x", where x is the spid of this connection. The view selects from several tables and some other views as well, and many of the underlying tables are being updated by replication. I have seen cases where the replication Insert proc participated in the deadlock, and the table being inserted into is joined twice in the view, suggesting that somehow this
causes the deadlock or makes a deadlock more likely?

SELECT * INTO dbo.tbl_stg_LoansMarketingFirstBorrower
FROM view_loans_marketing_first_borrower OPTION (MAXDOP 1)

I do not understand how selecting from a view can cause a deadlock with a
proc which does not reference tbl_stg_LoansMarketingFirstBorrower. Any
suggestions on how to diagnose this? I used (1204) to identify the proc and underlying table.

Thanks a bunch.

View 1 Replies View Related

Selecting A Single Data Source From Multiple Data Sources

Aug 4, 2006

Hi,

I am pretty new to SSIS. I am trying to create a package which can accept data in any of several formats. i.e. CSV, Excel, a SQL Server database/table and import the data into my destination database.

So far i've managed to get this working OK. However I am now TOTALLY stuck. I'm currently trying to just concentrate on the data sources being a CSV (using a Flat File Data Source) and/or an Excel Spreadsheet.

I can get the data in and to my destination using a UNION ALL component and mapping the data sources to it so long as both the CSV file and the Excel spreadsheet exist.

My problem is that I need my package to handle the possibility that only the CSV file might exist and there is no Excel spreadsheet. In which case i'd like the package to ignore the Excel datasource completely. Currently either of my data sources do not exist I get errors and the package terminates.

Is there any way in SSIS that I can check all my data sources to see which ones exist (i.e. are valid). If they exist I want to use them. If it doesn't exist i'd like to disgard it (without error - as long as there is a single datasource the package should run)

I've tried using the AcquireConnection method in a script task on each of my connections, hoping that it would error if the file/datasource did not exist. It doesn't though (in the case of an Excel datasource it just creates a empty excel file for me).

The only other option I can come up with are to have seperate packages depending on the type of data we want to import and then run a particular package depending on the format of the source data. This seems a bit long winded. I am pretty sure I must be able to do what I want to achieve but I can't work out how.

I'll be grateful to anyone who can send me any tips/hints/links on how I can achieve this.

Many thanks

Rob Gibson

View 5 Replies View Related

Data Access :: Selecting Data Without Making Any Lock

Oct 26, 2015

I have a scenarios where if I execute select * from tbl it should display the all the records without waiting to release any lock.  For example suppose I have one table called tbl and one session is updating one records and not committed yet and in other session if i execute select * from table I can see all the records, for that records it can show me older version. but my select statement should not wait to commit another session and also it should not show the modified data.

View 4 Replies View Related

Removal Of Selected Indexes / Script Index Create For List Of Indexes

Jul 1, 2014

I'm working to improve performance on a database I've inherited, and there are several thousand indexes. I've got a list of ones which should definitely exist within the database, and I'm looking to strip out all the others and start fresh, though this list is still quite large (1000 or so).

Is there a way I can remove all the indexes that are not in my list without too much trouble? I.e. without having to manually go through them all individually. The list is currently in a csv file.

I'm looking to either automate the removal of indexes not in the list, or possibly to generate the Create statements for the indexes on the list and simply remove all indexes and then run these statements.

As an aside, when trying to list all indexes in the database, I've found various scripts to do this, but found they all seem to produce differing results. What is the best script to list all indexes?

View 5 Replies View Related

Selecting Data

Aug 21, 2001

Hello .
Sometimes when i try to select data from a table (from a selected database)
using SQL Query Analyzer (for exemple) i receive an error message : "The Object XX does not exist" . But when i prefix it by the Owner it work .

What is the problem then ?

View 1 Replies View Related

Selecting The Most Recently Edited Item AND Selecting A Certain Type If Another Doesn't Exist

Sep 20, 2007

I've got a big problem that I'm trying to figure out:
I have an address table out-of-which I am trying to select mailing addresses for companies UNLESS a mailing address doesn't exist; then I want to select the physical addresses for that company. If I get multiple mailing or physical addresses returned I only want the most recently edited out of those.

I don't need this for an individual ID select, I need it applied to every record from the table.

My address table has some columns that look like:
[AddressID] [int]
[LocationID] [int]

[Type] [nvarchar](10)
[Address] [varchar](50)
[City] [varchar](50)
[State] [char](2)
[Zip] [varchar](5)
[AddDate] [datetime]
[EditDate] [datetime]

AddressID is a primary-key non-null column to the address table and the LocationID is a foreign key value from a seperate Companies table.
So there will be multiple addresses to one LocationID, but each address will have it's own AddressID.

How can I do this efficiently with perfomance in mind???

Thank you in advance for any and all replies...

View 2 Replies View Related

Selecting Data From 3 Tables...

Feb 12, 2006

Plugging away at my little message board that I am working on, I have hit another SQL snag. I am trying to select a list of all posts in a thread. I have to get each post, the name of the poster (which comes from a different table - referenced by userid), as well as some profil information, from a 3rd table (also referenced by the userid).

View 2 Replies View Related

Selecting And Inserting Data Into Another DB

Jan 28, 2004

Iam farely new to this so sorry for the newbie question.. but how do you select all data from one table and insert that data into the same table but in another sql database.

View 5 Replies View Related

Selecting Parts Of Data

Apr 20, 2008

Hey guys,

I was wondering if this is possible I have to be able to just select the number before the '-' in acolumn which is formatted like 123-456 so I just need the the 123 part.

Any ideas how this can be achieved?

Thanks.

View 8 Replies View Related

Selecting Data From Datalist

Jan 19, 2007



Hi all

I am having problem in selecting the data from my datalist. Here is teh sample code
<asp:datalist id="dlAttrName" runat="server" OnItemCommand="dlAttrName_SelectData" DataKeyField="attrID">
<ItemTemplate>
<asp:LinkButton ID="lbSelect" Runat="server" CommandName="Select" style="display:none">Select</asp:LinkButton>
<%# Container.DataItem("attrDef1")%>
</ItemTemplate>
</asp:DataList>
Private Sub dlAttrName_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles dlAttrName.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
'Add eventhandlers for highlighting
'a DataListItem when the mouse hovers over it.
e.Item.Attributes.Add("onmouseover","????")
e.Item.Attributes.Add("onmouseout", "????")
'Add eventhandler for simulating
'a click on the 'SelectButton'
e.Item.Attributes.Add("onclick", ?????????????????????, String.Empty))
??????????????????? this should have something like this
Me.Page.ClientScript.GetPostBackEventReference(e.Item.Controls(1)
But I am not able to get the ClientScript option, I don't know which namespace should I import?

I don't know whether I am right or not.
Its urgent please reply back soon,any help will be useful.
Thanks!!!!!!!

View 1 Replies View Related

Checkboxes, Bit Data Type And Indexes

Sep 27, 2005

I have checkboxes in an application. They are used in indexes. I started adding them as bit-type columns, but they aren't available in indexes. Should I use tinyint instead?

View 12 Replies View Related

Indexes On Bulk Insert Data

Jul 20, 2005

Any help would be appreciated.I am running a script that does the following in succession.1-Drop existing database and create new database2-Defines tables, stored procedures and functions in the database3-Imports data using bulk insert4-Analyzes data using stored proceduresI would like to improve the performance of the analysis in step 4 bycreating indexes in step 2.Question 1-Are indexes updated when data is bulk inserted? I know they arewhen using normal insert, update, or delete T-SQL but I am not sure aboutbulk insert of data.Question 2-Do I need to update the index statistics in any way or would theybe ready to use in step 4.Thanks,CJ

View 2 Replies View Related

Selecting Data Wheere Values Contain Something

Nov 17, 2007

Hi,I have a message system, where people insert their message to the database, and others pick up their messages by selecting messages that have their username as the reciever ID.I have just intoduced bulk message sending - sending to multiple users. This requires many usernames being entered into the recievername column, seperated by a comma.Is there a way to select messages if the column name contains their username, rather than is their username? Because there may be more than one name, I would like everyone that has their name in the column to be able to retrieve the message, even if they arent the only reciever..Please ask if more explanation is needed!Thanks,Jon 

View 47 Replies View Related

Selecting Random Data From Sql Server

Jan 21, 2008

 I have three tables that are joined together to retrieve a piece of data.Table One has the columns pid1(PK), idTable Two has the columns pid1, qid1, idTable three has columns qid1, question, answerHere is my sql statement:SELECT  Table1.pid1, Table2.qid1, Table3.Question FROM Table1 JOIN Table2 ON Table1.pid1=Table2.pid1 JOIN Table3 ON Table2.qid1=Table3.qid1 WHERE Table1.pid=...(N)I put an elipsis because I'm stuck on how to proceed from here.  See I need to randomly select a value from column pid1 in table1 then use this value to replace N in the sql statement, then have the statement run and randomly return exactly one piece of data instead.Is this possible? How can you randomly get one piece of data from joining three table without a WHERE CLAUSE. 

View 1 Replies View Related

Selecting Data Using A Range Of Dates

Apr 30, 2006

For some reason this is just not "clicking" with me and the longer I stare at it the more I overcomplicate things and then I just confuse myself further...

Provided this relation showing where "pkey" and "skey" met on "ServiceDate":


Code:


skey pkey ServiceDate
--------------------------------------
123 1 11/12/2005
124 1 10/12/2005 *
123 2 10/02/2005
124 2 10/12/2005
124 2 11/12/2005
123 2 11/02/2005


I need to select out a list of distinct pkeys and skeys only when there was no meeting between the two in November 2005. In other words, this query would produce only one record - the starred record - when run against this sample table. This is because even though, for example, skey 124 / pkey 2 has an entry outside the desired range, it also has one inside the desired range. The same goes for the record outside our range for 123 and 2 - it also has a record inside our range.

At this point, I've come to the conclusion that I can first select all the distinct pkeys and skeys where the servicedate is not in 11/2005 then join it to a selection of distinct pkeys and skeys where the servicedate IS in the desired date range. Does that seem like the most straightforward way through this?

I don't get the impression that this is that complicated a problem, but it's one of those deals where I goofed up somewhere along the line, and now I think I'm really overthinking the problem, so I'd be much obliged if someone could give me a hearty slap to clear the ol' noggin.

View 1 Replies View Related

Access Violation When Selecting Data

Dec 6, 2005

Hi,

I have suddenly developed a problem when trying to select from a table. Even a standard select * from generates a SQL Dump exception handler. The table is below:

CREATE TABLE [Stagetb_GIDeptGroup] (
[f_GIImportID] [int] IDENTITY (1, 1) NOT NULL ,
[f_GIAction] [int] NOT NULL CONSTRAINT [DF_stagetb_GIDeptGroup_f_GIAction] DEFAULT (0),
[f_ImportBatchID] [int] NULL ,
[f_VisualDeptGroupID] [int] NULL ,
[f_DeptGroupName] [varchar] (40) COLLATE Latin1_General_CI_AS NULL ,
[f_DeptGroupTarget] [d_Percentage] NULL ,
[f_ExternalDeptGroupID] [int] NULL ,
[f_StatusID] [int] NOT NULL CONSTRAINT [DF_stagetb_GIDeptGroup_f_StatusID] DEFAULT (0),
[f_StatusDetailID] [int] NOT NULL CONSTRAINT [DF_stagetb_GIDeptGroup_f_StatusDetailID] DEFAULT (0),
CONSTRAINT [PK_stagetb_GIDeptGroup] PRIMARY KEY CLUSTERED
(
[f_GIImportID]
) ON [PRIMARY]
) ON [PRIMARY]
GO

When i run a dbcc checkdb it finds nothing, if i try and connect from a remote connection i get a general network error and when connecting from the local machine i get this Dump exception error:

2005-12-06 08:40:55.28 spid53 Error: 0, Severity: 19, State: 0
2005-12-06 08:40:55.28 spid53 language_exec: Process 53 generated an access violation. SQL Server is terminating this process..
2005-12-06 08:40:57.76 spid53 Using 'sqlimage.dll' version '4.0.5'
Stack Dump being sent to C:Program FilesMicrosoft SQL ServerMSSQLlogSQL00010.dmp
2005-12-06 08:40:57.76 spid53 Error: 0, Severity: 19, State: 0
2005-12-06 08:40:57.76 spid53 SqlDumpExceptionHandler: Process 53 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
************************************************** *****************************
*
* BEGIN STACK DUMP:
* 12/06/05 08:40:57 spid 53
*
* Exception Address = 00425E61
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 00000000
* Input Buffer 70 bytes -
* select * from stagetb_GIDeptGroup
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00B19FFF 0071a000
* ntdll 77F50000 77FF6FFF 000a7000
* kernel32 77E60000 77F45FFF 000e6000
* ADVAPI32 77DD0000 77E5CFFF 0008d000
* RPCRT4 78000000 78085FFF 00086000
* USER32 77D40000 77DC5FFF 00086000
* GDI32 7E090000 7E0D0FFF 00041000
* OPENDS60 41060000 41065FFF 00006000
* MSVCRT 77C10000 77C62FFF 00053000
* UMS 41070000 4107CFFF 0000d000
* SQLSORT 42AE0000 42B6FFFF 00090000
* MSVCIRT 002A0000 002AFFFF 00010000
* sqlevn70 41080000 41086FFF 00007000
* NETAPI32 71C20000 71C6DFFF 0004e000
* wmi 76D30000 76D33FFF 00004000
* SSNETLIB 42CF0000 42D05FFF 00016000
* WSOCK32 71AD0000 71AD7FFF 00008000
* WS2_32 71AB0000 71AC4FFF 00015000
* WS2HELP 71AA0000 71AA7FFF 00008000
* SSNMPN70 410D0000 410D5FFF 00006000
* security 71F80000 71F83FFF 00004000
* SECUR32 76F90000 76F9FFFF 00010000
* crypt32 762C0000 76347FFF 00088000
* MSASN1 762A0000 762AFFFF 00010000
* VERSION 77C00000 77C06FFF 00007000
* userenv 75A70000 75B14FFF 000a5000
* mswsock 71A50000 71A8AFFF 0003b000
* DNSAPI 76F20000 76F44FFF 00025000
* winrnr 76FB0000 76FB6FFF 00007000
* WLDAP32 76F60000 76F8BFFF 0002c000
* rasadhlp 76FC0000 76FC4FFF 00005000
* wshtcpip 71A90000 71A97FFF 00008000
* SSmsLPCn 42CD0000 42CD6FFF 00007000
* ntdsapi 767A0000 767B2FFF 00013000
* msv1_0 76D10000 76D2CFFF 0001d000
* OLE32 771B0000 772D0FFF 00121000
* CLBCATQ 76FD0000 77047FFF 00078000
* OLEAUT32 77120000 771AAFFF 0008b000
* COMRes 77050000 77114FFF 000c5000
* sqloledb 01D80000 01DF2FFF 00073000
* MSDART 74C50000 74C6EFFF 0001f000
* COMCTL32 77340000 773CAFFF 0008b000
* comdlg32 763B0000 763F4FFF 00045000
* SHLWAPI 70A70000 70AD4FFF 00065000
* SHELL32 773D0000 77BC1FFF 007f2000
* MSDATL3 60E30000 60E44FFF 00015000
* comctl32 71950000 71A33FFF 000e4000
* oledb32 02020000 02084FFF 00065000
* OLEDB32R 01E00000 01E0FFFF 00010000
* xpsqlbot 42F00000 42F05FFF 00006000
* xpstar 410F0000 41133FFF 00044000
* SQLUNIRL 5C1B0000 5C1DCFFF 0002d000
* WINSPOOL 73000000 73022FFF 00023000
* SQLRESLD 42AC0000 42AC6FFF 00007000
* SQLSVC 42C40000 42C56FFF 00017000
* ODBC32 02150000 02181FFF 00032000
* odbcbcp 02190000 02195FFF 00006000
* W95SCM 41140000 4114BFFF 0000c000
* NDDEAPI 75940000 75946FFF 00007000
* odbcint 022B0000 022C5FFF 00016000
* clusapi 55560000 55570FFF 00011000
* resutils 750B0000 750C0FFF 00011000
* SQLSVC 43970000 43975FFF 00006000
* xpstar 439E0000 439EBFFF 0000c000
* DBGHELP 02420000 02432FFF 00013000
* msdbi 6BE90000 6BEABFFF 0001c000
* sqlimage 4A400000 4A40CFFF 0000d000
*
* Edi: 1ADA13F4: 00000000 1ADA1758 00000000 1ADA1400 00000001 00000000
* Esi: 00000000:
* Eax: 1ADA13E0: 009802E4 00000032 00000000 00000000 00000000 00000000
* Ebx: 1ADA13E0: 009802E4 00000032 00000000 00000000 00000000 00000000
* Ecx: 00000000:
* Edx: 1ADA1410: 00000000 6E006100 00000000 00000000 00000000 1ADA0030
* Eip: 00425E61: 7589018B 8B10FFFC F44D8BF0 A5A5A5A5 5EC38B5F 0D89645B
* Ebp: 0213DFE8: 0213E01C 004C4EB7 1ADA0020 00000000 1ADA1168 1ADC84D0
* SegCs: 0000001B:
* EFlags: 00010282: 0050004F 00300048 00300033 00560030 004F0042 004E0000
* Esp: 0213DFCC: 1ADA07F0 1ADA0020 00A0A4A0 1ADA13E0 0213E010 0092D7B0
* SegSs: 00000023:
************************************************** *****************************
-------------------------------------------------------------------------------
Short Stack Dump
00425E61 Module(sqlservr+00025E61)
004C4EB7 Module(sqlservr+000C4EB7)
0049DCD9 Module(sqlservr+0009DCD9)
0049DAF9 Module(sqlservr+0009DAF9)
00447078 Module(sqlservr+00047078)
004510FE Module(sqlservr+000510FE)
00415080 Module(sqlservr+00015080)
004592CE Module(sqlservr+000592CE)
005A7208 Module(sqlservr+001A7208) (SQLExit(unsigned long)+000523F6)
005A7099 Module(sqlservr+001A7099) (SQLExit(unsigned long)+00052287)
00446A83 Module(sqlservr+00046A83)
004510FE Module(sqlservr+000510FE)
00415080 Module(sqlservr+00015080)
004592CE Module(sqlservr+000592CE)
0041534F Module(sqlservr+0001534F)
00459A54 Module(sqlservr+00059A54)
004175D8 Module(sqlservr+000175D8)
410735D0 Module(UMS+000035D0) (UmsSystemUserContext::UmsSystemUserContext(class UmsScheduler *,struct UMS_SYSPARAMS *)+00000434)
4107382C Module(UMS+0000382C) (UmsScheduler::FiberEnabled(void)+000001D2)
77C37E53 Module(MSVCRT+00027E53) (_endthread+000000AA)
77E7D33B Module(kernel32+0001D33B) (RegisterWaitForInputIdle+00000043)

I am running Windows XP Professional & MSDE Service Pack 3. Any ideas anyone?

View 1 Replies View Related

SQL Server 2008 :: Selecting Data From XML?

May 24, 2015

preparation of a query to get the data from xml which has xmlns in first few lines.

Here I am attaching the xml file(not able to attach ".xml" file, so converted it to ".txt" ).

View 9 Replies View Related

Selecting Data Seperated By Commas

Jun 3, 2008

Have a column in my DB called _Venue, which has been populated with address information separated by commas, like this:

Address1,address2,address3,address4

The address has sometimes only a few lines, for example I may have just Address1 or just address1 and address2 filled etc.

I need to write a query that will individually select addressX, so I can pick and choose what part of the full address to use.

Can these be done?

Thanks in advance.

View 9 Replies View Related

Selecting Distinct Data Using Group By

Aug 4, 2013

I have an action log table which records when a registrant record was viewed by a compnay employee. I have an sql query like this:

SELECT [ID]
,[RegistrantID]
,[EmployeeID]
,[UserID]
,[CompanyID]

[Code] ....

and data is like this:

IDRegistrantID EmployeeIDUserID CompanyID VacancyID Action ActionDate
17931629515163213NULL 42013-08-04 16:45:40.457
17921629215163213NULL 42013-08-04 16:45:33.003
1791NULL15163213NULL 32013-08-04 16:45:23.660
1790162959162893NULL 42013-08-04 16:45:09.543

[Code] ....

I want to select distinct views to a registrantid record ( the first ones) in one year. if a registrant was viewed 10 tmes a year then it will show only first time it was viewed. If it was viewed 10 times by an employeed in 2 years then it will show first time it was viewed. if it was viewed by 2 employees of same company 10 times in one year then it first time viewed record will be shown. if it was seen 10 times by 2 employees of two different companies in one year then first record of two companies will be shown. do i need to use group by or what ?

View 1 Replies View Related

Data Not Selecting On Current Date

Oct 27, 2014

The following is the sql being executed in my Crystal report. There seems to be an issue with the same date request. Sometimes it shows data, other times not. We have data every day, we are a mass market company. Is there anything i can do for the sql to do select when from and to dates are the same?

SELECT "OEHIS1"."ODORD#", "OEHIS1"."ODORDT", "OEHIS1"."ODNTU$", "OEHIS1"."ODSHP#", "ICPRT1"."IARC11", "OEHIS1"."ODORDD", "ICPRT1"."IARCC4", "OEHIS1"."ODQTY#", "OEHIS1"."ODRQSD", "MFHHMH"."MHAWGT", "OEHIS1"."ODPRT#", "OEHIS1"."ODPRLC"
FROM ("S10M10"."ASTCCDTA"."EODDETAILS" "OEHIS1" INNER JOIN "S10M10"."ASTDTA"."ICPRT1" "ICPRT1" ON "OEHIS1"."ODPRT#"="ICPRT1"."IAPRT#") INNER JOIN "S10M10"."DLIB"."MFHHMH" "MFHHMH" ON "OEHIS1"."ODORD#"="MFHHMH"."MHORDP"

[Code] ....

View 4 Replies View Related

Selecting Data Based On A Variable

Jun 7, 2007

Hi All


I want to select a certainnumber of rows

select custno, amt, balance from customer where custno='customerno'
when showcust='r' then select rows where amt<balance
when showcust='c' then amt>balance etc
if showcust='' then show everything


Any insight will be greatly apprecaited.
Thanks

View 4 Replies View Related

Selecting Data From Multiple Rows

Jan 22, 2008

Here's my tables:

Students
-----------------------
StudentID | StudentName
-----------------------

StudentClasses
-----------------------
StudentID | ClassName
-----------------------

I'm trying to put data into a gridview in ASP.NET 2.0 like this:

Student | Classes
-----------------
Name1 | ClassName1 ClassName2 ClassName3
Name2 | ClassName1
Name3 | ClassName1 ClassName2

I just need to retrieve names of each class that a student is taking, then print them out one after another.

View 1 Replies View Related

Selecting Only Numeric Data From A String

Jan 12, 2006

Hello,I need to be able to select only the numeric data from a string that isin the form of iFuturePriceID=N'4194582'I have the following code working to remove all the non-numeric textfrom before the numbers, but it is still leaving the single quote afterthe numbers, i.e. 4194582'Any ideas or suggestions how to accomplish that? Thanks in advance.Declare @TestData varchar(29)Set @TestData = "iFuturePriceID=N'4194582'"Select Substring(@TestData, patindex('%[0-9]%', @TestData),Len(@TestData))TGru*** Sent via Developersdex http://www.developersdex.com ***

View 3 Replies View Related

How To Capture Data And Tune Indexes With Wizard

Jul 7, 1999

I want to tune the indexes on my database and I am trying to use the SQL Server Profiler to collect data for the Index tuning wizard to analyze. My question is what do I need to trace with the profiler so that the Index tuning wizard can work? I am looking at the trace properties in Profiler at the Events, Data Columns, and Filters tabs but I have no idea of what I need to capture.

Thanks in advance.

Mike

View 1 Replies View Related







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