MDS

Technical Article

RE: Index not used on Select *

  • Reply

Ray -Since there is no clustered index on this table, I would assume that data rows are stored sequntially.  Regardless of what is in my select statement, as long as I have the right where clauses, the query engine should use index seek to get to the addresses of the desired rows and then get the information […]

You rated this post out of 5. Change rating

2004-03-18

Technical Article

RE: Query question...

  • Reply

I don't think this is implied.  It is easily conceivable to need such a query in a properly normalized database.   This is a history table of each change in an employee's status, and the OP wishes to get the information about the latest change for each employee, i.e.:CREATE TABLE EmployeeStatusHistory( EmployeeID int REFERENCES Personnel, UpdDate datetime NOT […]

You rated this post out of 5. Change rating

2004-03-12

Technical Article

RE: T-SQL Parameter goofyness

  • Reply

Use a table to store the message and then include that? Could us a create table msg (spid int, mymsg varchar( 100))Actually, that's what I'm doing, but I need to do something like (pardon my semi-sql):Open Cursor on template_table while GetRows into statement, issql BEGIN   If issql     insert into msg_table EXEC(statement)  -- Was a […]

You rated this post out of 5. Change rating

2004-02-23

Technical Article

RE: Diagram Copying

  • Reply

I asked this same question on 10/29/2003. (Topic: "Copying Diagram?"). The best answer was from a posting from Brian Knight (11/13/2003) - Article "Transfering a SQL Server Diagram". Good luck, Allan

You rated this post out of 5. Change rating

2003-12-01

Technical Article

RE: using lookups

  • Reply

SELECT cast(convert(varchar, DATE_TIME, 101) as datetime) as DATE_TIME, MAX(QUANTITY) AS MAX_QUANTITY, MIN(QUANTITY) AS MIN_QUANTITY, AVG(QUANTITY) AS AV_QUANTITY FROM TRANSACTIONS group by cast(convert(varchar, DATE_TIME, 101) as datetime) the above given code does not work in my case i guess this is becoz i hve an oracle Db at the backend from where i am using the […]

You rated this post out of 5. Change rating

2003-08-23

Technical Article

RE: Optional search conditions

  • Reply

Actually a Clustered index scan is fine for all as that is what would happen. But to get the seek I would do like so DECLARE @id int SET @id = 23 -- COmment out to get all IF (@id IS NULL) SELECT * FROM sysobjects ELSE SELECT * FROM sysobjects WHERE ID = @id […]

You rated this post out of 5. Change rating

2003-07-21

1 reads

Blogs

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers