Showing posts with label function. Show all posts
Showing posts with label function. Show all posts

Friday, March 30, 2012

How to format numbers in SQL Query

any body have an idea abou how to wirte a function for formating a numeric field.
Ex: In my table the TotalAmout is a numeric field. if i use (Select TotalAmount from Table1) then query will return numbers like

Totalamount
-------
12232.88
23233.22
23559.99
32434.99

but i want he result like comma separated format
like

12,232.88
23,233.22
23,559.99
32,434.99Create the below function and use it as said below.

/*This function is only for thousand separator for numbers with length 5 or 4*/
CREATE FUNCTION DBO.SEPARATETHOUSANDNUM
(
@.STRVALUE VARCHAR(8000)
)
RETURNS VARCHAR(8000)
AS
BEGIN

DECLARE @.STRRETURNVALUE VARCHAR(8000)
SELECT @.STRRETURNVALUE = CASE LEN(@.STRVALUE)
WHEN 5 THEN LEFT(@.STRVALUE,2)+ ','+ RIGHT(@.STRVALUE,3)
WHEN 4 THEN LEFT(@.STRVALUE,1)+ ','+ RIGHT(@.STRVALUE,3)
ELSE @.STRVALUE END
RETURN @.STRRETURNVALUE
END

SELECT DBO.SEPAREATENUMBERS(23565) AS CHANGEDCOLUMN

gives 23,565

SELECT DBO.SEPAREATENUMBERS(2365) AS CHANGEDCOLUMN

gives 2,365

So use
Select DBO.SEPARATETHOUSANDNUM(TotalAmount) from Table1

Quote:

Originally Posted by sukeshchand

any body have an idea abou how to wirte a function for formating a numeric field.
Ex: In my table the TotalAmout is a numeric field. if i use (Select TotalAmount from Table1) then query will return numbers like

Totalamount
-------
12232.88
23233.22
23559.99
32434.99

but i want he result like comma separated format
like

12,232.88
23,233.22
23,559.99
32,434.99

|||I got an another easy solution for that and no need for any functions

like this

select convert(varchar(50),convert(momey,TotalAmount),1) from BillMaser|||

Quote:

Originally Posted by sukeshchand

I got an another easy solution for that and no need for any functions

like this

select convert(varchar(50),convert(momey,TotalAmount),1) from BillMaser


Excellent! Thanks for posting the solution!|||

Quote:

Originally Posted by sukeshchand

I got an another easy solution for that and no need for any functions

like this

select convert(varchar(50),convert(money,TotalAmount),1) from BillMaser


i'm using this query, it works, but my problem now is that this query automatically rounds to 2 decimal places.

ex.
1200.114 = 1,200.11

is there a query that formats the result but does not round the decimals?|||

Quote:

Originally Posted by mjv

i'm using this query, it works, but my problem now is that this query automatically rounds to 2 decimal places.

ex.
1200.114 = 1,200.11

is there a query that formats the result but does not round the decimals?


try adding precision on your convert function.

actually, although this is feasible in the database/back-end, i believe this can be better be handled in the front-end.

How to format DateTime field in Crystal

I have a DateTime field but I only want to show the date. I can't find the function to do that.
Help!!
johnright click, format field, date and time tab, customize, date and time tab, choose 'date' in Order dropdown, then use date tab to choose format.

Wednesday, March 21, 2012

How to find the median?

I've noticed that SQL Server (and other DBMSs I've looked at) doesn't seem to have a built-in function for finding the median of a range of numbers.
Gack!gack is right

