My account: Login | Sign Up
Loading... 

Transact-SQL | Forum profile

Forum profile page for Transact-SQL on http://technet.microsoft.com. This report page is the aggregated overview from a single forum: Transact-SQL, located on the Message Board at http://technet.microsoft.com. This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period. Additional forum profile information for "Transact-SQL" on the Message Board at http://technet.microsoft.com is also shown in the following ways:

1) Latest Active Threads
2) Hot Threads for Last Week

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.

Site: TechNet Forums - Transact-SQL (site profile, domain info microsoft.com)
Title: Transact-SQL
Url: http://forums.microsoft.com/technet/showforum.a...
Users activity: 33 posts per thread
Forum activity: 110 active threads during last week
 

Posting activity on Transact-SQL:

  Week Month 3 Months
Threads: 110 1,053 3,026
Post: 340 3,344 9,952
 

Transact-SQL Posting activity graph:

Posts by:  day  week  month 

Top authors during last week:

Name
Posts
Aaron Alton
30
user's latest post:
Caluculating the percentage of...
Published (2008-11-29 04:09:00)
So the quantity of a specific line item as a percentage of the total quantity of items sold?  For instance, if you sold:   Order 1 > Item A > 10 Order 2 > Item B > 10 Order 3 > Item C > 10 Order 4 > Item A > 10   Then the result would be: Order 1 > 25% Order 2 > 25% Order 3 > 25% Order 4 > 25%   Or would it be: Order 1 > 50% Order 2 > 25%...
gvee
16
user's latest post:
Possible to find out the name of...
Published (2008-11-28 19:59:00)
Hi unlikely, Just another reason why you should let us know the version up front, eh? Change sys.triggers for sysobjects and add another bit on the WHERE clause: sysobjects.type = 'TR' George
Mangal Pardeshi
13
user's latest post:
Merging two resultsets from same...
Published (2008-11-28 10:56:00)
  de4ever wrote: Issueid is common primary key for the original table so we can user use issueid  in on clause   But issueid is different for the results you are showing.  There is no logical relation. Mangal Pardeshi. http://www.biconsulting.in
Denis Repin
13
user's latest post:
Caluculating the percentage of...
Published (2008-11-27 20:34:00)
Hi, probably SELECT st . StoreName , st . StoreCountry , si . ItemNumberSK , si . ItemName , sum ( si . Qty )/( select SUM ( sii . Qty ) from SALES_ITEM sii where sii . ItemNumberSK = si . ItemNumberSK ) FROM STORE st , ITEM_PURCHASE ip , SALES_ITEM si WHERE st . StoreNumberSK = ip . StoreNumberSK AND ip . ItemNumberSK = si . ItemNumberSK group by st . StoreName , st . StoreCountry , si . ItemNumberSK , si . ItemName  
gbt
9
user's latest post:
urgent help compare - TechNet...
Published (2008-11-28 09:30:00)
  please tell me how to join two rows and then find  the result using pivot function...
Ken Simmons
9
user's latest post:
Must Declare Scalre Variable...
Published (2008-11-28 13:43:00)
Try this. The parmater definitions are sent in using the same string.     EXEC sp_executesql @cmd , N '@FromAge int, @ToAge int' , @FromAge , @ToAge   Ken Simmons
SQLUSA
8
user's latest post:
How to check who is updating the...
Published (2008-11-29 08:12:00)
In addition to Jonathan's suggestions, you can also search the stored procedure definitions for a specific keyword like ColumnName in all databases:   Code Snippet sp_MSforeachDB ' USE ? SELECT DB=''?'', o.name , c.text FROM sysobjects o INNER JOIN syscomments c ON o.id = c.id WHERE o.Type= ''P'' and c.text LIKE ''%ColumnName%'' '     With PATINDEX instead of LIKE,...
dva2007
7
user's latest post:
datetime problem - TechNet Forums
Published (2008-11-26 13:25:00)
I have found something very useful to play around date and time. it is having all format. Please see the format below.   http://www.mssqltips.com/tip.asp?tip=1145      
ITHELP85
6
user's latest post:
Caluculating the percentage of...
Published (2008-11-29 05:02:00)
  Aaron Alton wrote: So the quantity of a specific line item as a percentage of the total quantity of items sold?  For instance, if you sold:   Order 1 > Item A > 10 Order 2 > Item B > 10 Order 3 > Item C > 10 Order 4 > Item A > 10   Then the result would be: Order 1 > 25% Order 2 > 25% Order 3 > 25% Order 4 > 25%   Or would it be: Order 1 > 50%...
deeptideshpande
6
user's latest post:
Simple Query is taking long time...
Published (2008-11-27 04:52:00)
Hi Sankar,   Thanks for helping me out. My problem was resolved. I think the culprit here is not the SP. Actually the developers are trying to insert the data in that table for unit testing( not through SP) and that time table is getting locked. But yesterday i was able to kill that transaction and release all the locks. So as of now my problem seems to be resolved.   But i'm really curious to know why this happens when we try to do...
 

Latest active threads on Transact-SQL::

TechNet Forums
Started 5 days, 8 hours ago (2008-11-29 08:57:00)  by sseerraajj
  Hello.. This is a simple code:   WITH OrderedOrders AS (     SELECT *,     ROW_NUMBER () OVER ( ORDER BY topicID DESC ) AS 'RowNumber'     FROM topicstbl where topicname like '%book%' ) SELECT * FROM OrderedOrders WHERE RowNumber BETWEEN 1 AND 10 ;     ...
Thread:  Show this thread (2 posts)   Thread info: how to get results count when searching and returning a subset of rows? - TechNet Forums Size: 28 kb
Related Threads: Same Site | All Sites
Customize:  Customize "how to get results count when searching and returning a subset of rows? :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 5 days, 7 hours ago (2008-11-29 10:02:00)  by derekerin
How to recover the deleted stored procedure? rookie
Thread:  Show this thread (1 post)   Thread info: How to recover the deleted stored procedure? - TechNet Forums Size: 276 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "How to recover the deleted stored procedure? :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 1 week, 2 days ago (2008-11-25 15:45:00)  by sseerraajj
  Hello.. I think if I did this query without using temp table it will be faster than it now, is it right? So how to do that? The code: CREATE TABLE ##resTMPTBLend ( ID bigint identity ( 1 , 1 ), topicID [nvarchar] ( 100 ), rnk int ) INSERT INTO ##resTMPTBLend     SELECT topicID , ( KEY_TBL . RANK + 2000 ) FROM topicstbl ...
Thread:  Show this thread (6 posts)   Thread info: Can I do this query without using temp table? - TechNet Forums Size: 7,466 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Can I do this query without using temp table? :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 6 days ago (2008-11-28 16:27:00)  by BIGDNF
I have a question is there any way to figure out what stored procedure is changing values in specific table column. I have big database which contain many SP and I don’t know which one is updating some column. I thanked about trigger and found this http://code.msdn.microsoft.com/SQLExamples/Wiki/Vi ew.aspx?title=AuditOrBypassTriggerExecution   solution but I have to change my SP to do...
Thread:  Show this thread (3 posts)   Thread info: How to check who is updating the column? - TechNet Forums Size: 999 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "How to check who is updating the column? :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 6 days, 21 hours ago (2008-11-27 20:10:00)  by ITHELP85
I want to create a query that shows the StoreName, StoreCountry, ItemNumber, ItemName, and that items percentage of the total sales for an item. This is my code below; it is not working.   /* Displays Store Name and Items that were Purchased from that Store that have been in Sales Transactions and the Items Sales percentage */   CREATE VIEW STORE_SALES_ITEMS99 ([Store Name], [...
Thread:  Show this thread (11 posts)   Thread info: Caluculating the percentage of sales for individual items - TechNet Forums Size: 2,967 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Caluculating the percentage of sales for individual items :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 6 days, 6 hours ago (2008-11-28 11:05:00)  by san7481
  Hi Everyone,         I havt find user between fromage and toage for example 1 to 100 Below is my stored procedure.   alter procedure [dbo] . [Search_AgeWiseUserInformation] @CurrentPage int , @PageSize int , @FromAge int , @ToAge int , @LocationId int , @sortExpression NVARCHAR ( 50 ) = 'UserId' ...
Thread:  Show this thread (8 posts)   Thread info: Must Declare Scalre Variable error - TechNet Forums Size: 14 kb
Related Threads: Same Site | All Sites
Customize:  Customize "Must Declare Scalre Variable error :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 6 days, 1 hour ago (2008-11-28 15:34:00)  by Shahzadi
  hi,   i just saw my activity monitor and notice that some code is running , i don't know for what purpose of this code is on the system,  from the code i can see it's related from monitor the mirroring of database.. but @ the moment i don't hv any database that has been configured as mirrirong .. Yah Replication is running on the system...   any one has any idea   UPDATE ...
Thread:  Show this thread (3 posts)   Thread info: Running unknow Script - TechNet Forums Size: 1,116 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Running unknow Script :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 1 week ago (2008-11-26 20:53:00)  by BrentonW
Hi, I'm trying to implement a simple queuing system in SQL Server. I know the real answer to this to use Service Broker, which I'll likely end up doing, but I am curious as to why my table based system isn't doing what I expect it to. Here's my table: CREATE TABLE [dbo].[messages_MessageSets](     [MessageSetId] [int] IDENTITY(1,1) NOT NULL,     [FromUserId] [int] NOT NULL,     [...
Thread:  Show this thread (5 posts)   Thread info: Queuing problem - TechNet Forums Size: 2,432 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Queuing problem :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 6 days, 2 hours ago (2008-11-28 15:00:00)  by unlikely
So I've adopted this custom interface from a previous employee. The way it works is, when new items are added or updated into various tables in various databases, a custom trigger for that table runs and executes the same stored procedure called: sp_InterfaceExportDataKeysINS The problem is, I have no idea which tables have triggers that are running this ...
Thread:  Show this thread (14 posts)   Thread info: Possible to find out the name of a trigger that calls a stored proc? - TechNet Forums Size: 1,135 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Possible to find out the name of a trigger that calls a stored proc? :: Transact-SQL :: TechNet Forums"
TechNet Forums
Started 5 days, 22 hours ago (2008-11-28 19:04:00)  by Seidel1
I have a query that is returning a workorder number (int).  How can I make it return a total of 6 digits, with leading 0's, for example 17 would come back as 000017 and 3122 would come back as 003122? Jim
Thread:  Show this thread (3 posts)   Thread info: 0's as leading values? - TechNet Forums Size: 410 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "0's as leading values? :: Transact-SQL :: TechNet Forums"
 

Hot threads for last week on Transact-SQL::

Transact-SQL
Started 6 days, 2 hours ago (2008-11-28 15:00:00)  by unlikely
So I've adopted this custom interface from a previous employee. The way it works is, when new items are added or updated into various tables in various databases, a custom trigger for that table runs and executes the same stored procedure called: sp_InterfaceExportDataKeysINS The problem is, I have no idea which tables have triggers that are running this ...
Thread:  Show this thread (14 posts)   Thread info: Possible to find out the name of a trigger that calls a stored proc? - TechNet Forums Size: 1,135 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Possible to find out the name of a trigger that calls a stored proc? :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week, 1 day ago (2008-11-25 20:19:00)  by Whalensdad
I have UDF that I am passing in the following variable '4,6,7,8'   In my code it takes that value and assigns it to a variable @In_Sup   It then takes @In_Sup and reparses it using the following lines to change the format of the variable '4','6','7','8' SET @In_Sups = REPLACE(@In_Sup, '''', '') SET @In_Sups = '''' + REPLACE(@In_Sups, ',', ''',''') + ''''   This is set to...
Thread:  Show this thread (14 posts)   Thread info: Problem with SQL not recognizing Variable Properly - TechNet Forums Size: 1,427 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Problem with SQL not recognizing Variable Properly :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week, 1 day ago (2008-11-26 05:57:00)  by gbt
  there is a database ,having approx 50 lakhs records. main problem is coming in execution in select query ..  we have already indexed the table ... but  server is  taking around 30 seconds to exectue.  what are the possible ways to make the query execute faster. it is also taking large time using aggregate function....
Thread:  Show this thread (11 posts)   Thread info: urgent select query help - TechNet Forums Size: 603 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "urgent select query help :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 6 days, 21 hours ago (2008-11-27 20:10:00)  by ITHELP85
I want to create a query that shows the StoreName, StoreCountry, ItemNumber, ItemName, and that items percentage of the total sales for an item. This is my code below; it is not working.   /* Displays Store Name and Items that were Purchased from that Store that have been in Sales Transactions and the Items Sales percentage */   CREATE VIEW STORE_SALES_ITEMS99 ([Store Name], [...
Thread:  Show this thread (11 posts)   Thread info: Caluculating the percentage of sales for individual items - TechNet Forums Size: 2,967 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Caluculating the percentage of sales for individual items :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week, 1 day ago (2008-11-26 08:47:00)  by deeptideshpande
Hi All,   I have a very simple select query on a table A which is taking very long time. It has got only 5 columns. Any operation on that table is taking lot of time where as the other tables with more number of columns are getting executed within seconds.   Please tell me know what can i do about this.   Thanks, Deepti...
Thread:  Show this thread (11 posts)   Thread info: Simple Query is taking long time to execute. - TechNet Forums Size: 645 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Simple Query is taking long time to execute. :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week ago (2008-11-27 13:12:00)  by SPeters
Example input data: 50001  r  500,00$ 50001  r  200,00$ 50001  g   50,00$ 60000  r  150,00$ 60000  r    50,00$ 70000  g   60,00$     Desired output: 60000  r  150,00$ 60000  r    50,00$     Any suggestions?
Thread:  Show this thread (10 posts)   Thread info: Want to exclude records where only one row of the same types is false - TechNet Forums Size: 710 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "Want to exclude records where only one row of the same types is false :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week, 1 day ago (2008-11-26 01:43:00)  by dexiang wang
my store procedure try to insert 2000 records to a test table, the result is: 1. very slow in one computer which has a SCSI HDD. ( it took me 12 seconds )。 2. very fast in the same computer when i change scsi HDD to IDE HDD? (it took me 0.5 seconds) the both two HDD are well healthy. --======================== --here is the test script. --======================== drop table test_...
Thread:  Show this thread (8 posts)   Thread info: why slow insert to sqlserver2k when the hard disk is SCSI, and very fast inserting when IDE HDD? - TechNet Forums Size: 1,374 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "why slow insert to sqlserver2k when the hard disk is SCSI, and very fast inserting when IDE HDD? :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 6 days, 6 hours ago (2008-11-28 11:05:00)  by san7481
  Hi Everyone,         I havt find user between fromage and toage for example 1 to 100 Below is my stored procedure.   alter procedure [dbo] . [Search_AgeWiseUserInformation] @CurrentPage int , @PageSize int , @FromAge int , @ToAge int , @LocationId int , @sortExpression NVARCHAR ( 50 ) = 'UserId' ...
Thread:  Show this thread (8 posts)   Thread info: Must Declare Scalre Variable error - TechNet Forums Size: 14 kb
Related Threads: Same Site | All Sites
Customize:  Customize "Must Declare Scalre Variable error :: Transact-SQL :: TechNet Forums"
Transact-SQL
Started 1 week, 1 day ago (2008-11-26 10:50:00)  by dva2007
Hi Friends,   It happens usually that i need to copy the output from the query analyzer into the excel file (.xls or .csv) and pass it to other people. I have to copy from query analyser to excel file and then insert the column names manually. I know i can use result to csv option and do it. But it does it all the time. If i have some code which does it then it is better so that any one ...
Thread:  Show this thread (8 posts)   Thread info: How to export query analyser output into Excel with Column name - TechNet Forums Size: 795 bytes
Related Threads: Same Site | All Sites
Customize: