SQL Querey Problem

Dec 27, 2000

Hi all,

I want to know
"How could i identify which index is taken for the query"
is there any command or through profiler can we able to find?

please help me.

thanks on reply for advance.

Murali

View 1 Replies


ADVERTISEMENT

How Can I Querey By Col_id?

Oct 11, 2007

If I do a select * from _schema where table_name = "xyz"

I get a list that shows:
table_name, colid, name, etc, etc, etc

What I am wondering is how to write a query where I could use the table colid in place of the table names.

So for example if I wanted to execute the following query:

SELECT premium_payment_individual_id, premium_payment_id, assigned_number, identification_code_id
FROM premium_payment_individual

If the colid for those table column names were 3 8 9 and 11 is there a way to construct it so it was something like:


SELECT colid.3, colid.8, colid.9, colid.11
FROM premium_payment_individual

View 6 Replies View Related

Querey Not Working

Dec 1, 2007

Hi!

This is my table
----------------
create table brand(lno int,date1 datetime,pdes varchar(15))
insert brand values(1,getdate(),'First Pdt')
insert brand values(1,getdate(),'SEc pdt')
insert brand values(2,'2007-11-01 2:13:01.123','Thir desc')
insert brand values(2,'2007-11-01 3:13:01.123','4th desc')


I want this output:
--------------------

pdes date1
-------- ---------
SEc pdt 2007-12-01 10:14:13.263

4th desc 2007-11-01 03:13:01.123

I tried this querey but it is not working! please anyone help me!

select t.pdes,t.date1 from brand t join (select convert(varchar(12),max(date1))as date1 from brand group by lno) t1
on t1.date1=t.date1

Thank You!

View 3 Replies View Related

Passing Parameters To A Querey With A LIKE Operator

Jun 6, 2008

I'm trying to get string data from a database using this bit of code:
 string SQL1 = "SELECT Title, Type, MID FROM Movies WHERE Title LIKE '%@Title%'";
SqlCommand MyCommand1 = new SqlCommand(SQL1, Conn1);
MyCommand1.Parameters.AddWithValue("@Title", TXTTitle.Text);
 It doesn't seem to be returning anything when I try this.  I've never thought to try and parameterize a LIKE before and I'm not sure on the proper syntax.
 Thanks in advance!

View 2 Replies View Related

Find Querey Execution Time

Nov 22, 2007

Hi!
How can i find the querey execution time in sql 2000.
If u have any article or books online please suggest me.

Thanks!

View 9 Replies View Related







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