see this thread (http://dbforums.com/showthread.php?t=1210382&highlight=median) from way back in the archives|||Your required solution may not be quite as complicated as the one linked to. That particular poster needed the median of some not-yet-calculated-values so these values are calculated in derived tables.

If you simply have a table with several values that you want to find the median of then the SQL is simpler.|||Median does not have a set based solution. You have to iterate in order to find the median (order matters to compute a median). Engines that process a row at a time do medians easily, engines that process sets have a real problem with it.

-PatP|||okay, which is it? "does not have a set based solution" or "have a real problem with it"?

what about this type of solution:SELECT
CASE WHEN COUNT(*)%2=1
THEN x.Hours
ELSE (x.Hours+MIN(CASE WHEN y.Hours>x.Hours
THEN y.Hours
END))/2.0
END median
FROM BulbLife x, BulbLife y
GROUP BY x.Hours
HAVING
SUM(CASE WHEN y.Hours <= x.Hours
THEN 1 ELSE 0 END)>=(count(*)+1)/2 AND
SUM(CASE WHEN y.Hours >= x.Hours
THEN 1 ELSE 0 END)>=(count(*)/2)+1

-- from Transact-SQL Cookbook Chapter 8 Statistics in SQL (http://www.oreilly.com/catalog/transqlcook/chapter/ch08.html)|||Or:


SELECT A.TheValue AS TheMedian
FROM (SELECT DISTINCT TheValue FROM MyTable) A, MyTable B
GROUP BY A.TheValue
HAVING sum(SIGN(A.TheValue - B.TheValue )) IN (0, -1)|||Beg your pardon - blummin' thing has failed.|||The Median depends on order in every case, and non-deterministic rows for data with an even number of elements. Because Median depends on element order, there can't be any set based solution, because sets have no order.

I never said that you can't solve it with SQL, that's a very different claim. There are several ways to do that. You still can't solve it declaratively, and you can't solve it with sets.

-PatP|||sets may have no order, but order can still be imposed with predicates

i ask you, are you familiar with the query to rank result rows? it's a theta self-join, and what it does is count the rows that are greater (or lesser) than, based on the value of a column, then adds 1 to get the rank

same thing with partitioning a single set into two -- those values that are higher, and those values that are lower

and those are sets

:)|||there can't be any set based solutionwhat do you call the solution in post #5, please?|||On the surface, I would call it a performance problem ;-). How many rows in BulbLife? Never knew you could declare a "join" in the having clause. Or does the optimizer see it that way?|||On the surface, I would call it a performance problem ;-). okay, i see the smiley, so i won't respond the way i would've if it weren't there, which would've been something along the lines of "oh, so for challenging queries, you dump the data and do it in excel, eh?" :)

btw, there is no join in the HAVING clause (if you are referring to post #5)|||what do you call the solution in post #5, please?I'd call that a Transact-SQL solution.

-PatP|||And here I thought you came up with this on your own...

Looks like a must have book though...|||I'd call that a Transact-SQL solution.you are a slippery eel today, but squirm all you want, buddy, i think i gotcha

what part of it makes it Transact-SQL? MIN? CASE? COUNT?

looks to me like it's all SQL

or are you referring to the fact that the solution doesn't use FLOOR?

and what about my questions regarding sets?

is that or is that not a set-based solution?

eel, i say

:)|||You two go ahead and argue terminology, while I go ahead and give the solution. ;)
My shot:
set nocount on

create table #MyData (MyKey int identity, MyValue int)

insert into #MyData (MyValue)
select 1
UNION ALL select 2
UNION ALL select 5
UNION ALL select 2
UNION ALL select 5
UNION ALL select 2
UNION ALL select 6
UNION ALL select 2
UNION ALL select 5
UNION ALL select 2
UNION ALL select 6
UNION ALL select 8
UNION ALL select 3
UNION ALL select 5
UNION ALL select 5
UNION ALL select 2
UNION ALL select 6
UNION ALL select 2
UNION ALL select 6
UNION ALL select 2
UNION ALL select 5
UNION ALL select 2
UNION ALL select 6
UNION ALL select 8
UNION ALL select 3
UNION ALL select 5
UNION ALL select 4
UNION ALL select 2
UNION ALL select 3
UNION ALL select 3

select sum(OrderedData.MyValue)/2.0
from --OrderedData
(select #MyData.MyValue,
#MyData.MyKey,
count(*) as Ordinal
from #MyData
inner join #MyData Ordinals
on #MyData.MyValue > Ordinals.MyValue
or (#MyData.MyValue = Ordinals.MyValue
and #MyData.MyKey > Ordinals.MyKey)
group by #MyData.MyValue,
#MyData.MyKey) OrderedData
inner join --MedianRecords
(select floor(0.5 + count(*)/2.0) as Record1,
ceiling(1.0 + count(*)/2.0) as Record2
from #MyData) MedianRecords
on OrderedData.Ordinal = MedianRecords.Record1
or OrderedData.Ordinal = MedianRecords.Record2

drop table #MyData|||way to go, blindman

your post reminds me of this quote (which i have on my spanking-new redesigned web site; comments welcomed):The person who says it can't be done should not interrupt the person doing it

Chinese proverb

no idea if your solution works, but i would definitely have to say, it shore looks like a set-based solution to me

:)|||okay, which is it? "does not have a set based solution" or "have a real problem with it"?

what about this type of solution:SELECT
CASE WHEN COUNT(*)%2=1
THEN x.Hours
ELSE (x.Hours+MIN(CASE WHEN y.Hours>x.Hours
THEN y.Hours
END))/2.0
END median
FROM BulbLife x, BulbLife y
GROUP BY x.Hours
HAVING
SUM(CASE WHEN y.Hours <= x.Hours
THEN 1 ELSE 0 END)>=(count(*)+1)/2 AND
SUM(CASE WHEN y.Hours >= x.Hours
THEN 1 ELSE 0 END)>=(count(*)/2)+1

-- from Transact-SQL Cookbook Chapter 8 Statistics in SQL (http://www.oreilly.com/catalog/transqlcook/chapter/ch08.html)

That is precisely the formula we used in the end and it worked great, though it takes a long time to run. I ended up throwing a lot of data into temp tables to make the query more efficient. :)|||you might also be interested in some of the solutions here -->
http://tek-tips.com/viewthread.cfm?qid=1193016|||you might also be interested in some of the solutions here -->
http://tek-tips.com/viewthread.cfm?qid=1193016

I may play around with some of those to get the query to run faster. The self-join from the O'Reilly book has to be done on a rather large table on our database so we run the query three times with different criteria to cut down the number of rows we're operating on and insert this data into temp tables. We then calculate the median individually on each table (since we're after more than one median value; we're going for the median value in each of three columns) and insert them into another temp table; we then append the target table with the info from the last temp table. If we do it any other way it takes an age; even this solution takes the SQL Server about 20 seconds to chew its way through it. Doesn't help that our SQL server is 200 miles away, connected to us by a vewy vewy slow network. :eek: The first time I ran the non-optimized solution, I got snarky e-mails from the DBAs griping that I was 'consuming resources'! Hahaha! They don't like the one we're using right now, but since we only run it once a week they can live with it. :D

Then again, optimizing queries isn't my strong suit. I can write them so they work, but I can see it's going to take some tweaking to get them to run quickly. We have these updates we have to run each week, appending between 1,000 and 10,000 new rows to base data tables on four separate DBs. Doesn't help that some of them have 50 columns, so they're both 'tall' and 'fat' if that makes sense. :shocked:

How to find the maximum possible value of a given datatype

Does anyone know of a built-in function to return the maximum possible
value of a given datatype? I have to return the biggest value for a
smalldatetime or datetime in a view if the field is null, but can't
find such a function. The closest I've come is:

select datalength(cast(getdate() as smalldatetime))

...but that only return the number of bytes, not the value itself,
which is '6-6-2079 11:59'

I know I could create my own lookup table and function, but I was
hoping that Transact-SQL would have a built-in solution

--John Hunter>One alternative is to write your own function that encapsulates the

Quote:

Originally Posted by

>hardcode. Pass the table and column names, query the system tables
>for the type and related information such as max length of a varchar,
>and then return it. Clumsy, no doubt.


My apologies, it is nowhere near as simple as I described as, at a
minimum, one function for each datatype group (dates, character
strings, etc) would be required.

Roy Harvey
Beacon Falls, CT|||jshunter@.waikato.ac.nz wrote:

Quote:

Originally Posted by

Does anyone know of a built-in function to return the maximum possible
value of a given datatype? I have to return the biggest value for a
smalldatetime or datetime in a view if the field is null,


If you (and the recipient of this return value, if it isn't another
piece of T-SQL) can wrap your head around ternary logic, then you
can use the null value as is:

where not (some_date end_date)

Or, depending on the expected longevity of the system, you can (a)
hard-code June 6, 2079 (max smalldatetime) or (b) avoid smalldatetime
and hard-code December 31, 9999 (max datetime). I would personally
go with (b), as I can't imagine actually designing a system that had
a good reason to use smalldatetime for anything.|||No there isn't.

But there are solutions. You can read more at
http://groups.google.nl/group/micro...743f4aea485c6d1
(url may wrap)

HTH,
Gert-Jan

"jshunter@.waikato.ac.nz" wrote:

Quote:

Originally Posted by

>
Does anyone know of a built-in function to return the maximum possible
value of a given datatype? I have to return the biggest value for a
smalldatetime or datetime in a view if the field is null, but can't
find such a function. The closest I've come is:
>
select datalength(cast(getdate() as smalldatetime))
>
...but that only return the number of bytes, not the value itself,
which is '6-6-2079 11:59'
>
I know I could create my own lookup table and function, but I was
hoping that Transact-SQL would have a built-in solution
>
--John Hunter

Monday, March 19, 2012

How to find sql server agent running using tsql

How to find using TSQL or some sql server function that SQL Server agent
is running or stopped.
--
Thanks
Amish
SQL Server DBA
ExtraQuest"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article/ArticleID/46083/46083.html
AMB
"AM" wrote:
> How to find using TSQL or some sql server function that SQL Server agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>

How to find sql server agent running using tsql

How to find using TSQL or some sql server function that SQL Server agent
is running or stopped.
Thanks
Amish
SQL Server DBA
ExtraQuest
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA
|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article/...083/46083.html
AMB
"AM" wrote:

> How to find using TSQL or some sql server function that SQL Server agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>
|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>

How to find sql server agent running using tsql

How to find using TSQL or some sql server function that SQL Server agent
is running or stopped.
Thanks
Amish
SQL Server DBA
ExtraQuest"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article...6083/46083.html
AMB
"AM" wrote:

> How to find using TSQL or some sql server function that SQL Server age
nt
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.codecomments.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>

Monday, March 12, 2012

How to find out the total number of commited transactions on SQL2k?

Dear all,

Previously I posted this issue on SSIS newsgroups and I did not obtain any response so that I'll do here.

Using this system function (::fn_log(null,null)) you can find out how many transactions have been confirmed in your .LDF. Although by means of another system function you can see further information, such as statitical.

Any help would be very appreciated.

Thanks in advance and regards,

sp_monitor among them

Friday, March 9, 2012

how to find out column name with sql server store procedure

Hi
I have table which has Fields A,B,C and D for example. is thier any way to
retrive these field column as inline table function or store procedure.
thanks
some thing like select column_name from xxxx
thanksUSE pubs
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'autho
rs'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amjad" <amjad@.discussions.microsoft.com> wrote in message
news:B4AEB01C-6652-4681-AE71-6842385E4E17@.microsoft.com...
> Hi
> I have table which has Fields A,B,C and D for example. is thier any way to
> retrive these field column as inline table function or store procedure.
> thanks
> some thing like select column_name from xxxx
> thanks
>|||Or get it all in one variable with this technique:
USE pubs
GO
DECLARE @.fields VARCHAR(1000)
SELECT @.fields = ISNULL( @.fields, '' ) + column_name + ', '
FROM INFORMATION_SCHEMA.columns
WHERE table_name = 'authors'
-- Trim trailing space and comma
SET @.fields = SUBSTRING( @.fields, 1, LEN( @.fields) -1 )
SELECT @.fields
-- sp_columns gives some useful information too.
EXEC sp_columns 'authors'
"Tibor Karaszi" wrote:

> USE pubs
> SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aut
hors'
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "amjad" <amjad@.discussions.microsoft.com> wrote in message
> news:B4AEB01C-6652-4681-AE71-6842385E4E17@.microsoft.com...
>
>

Wednesday, March 7, 2012

How to find Median Values in SQL

Hello,
Is there any way or function to find Median value in Sql
Server 2000?.
Thanks,
NilayYes, refer to
http://groups.google.com/groups?dq=&hl=nl&lr=&ie=UTF-8&threadm=3BC75285.8A38CC6%40toomuchspamalready.nl&rnum=1&prev=/groups%3Fq%3Dg:thl2156744539d%26dq%3D%26hl%3Dnl%26lr%3D%26ie%3DUTF-8%26selm%3D3BC75285.8A38CC6%2540toomuchspamalready.nl
(url may wrap)
This thread gives many solutions.
Gert-Jan
Nilay wrote:
> Hello,
> Is there any way or function to find Median value in Sql
> Server 2000?.
> Thanks,
> Nilay

Friday, February 24, 2012

how to find an object ?!

hi
i forget completely
how to find an object in sql 2005 ?
don't remember where is that function !!?
where is it ?!!
thanks
--
atte,
HernnHi
USE AdventureWorks
GO
SELECT * FROM sys.objects
"bajopalabra" <bajopalabra@.hotmail.com> wrote in message
news:%23yZNlqn$GHA.1556@.TK2MSFTNGP03.phx.gbl...
> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernn
>|||You can query catalog view sys.all_objects
Linchi
"bajopalabra" wrote:

> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernán
>
>|||is not there an "object finder" ?
mhhh... where i seen it, then ... sql 2000 has one ?
atte,
Hernn
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi en el mensaje
news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
| You can query catalog view sys.all_objects
|
| Linchi
|
| "bajopalabra" wrote:
|
| > hi
| > i forget completely
| > how to find an object in sql 2005 ?
| > don't remember where is that function !!?
| > where is it ?!!
| > thanks
| > --
| > atte,
| > Hernn
| >
| >
| >|||In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLSe...aspx?Feedback=
ID=3D124498
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hern=E1n
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi=F3 en el men=
saje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > --=20
> | > atte,
> | > Hern=E1n
> | >
> | >
> | >|||yes, that is !
atte,
Hernn
"Razvan Socol" <rsocol@.gmail.com> escribi en el mensaje
news:1162480405.660966.290330@.e3g2000cwe.googlegroups.com...
In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLSe...=1244
98
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hernn
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi en el
mensaje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > --
> | > atte,
> | > Hernn
> | >
> | >
> | >

how to find an object ?!

hi
i forget completely
how to find an object in sql 2005 ?
don't remember where is that function !!?
where is it ?!!
thanks
atte,
Hernn
Hi
USE AdventureWorks
GO
SELECT * FROM sys.objects
"bajopalabra" <bajopalabra@.hotmail.com> wrote in message
news:%23yZNlqn$GHA.1556@.TK2MSFTNGP03.phx.gbl...
> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernn
>
|||You can query catalog view sys.all_objects
Linchi
"bajopalabra" wrote:

> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernán
>
>
|||is not there an "object finder" ?
mhhh... where i seen it, then ... sql 2000 has one ?
atte,
Hernn
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi en el mensaje
news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
| You can query catalog view sys.all_objects
|
| Linchi
|
| "bajopalabra" wrote:
|
| > hi
| > i forget completely
| > how to find an object in sql 2005 ?
| > don't remember where is that function !!?
| > where is it ?!!
| > thanks
| > --
| > atte,
| > Hernn
| >
| >
| >
|||In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124498
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hernn
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi en el mensaje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > --
> | > atte,
> | > Hernn
> | >
> | >
> | >
|||yes, that is !
atte,
Hernn
"Razvan Socol" <rsocol@.gmail.com> escribi en el mensaje
news:1162480405.660966.290330@.e3g2000cwe.googlegro ups.com...
In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124498
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hernn
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi en el
mensaje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > --
> | > atte,
> | > Hernn
> | >
> | >
> | >

how to find an object ?!

hi
i forget completely
how to find an object in sql 2005 ?
don't remember where is that function !!?
where is it ?!!
thanks
--
atte,
HernánHi
USE AdventureWorks
GO
SELECT * FROM sys.objects
"bajopalabra" <bajopalabra@.hotmail.com> wrote in message
news:%23yZNlqn$GHA.1556@.TK2MSFTNGP03.phx.gbl...
> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernán
>|||You can query catalog view sys.all_objects
Linchi
"bajopalabra" wrote:
> hi
> i forget completely
> how to find an object in sql 2005 ?
> don't remember where is that function !!?
> where is it ?!!
> thanks
> --
> atte,
> Hernán
>
>|||is not there an "object finder" ?
mhhh... where i seen it, then ... sql 2000 has one ?
--
atte,
Hernán
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribió en el mensaje
news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
| You can query catalog view sys.all_objects
|
| Linchi
|
| "bajopalabra" wrote:
|
| > hi
| > i forget completely
| > how to find an object in sql 2005 ?
| > don't remember where is that function !!?
| > where is it ?!!
| > thanks
| > --
| > atte,
| > Hernán
| >
| >
| >|||In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?Feedback=ID=3D124498
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hern=E1n
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribi=F3 en el men=saje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > -- > | > atte,
> | > Hern=E1n
> | >
> | >
> | >|||yes, that is !
--
atte,
Hernán
"Razvan Socol" <rsocol@.gmail.com> escribió en el mensaje
news:1162480405.660966.290330@.e3g2000cwe.googlegroups.com...
In Management Studio, you can find an object using the "Filter"
feature. This option is available when you right click an object type
(one of Tables / Views / Stored Procedures).
In Query Analyzer there was another feature, called "Object Search"
(F4). This feature is not present in Management Studio. See:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124498
Razvan
bajopalabra wrote:
> is not there an "object finder" ?
> mhhh... where i seen it, then ... sql 2000 has one ?
> --
> atte,
> Hernán
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> escribió en el
mensaje
> news:FE167E6A-B5C3-4C9C-AAEE-DD8A6AF1C39B@.microsoft.com...
> | You can query catalog view sys.all_objects
> |
> | Linchi
> |
> | "bajopalabra" wrote:
> |
> | > hi
> | > i forget completely
> | > how to find an object in sql 2005 ?
> | > don't remember where is that function !!?
> | > where is it ?!!
> | > thanks
> | > --
> | > atte,
> | > Hernán
> | >
> | >
> | >