Hi!!!! U can Enjoy with this..... http://msdn.microsoft.com/library/default.asp?url=/library/en-s/tsqlref/ts\_fa-fz\_9yuk.asp Regrads Shashank under2811@yahoo.co.in
under2811
Posts
-
cumulative aggregate queries in transact-sql -
Query to get specific word in a columnHi!!!!!!! SELECT LEFT(USERNAME,PATINDEX('%(%',USERNAME)-1) Enjoy!!!! Regards Shashank
-
Syntax error converting the nvarchar value 'INSERT INTO....Hi!!!! Execute statement only takes nvarchar,char....datatype only so u change data type like DECLARE @t_f1 as nvarchar(50) DECLARE @t_f2 as nvarchar(50) DECLARE @t_f3 as nvarchar(50) DECLARE @t_f4 as nvarchar(50) Regards ;) Shashank
-
anwhat's wrong with my cursor!!!!!!!!!:sigh:Hello I have empt table where job_id is field in it. I want to update empt table if job_id = '1' or '3' by '999' And if job_id not '1' or '3' then update by '456' So what's wrong with my cursor T.I.A Shashank ----------------------------------------------------- CREATE procedure lnt.textt @qurstr varchar(10) AS Declare @in AS Varchar(10) Declare crs_cc cursor for select job_id from empt FOR UPDATE OF job_id open crs_cc fetch next from crs_cc INTO @in while @@fetch_status = 0 IF @qurstr = '1' OR @qurstr = '3' BEGIN UPDATE empt set job_id = '999' where job_id = @qurstr print 'U Miss By Miles!!!!' print @qurstr END IF @qurstr IN (SELECT job_id from empt where job_id not in ('1','3')) BEGIN update empt set job_id = '456' where job_id = @qurstr print ' Success' END FETCH NEXT FROM crs_cc CLOSE crs_cc DEALLOCATE crs_cc GO
-
it is possible to take sql server2000 database backup on another machine's disc.Hello friends Can anybody knows,it is possible to take sql server2000 database backup on another machine's disc. I normally take backup on the disc of same machine where my database server is but if i want to take backup to another machine disc then that will possible??? T.I.A Shashank
-
if i want to monitor sql server2000Can any body have idea about minimum and maximum values for the following factors for sql server2000 if i want to monitor sql server2000 Total Memory - KB SQL Cache Memory - KB Lock Memory - KB Optimizer Memory - KB Connection Memory - KB Granted WorkSpace Memory - KB Memory Grants Pending - Memory Grants Success - Buffer Hit Ratio - Page LookUps/Min - Page Reads/Min - Page Writes/Min - Total Pages - Database Pages - Free Pages - Please help me T.I.A Shashank
-
some time query took little bit long time!!!Hello friends!! I observe that sometimes my queries took 2 0r 3 sec and sometimes it took 1.30 min or 2 mins that might be problem due to some other user access same table or view?? already i optimised my query but still it took sometimes little bit long time! if soem other user access the same table then is there any process to lock the table or waiting option ???? please help me out!!! T.I.A Shashank
-
Monitoring Sql Server2000...............Hello thanks I checked it with on BOL and got query SELECT * FROM MASTER..SYSPROCESSES i got it just few more things i want to clear 1) waittime 2)cpu 3)physical_io 4)memusage what are units of these columns i.e waittime is in MS (miliseconds or else), like that cpu?,physical_io? and memusage (i.e in MB or else) T.I.A shashank
-
Monitoring Sql Server2000...............Hello guys!! What is the minimum time (in ms) required to respond from sql server when data is near @ 1.2 GB and also where i will get some kind of utility or sql command where i will find 1. Check the space allocated to Database 2. Check the total space remaining in database 1. Check Memory Usage of MSSQL 2. Check CPU Utilization 3. Check Disk contention 1. Use SQL Server profiler 2. Check Trace event, lock event, session event etc 3. Create Trace 1 . Check for memory utilization 2. Check for unwanted process utilizing Memory 3. Check database memory utilization these factors T.I.A Shashank
-
I want to change the owner of the object.............under2811Hi I am asking two thing first is how to change owner of a table i.e. I have table whose owner is 'dbo' and now I want to change owner dbo to owner 'hov' How to change that??? second thing i asked if we open E.M here we find lots of table suppose if I right click on one table say employees then we get menus like new table,design table,open table like that if i cliked on design table , we find another more menus like set primary keys,triggers,show permissions like that now i want to know what this term 'show permission' is??? please explain in detail shashank
-
I want to change the owner of the object.............Hello friends! I want to change the owner of the object I have table whose owner is dbo but i want to change it to hov can u please tell me complete syntax of that Also when we right click on table and select design table , here we find menu like Trigger then Show permission then show dependency like that If I chose show permission here we find list all users/userdefined database roles/public like that , can u please explain that thing (window) to me what that mean by? T.I.A Shashank
-
searching for documents of stored proceduresHello friends!! Please guide me where i will find best documents regarding craeting of "Stored_Procedure" T.I.A Shashank
-
All character from column not getting! Any setting should i change?Hello friends, I got some problem... I have table like CREATE TABLE publishers ( Name char(4) NOT NULL, ID varchar(40) NULL, City varchar(20) NULL, State char(2) NULL, Comments varchar(3000) NOT NULL ) I have some store procedure which put xml files and put that into this sql table, now problem i am facing here is that all the character from comments column i am not getting , I already increase the width of that column from varchar(1000 ) to varchar(3000) Two days before i am getting well results i.e. all the character from this perticular field(comments) and seeing that result, character in that field was just 800 to 850 approx.But now why I am getting like that??? One thing is sure the character which is coming from XML file is not more than 850.Then is there any setting should i change or by mistake changed?? Please Help me out! T.I.A Shashank
-
Understanding of Execution Plan????? Pls help me out!!Hello friends!! In Execution plan please somebody help me to understand I am new to it. If I run one select statement having Execution plan... 1.first of all what we will watch closely so that it will understand easily i.e related to costing.... 2.Here I am seeing factors like 'SELECT' ,' TOP' , Hash Match/Left Anti Semi Join. 3.Index Scan : Physical Operation and Logical Operation Here only I can see some factores like Physical Operation And Logical Operation a)Row Count =========== 26,795,748 b)Estimated Row Size ==== 132 (What this exactly means??) c)I/O Cost ============ 209 d)CPU Cost ============ 29.5 e)Number Of Executes ==== 1 f)Cost ============== 238.884090(57%) h)Subtree Cost ======== 417 i)Estimated Row Count==== 26,795,748 4.Computer Scalar: 5.Stram Aggregate/Aggregate 6.Table Scan Like That........ Please somebody guide me in that I will be thankful.. (Please Give me detail description where i can judge all factors of execution plan so that i can reduce the cost of query if possible) T.I.A Shashank
-
master.dbo.spt_values means??????Hello friends!! Can anybody tell me 'The meaning of this output' I saw 6 columns , anybody tell me what they columns indicate SELECT * from master.dbo.spt_values T.I.A Shashank
-
Can i include the same columns in unique and non-unique indexes!!Hello friends!! Here I am giving you some details of table and indexes CREATE TABLE TEST_EMP ( SSN VARCHAR(9) NOT NULL, CCODE VARCHAR(4) NOT NULL, GRADE VARCHAR(2) NULL, CONSTRAINT GRADE_SSN_CCODE_PK PRIMARY KEY CLUSTERED (SSN, CCODE), EMPID VARCHAR(5) NOT NULL, EMPNAME VARCHAR(10)) -------------------------------------------- NOW I WANT TO ADD TWO COLUMNS MORE WHICH FREQUENTLY USED IN JOIN CONDITION for select & insert i.e. AUTONUMBER int MODIFIEDDATE DATETIME NOW I WANT TO CREATE ANOTHER Index (IX_TEST_EMP) FOR COLUMNS SSN CCODE AUTONUMBER MODIFIEDDATE so including that two columns(SSN and CCODE) which already have index (GRADE_SSN_CCODE_PK), will that cause more cost on query or that doesnot matter? and if I exclude these two columns(SSN and CCODE) then wheather my select and insert clause will cause same cost as when i include these two columns(SSN,CCODE)? T.I.A Shashank
-
Can i include the same columns in unique and non-unique indexes!!I have one table having two primary keys here if i created one unique index and now i want to create another nonunique index taking another columns. now my questions are : 1) can i take the columns which i already included in unique index, to build nonunique index? 2) If i take these columns then what that cost on performance of query wheather time required to run query is more or less or no effect? T.I.A Shashank
-
Numbers of rows different in Q.A and in E.M.!!Any way Thanks A Lot!!!!!!!
-
Numbers of rows different in Q.A and in E.M.!!Hello Colin Angus Mackay, When I right click on table i am getting menus there open table>> Return all rows here i am getting 5 rows while when i double click on table_name there i am getting 12 rows!!! how that is possible????? Thanks In Advance Shashank
-
Numbers of rows different in Q.A and in E.M.!!Hello Friends, Recently I came one problem, when i opened Sql Enterprise Manager, on right side of window list of Tables, there when i right click on table and i am getting total number of rows say 5 but when i double click then here i am getting 12 rows!!!!!!!!!!!!!! How That possible????? I checked through Query Analyser also there also i am getting 5 rows!!! Can Any body know this Please Help me out!!!!!!!!! Thanks In Advance Shashank