First  |  Prev |  Next  |  Last
Pages: 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
Question about index usage in a query
Hi there Can someone help me with an understanding with respect to how a clustered index is being used in a query I have? I have a table with 3 columns, COL1,COL2,COl3. There is a clustered index IX_FRED on COL1 ASC, COL2 ASC I then run a query, displaying execution plan... SELECT TOP 5000 [COL1], [COL2... 6 Dec 2009 13:57
select statement ,sum with calculation
Hi I have a Invoice table Record 1 Fred 10.00 Jack 25.50 Jill 67.00 Discount 10.00 Record 2 Jill 15.75 Fred 12.74 discount 12.99 etc Is it possible to apply the discount asscoiated with record and then sum all records? I hope I have expllained it well. A... 3 Dec 2009 11:30
Create text file
Is there a way in TSQL that I can output the results of a view to a delimited text file? Thanks. David ... 3 Dec 2009 18:17
a primary record can only have 1 sub record?
I have table A with the following columns: ID int identity(1,1) which is a primary key Name varchar(20) not null I have table B with the following columns: ID int identity(1,1) which is a primary key Type varchar(10) not null There will be a foreign key between table A and B using the ID columns. A few qu... 5 Dec 2009 14:05
SQL Server 2000 log shipping monitor
Hi, In my SQL Server 2000, we don't have any Log Shipping now. However, we still have two records in the Log Shipping Monitor, and it seems to bother other backup job. How do we fix this problem? Thanks for help. Jason ... 3 Dec 2009 16:02
The multi-part identifier "Goal.SalesPersonId" could not be bound.
I get the following error message when I execute: The multi-part identifier "Goal.SalesPersonId" could not be bound. SELECT sp.FirstName + ' ' + sp.LastName AS SalesPersonName, g.goalid, g.goaltype, g.goalamount, g.beginingdate, g.endingdate, (SELECT COUNT(customerid) F... 2 Dec 2009 15:34
xml.value xquery on element centric xml parameter
Want to change a query from openxml to use xml data type but the parameter is element centric and the query returns null. DECLARE @authorsXML XML SET @authorsXML = ' <Authors> <Author> <ID>172-32-1176</ID> <LastName>White</LastName> <FirstName>Johnson</FirstName> <Address> <Street>10932 Bigg... 2 Dec 2009 14:25
Merging two select cases
I am trying to produce a single select statement which is true for two separate cases (so I can reuse it within an IN expression.. which means no IF statements). The answer is probably so simple I'll smack my head. Here is the setup: DROP TABLE #A; DROP TABLE #B; DROP TABLE #C; DROP TABLE #D; CREATE TABLE #... 2 Dec 2009 17:51
Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? ... 1 Dec 2009 21:48
fn_trace_gettable Read All Traces In Directory
Is there away to number the query listed below using all of the SQL Server Profiler traces in a directory? select * FROM fn_trace_gettable ('\\servername\k$\trace\*.trc',DEFAULT) where TextData IS NOT NULL Please help me resolve this issue. ... 1 Dec 2009 20:42
First  |  Prev |  Next  |  Last
Pages: 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109