Quantcast
Channel: Transact-SQL forum
Browsing all 23857 articles
Browse latest View live

what do I have to modify on below query to keep same order?

here is my original...

View Article


Get Stored Procedure Last Execution time.

Hi,I am looking to get last execution of store proc(My cache is flushed off). So would like to know all the store proc execution times.sys.dm_exec_query_stats( as I known gets from cache, now all my...

View Article


how can I modify one column of current and next record depending of some...

Having...

View Article

Field Size (50K characters results in 150MB field size)

Hi,There was some data inserted a nvarchar(max) field into a table using an application. If we count the number of characters in the field, its about 50k, however if we check the size of the field...

View Article

Image may be NSFW.
Clik here to view.

The time has come! Step up T-SQL Gurus! Your community needs heroes like you!

TechNet Gurus... we salute you!You're awesome, and we know it!Your knowledge uploads and nifty info nuggets are our life blood at TechNet Wiki.Every awesome article that gets an award is just the...

View Article


Convert web site from Access Database to SQL

We have used an Access Database on our web site for some time, but it has been suggested that we update to SQL for any future upgrades.The script that access the database looks like:-<%...

View Article

Chnage Tracking Get actual Column name from SYS_CHANGE_COLUMNS

   Hoe to retrive actual column from change track fields?SELECT    CT._ID,CT.SYS_CHANGE_OPERATION,    CT.SYS_CHANGE_COLUMNS,CT.SYS_CHANGE_CONTEXTFROM    CHANGETABLE(CHANGESdbo.xYZ,9)ASCTNavin.D...

View Article

Function for parsing a string

I have a string of the below formatname1=value1; name2=value2;name 3=value3 ;name4 = value4Can some one please get me ready with a function which gets the above string and name part as input which...

View Article


Need function which accepts column name as a input and returns comma...

Hi All,I need function which accepts column name as a input and returns comma separated values in that column.CREATE TABLE [dbo].[EMP]( [EMPNO] [numeric](4, 0) NOT NULL, [ENAME] [varchar](10) NULL,...

View Article


Stored Procedure with BCP executing endlessly

HiI have this stored procedure that runs a bcp command. When i run the sp it runs endlessly but when i run the bcp code it runs perfectly.The bcp is just a simple select and outputs it to a file.

View Article

TSQL: Multiple Pivot scenario

HI Friends,Please find below tabl, I want to pivot Column1 and Column2 Both,  Please find resultSet below...

View Article

PDW/SQL Scripting : Recreating values based on given intervals

Hi,In my datasource I have references. But instead of having the full range I have intervals (From/To). I need in my destination to recreate the full range of references.Ex : Source -> From...

View Article

Query self relating table

I have a self relating table that I need to query in the following way.TableID, ParentId, Format, Qtysample records1, Null, A4, 4 2,1, B/W,  4 3,1, Duplex, 24,Null, A3, 1 5,4, Color, 1somehow I need to...

View Article


measuring the cpu and ram consumption of a given query in sql server

hello there how you doing and am new to this sql server forum and i suddenly popped to ask questions related to sql serverand my question goes like thisin sql server i have table called testt and it...

View Article

accidentally dropped a subscription! Do I re-initialize all subscriptions?

Hi!I make a big mistake! I was trying to copy a SQL 2005 transact replication over to a 2012 for testing, but I accidentally dropped the subscription on the 2005 (production) box.Luckily I had scripted...

View Article


HOW CAN I CREATE A VIEW FROM SAME TABLE WHERE I NEED COLUMNS DETAILS FROM...

i have a table1 on the top, but i want to create a view from table 1 as  view mentioned beneath the table 2. Could any of you please help...

View Article

benefit and limitation of temp table in sql server 2008

I have a datagrid in front end of asp.net . when user select a row it shows another gridview (multiple row ) where user have to put some data. when user click CLOSE button  i have to keep all data of...

View Article


Multiple update statements with different conditions in a merge procedure

Hi All, I have a merge procedure which runs fine  and the condition for when matched is like this WHEN MATCHED AND tODS_StoreTraffic.NumVisits <> tODS_StoreTrafficStg.NumVisits...

View Article

bcp file transfer not working after adding datetime behind the output file name.

I like to add date (yyyy_MM_dd) behind output file , after adding $startTime variable , it's not working . Seems file format is not correct . Could you tell me where is wrong ?$startTime = Get-Date...

View Article

Best Practice to load multiple Tables

Hi,Am trying to load around 9-10 tables in sql server.all these belong to a single project.table loads are just select * into destination table,using some joins.Is it good to have 1 stored proc to load...

View Article
Browsing all 23857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>