Quantcast
Channel: SQLServerCentral » SQL Server 2012 » SQL Server 2012 - T-SQL » Latest topics
Viewing all 4901 articles
Browse latest View live

Improving performance with INSERT statement

$
0
0
The following code uses a WHILE loop to Insert a row in table2 with every ClientID in table1 and every consecutive Year between 2000 and 2010. It works, but it is slow when table 1 is large, say 100,000 records.DECLARE @MyYear smallintSET @MyYear = 2000WHILE @MyYear <= 2010 -- i.e., for each year from 2000 to 2010BEGININSERT INTO table2 (Year, ClientID) SELECT @MyYear, table1.ClientID FROM table1SET @MyYear = @MyYear + 1ENDIs there any way to speed this up by using just an INSERT statement such as:INSERT INTO table2 (Year, ClientID) SELECT <years from 2000 to 2010>, table1.ClientID FROM table1Where the expression <years from 2000 to 2010> increments the Year value?Thanks

Pagination options SQL 2012 vs 2008 (Performance perspective)

$
0
0
Comparison with respect to performance - pagination options:1. SQL 2012 has introducted FETCH OFFSET ...2. SQL 2008 has an option of ROW_NUMBER() using CTE and then pick up specific row numbers.

Scalar function help-New to tsql

$
0
0
Hi all,Firstly many apologies if this is in the wrong place. I'm basicly trying to create a scalar function that returns a nvarchar (15) variable.The Function has two input variables namely [category] and [AreaCode] (both nvarchar(15)) with an output variable [Team Line]. I've constructed this without any problem via a case statement (see below), but as I need to use this statement repeatingly I thought a scalar function would be the answer!I'm new to sql functions so any good advice would be much appreciated!select,case when when [Category]='A' then 'Team A'when [Category]='B' then 'Team B'when [Category]='C' then 'Team C'when [Category]='K' and [AreaCode] in ('Acct','Desp','Analysis') then 'Team D'when [Category]='L' and [AreaCode] not in ('Lark') then 'Team E'else 'Others'end as [Team Line]Kindest regards,J

Need Help on query

$
0
0
[code="plain"]create table sample ( a date,b date, c date ,d date )insert into sample values (null,GETDATE(),GETDATE(),GETDATE())insert into sample values (null,GETDATE(),GETDATE(),null)insert into sample values (GETDATE(),GETDATE(),null,GETDATE())insert into sample values (GETDATE(),GETDATE()+1,GETDATE(),null)select * from sample[/code]I need following outputselect a , b, c , max(a,b,c) samplecan any 1 help...?

it's a bug?

$
0
0
Hello guys,I've this command:Select db_name(DB_ID()) as DBName,SS.name as SchemaName,SO.name as TableName, SI.name as Indexname,index_type_desc as IndexType ,avg_fragmentation_in_percent as FragmentationPercentage, (case when avg_fragmentation_in_percent between 10 and 30 then 'Defrag'when avg_fragmentation_in_percent > 30 Then 'Reindex'Else 'Can be Ignored Currently'End) as Recomendation from sys.dm_db_index_physical_stats(DB_ID(DB_NAME()), null, null, null, 'DETAILED') IPS , sys.indexes SI ,sys.objects SO , sys.schemas SS where IPS.index_id=SI.index_id and IPS.object_id=SI.object_id andSI.object_id=SO.object_id and SO.schema_id=SS.schema_id andIPS.index_type_desc in ('NONCLUSTERED INDEX', 'CLUSTERED INDEX') Order by Recomendation descand show some rows with FragmentationPercentage 11,1111111 and 15,11111 etc.i wrote alter index nameindex on object reorganize, BUTits continue show me FragmentationPercetange 11,1111111 and 15,11111, that is normally?is not show me FragmentationPercetange 0 ?thanks all

Msg 4862, Level 16, State 1, Line 1

$
0
0
with reference to OPENROWSET (TRANSACT-SQL) http://technet.microsoft.com/en-us/library/ms190312.aspxexample Edata[code]1 Data Item 12 Data Item 23 Data Item 3[/code]no-xml format file[code]9.021 SQLCHAR 0 0 "\t" 1 ID SQL_Latin1_General_Cp437_BIN2 SQLCHAR 0 0 "\r" 2 Description SQL_Latin1_General_Cp437_BIN[/code]when I execute the above the code, I get the following errors:[code]Msg 4862, Level 16, State 1, Line 1Cannot bulk load because the file "E:\certification\sql_server\sql_server_2012\mcsa\70-461\practise\openrowset\values.fmt" is incomplete or could not be read. Operating system error code (null).[/code]May I know how to resolve the issue?with reference to previous previous forum post http://www.sqlservercentral.com/Forums/Topic445398-9-1.aspxI have appended a return on the last line. Still I could not resolve the error.thanks a lot!

ISNULL results

$
0
0
Hi there, I have two super queries below that go off and for a 'Job Ref' pulls back the 'Number of Appointments' and another one that pulls back the 'Number of times a job is Carded'As it is a LEFT OUTER JOIN I still get results if the result is a NULL value. What I want to do is for a NULL value is return a '0' instead. The reason for doing this is later on in the script I want to do a calculation that takes away [b]''Number Times Carded' [/b]from the [b]'Number of Appointments' [/b]. If either the colums are Null it messes up my figures as the result will come back as Null.So I'm using COALESCE in my sub queries but not sure I'm doing it right as I'm still getting Nulls in my results.[code="sql"]SELECT DISTINCT job.[ref] AS 'Job Ref' , APP.APPOINT AS 'Number of Appointments' , CARDED.Carded AS 'Number Times Carded' FROM dbo.Job AS JOB LEFT OUTER JOIN (SELECT JOB_ID, COUNT(COALESCE(JOB_ID,'0')) AS 'Carded' FROM [dbo].[JobEvent] WHERE Description LIKE '%Carded%' AND EVENT = 'Additional Appointment Required' GROUP BY job_id ) AS CARDED ON JOB.ID = CARDED.job_id LEFT OUTER JOIN (SELECT job_id, COUNT(COALESCE(job_id,'0')) AS 'APPOINT' FROM Appointment WHERE status = 'Complete' GROUP BY job_id ) AS APP ON JOB.ID = APP.job_id WHERE (JOB.status_id NOT IN ('0', '5', '6', '1', '2')) AND (JOB.actual_enddate >= CONVERT(DATETIME, '2013-04-01 00:00:00', 102)) AND (JOB.actual_enddate <= CONVERT(DATETIME, '2014-03-31 00:00:00', 102)) [/code]

Cannot convert valid Char(24) date/time to date/time data type

$
0
0
Hi,I have collected some data using TYPEPERF.This command creates tables in the database specified in a DSN.The table with the data is CounterData.[code="sql"]CREATE TABLE [dbo].[CounterData]( [GUID] [uniqueidentifier] NOT NULL, [CounterID] [int] NOT NULL, [RecordIndex] [int] NOT NULL, [CounterDateTime] [char](24) NOT NULL, [CounterValue] [float] NOT NULL, [FirstValueA] [int] NULL, [FirstValueB] [int] NULL, [SecondValueA] [int] NULL, [SecondValueB] [int] NULL, [MultiCount] [int] NULL,PRIMARY KEY CLUSTERED ( [GUID] ASC, [CounterID] ASC, [RecordIndex] ASC )[/code]When querying this data i'm get an error converting the CounterDateTime (Char(24)) to any kind of date data type.[code="sql"]SELECT TOP 1 CASE WHEN ISDATE(CounterDateTime) = 1 THEN CAST(CounterDateTime AS SmallDateTime) ELSE NULL END DtFROM CounterData[/code]Returns NULLwhere as[code="sql"]SELECT TOP 1 CASE WHEN ISDATE(CounterDateTime) = 1 THEN CAST(CounterDateTime AS SmallDateTime) ELSE CounterDateTime END DtFROM CounterData[/code]Returns:Msg 295, Level 16, State 3, Line 1Conversion failed when converting character string to smalldatetime data type.Doesn't matter which date data type I use.DateTime and DateTime2 return:Msg 241, Level 16, State 1, Line 1Conversion failed when converting date and/or time from character string.Converting Char(24) using variables works fine.[code="sql"]DECLARE @DT Char(24)SET @DT = '2013-09-02 23:59:23.363' --Copied straight from the table.SELECT CAST(@DT AS SmallDateTIme)SELECT CAST(@DT AS DateTIme)SELECT CAST(@DT AS DateTIme2)[/code]Returns:2013-09-02 23:59:002013-09-02 23:59:23.3632013-09-02 23:59:23.3630000[code="sql"]SELECT MIN(CounterDateTime) MinDT, MAX(CounterDateTime) MaxDTFROM CounterData[/code]Returns:[code="sql"]MinDT MaxDT2013-08-30 23:59:25.143 2013-09-03 10:20:56.640[/code]Table contains no NULL values.All values are between 2013-08-30 AND 2013-09-03.What's going on here?

MDX/SSRS Chart Question

$
0
0
I have the following MDX query pulling information for a chart that shows hours worked (Values) by month (Category Group) by attorney (Series Group). The calculated set is used to exclude timekeepers who are not attorneys. The parameters are passed to this report as a drill-down.[code="plain"]WITH SET Attorneys AS {[Rank].[Rank Desc].&[Counsel] ,[Rank].[Rank Desc].&[Associate] ,[Rank].[Rank Desc].&[Partner] ,[Rank].[Rank Desc].&[Retired Partners] ,[Rank].[Rank Desc].&[Special Counsel]}SELECT NON EMPTY { [Measures].[Hours Worked]} ON COLUMNS, NON EMPTY { [Transaction Date].[Calendar].[Month].ALLMEMBERS * Attorneys * [Timekeeper].[Employee].[Employee Name].ALLMEMBERS} ON ROWS FROM [cube] WHERE (StrtoSet(@YearParam), StrtoSet(@MCaseParam))[/code]I need to add one more series line showing the total for all attorneys per month. I tried adding a second series with a calculated total but that produces a total line per attorney rather than just one total line. Any ideas? Thanks in advance.

Pagination options SQL 2012 vs 2008 (Performance perspective)

$
0
0
I need to understand which one is better with respect to performance :1. SQL 2012 has introducted FETCH OFFSET ...SELECT FirstNm,LastNmFROM PersonORDER BY FirstNmOFFSET 5 ROWSFETCH NEXT 10 ROWS ONLY2. SQL 2008 has an option of ROW_NUMBER() and then pick up specific row numbers. Sample below -SELECT * FROM (SELECT t1.colX, t2.colY ROW_NUMBER() OVER (ORDER BY t1.col3) AS row FROM Table1 t1 INNER JOIN Table2 t2 ON t1.col1=t2.col2 )a WHERE row >= n AND row <= mNote: there is an index of t1.Col3.

Comlplicated query help

$
0
0
I have a query that I run as a stored procedure. It was written by someone else, and I am not that well versed in this type of query.[code="sql"]USE [NMS_RT]GOSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOBEGINSET NOCOUNT ON; SELECT ( Grp.name + ',' + Grp.state ) AS Wayside, ( SELECT 'G' + SUBSTRING(CONVERT(VARCHAR(100), CAST(WEA AS DECIMAL(38, 2))), 3, 3) + '/' + SUBSTRING(CONVERT(VARCHAR(100), CAST(WEA AS DECIMAL(38, 2))), 6, 3) ) AS 'Group ID', ( SELECT [Name] + ',' + [State] FROM [NMS_CFG2].[dbo].[Base_Equipment] WHERE Base_Equip_Address = ( SELECT TOP 1 Base_Equip_Address FROM [NMS_CFG2].[dbo].[be_xref_oa] WHERE x_pbase = master.dbo.ufnStringToPbase([base1]) ) ) + ' ( ' + [base1] + ')' AS 'Primary', ( SELECT [Name] + ',' + [State] FROM [NMS_CFG2].[dbo].[Base_Equipment] WHERE Base_Equip_Address = ( SELECT TOP 1 Base_Equip_Address FROM [NMS_CFG2].[dbo].[be_xref_oa] WHERE x_pbase = master.dbo.ufnStringToPbase([base2]) ) ) + ' ( ' + [base2] + ')' AS 'Secondary', CAST([Date_Time] AS DATE) AS DateFROM [NMS_RT].[dbo].[RT_Group_Status] AS CovINNER JOIN [NMS_CFG2].[dbo].[ATCS_Group] AS Grp ON Grp.Group_Address = Cov.[WEA]WHERE Lock1=1 or Lock2=1ORDER BY Date DESC, Wayside END[/code]This code outputs the data like this;20th Street MP 542.1,CO,G192/007,Denver IP GTC,CO ( 259.1.01 ),Globeville IP GTC,CO ( 278.1.01 ),2013-09-03There are two additional fields that I need to add in this query that are part of the RT_Group_Status table. They are SSI1, SSI2. These fields are INT data type.If possible I would like to add them inside of the ( ) field shown above e.g. (259.1.01/222). Appreciate any help.Thanks,

how to combine more than one SET operator correctly, to solve problem

$
0
0
It's come to my attention, from taking SQL Server 2012 practice tests, that I don't know how to combine SET operators UNION, INTERSECT, AND EXCEPT for situations requiring more than one type to solve a problem.I would like to understand before it turns into [i]real life.[/i]Practice question:The Hovercraft database has three tables related to Hovercraft design, OldDesign, CurrentDesign, and FutureDesign. Some designs are present in more than one table. You want to generate a list of all items in the FutureDesign table as well as FutureDesign items that are present in both the OldDesign and CurrentDesign tables.Answer:SELECT HovercraftModelID, Name FROM Hovercraft.OldDesign INTERSECT SELECT HovercraftModelID, Name FROM Hovercraft.CurrentDesign UNION SELECT HovercraftModelID, Name FROM Hovercraft.FutureDesignIn the case of my DDL, it's the color red, plus black and white, that should be returned....and it does that using same semantics. [code="plain"]create table oldColors(color varchar(20));insert into oldColorsvalues('red'),('pink'),('pale blue'),('light yellow');create table currentColors(color varchar(20));insert into currentColorsvalues('red'),('blue'),('salycilic yellow');create table futureColors(color varchar(20));insert into futureColorsvalues('black'),('white'),('red'); SELECT color FROM oldColors INTERSECT SELECT color FROM currentColors UNION SELECT color FROM futureColors;[/code]My confusion: But, to me the correct answer reads like its going to retrieve only the designs that OldDesign has in common with CurrentDesign and all the designs in FutureDesign. But when I run the set operation it does what is asked.Is this a situation of 'White Panda Eats Shoots and Leaves'? which could be interpreted differently depending on how you read it IE. that I'm just reading the set operation with the wrong mindset?Can anyone relate to my confusion and help me out of it?

how to send a email before one day of myselecteddate.

$
0
0
Hi All,I have a table with one column as date field myselecteddate. If the current date is one day before myselecteddate I need to send an email through sql server.I will use datediff and find the difference between myselected date and Currentdate. Then if some rows returns 1 . Then how to fetch them if difference =1 and send an email.Any suggestions or ideas will be helpful.Thanks.

How do I convert column data into row data?

$
0
0
table gennumtollnum, n1, n2, n3800123, 1234, 1235, 1236999123, 9876, 9875, 9874I want to my data to look like:tollnum,code800123, 1234800123, 1235800123, 1236999123, 9876999123, 9875999123, 9874How do I convert column data into row data?

Msg 245, Level 16, State 1, Line 244 Conversion failed when converting the varchar value '2013-02-25' to data type int.

$
0
0
Hi Guys I got a table that I have created I'm trying to insert data to that table:And I'm using a Case function to insert data on my Finmonth columnCREATE TABLE [dbo].[SalesLog_TerminationsTest]( [Accountno] [int] NULL, [Contractno] [int] NULL, [Terminatedate] [datetime] NULL, [MonthTerminate] [varchar](20) NULL, [YearTerminate] [varchar](5) NULL, [Registrationnumber] [varchar](150) NULL, [Editopr] [varchar](150) NULL, [Username] [varchar](150) NULL, [Terminatecode] [varchar](150) NULL, [Terminatedesc] [varchar](150) NULL, [unitid] [varchar](150) NULL, [unittypeid] [varchar](150) NULL, [UnitType] [varchar](150) NULL, [description] [varchar](350) NULL, [salesID] [varchar](150) NULL, [salesIDDesc] [varchar](150) NULL, [contracttype] [varchar](150) NULL, [ContractDesc] [varchar](150) NULL, [Remarks] [varchar](350) NULL, [VehicleMake] [varchar](250) NULL, [VehicleModel] [varchar](250) NULL, [LenghtOfContract] [int] NULL, [FitmentID] [varchar](50) NULL, [FitmentIDDesc] [varchar](250) NULL, [ChargeCode] [varchar](50) NULL, [ChargeAmount] [money] NULL, [ClientName] [varchar](250) NULL, [ContractDate] [datetime] NULL, [MonthContract] [varchar](20) NULL, [YearContract] [varchar](5) NULL, [MonthTerminated] [varchar](100) NULL, [FinYear] [int] NULL, [FinMonth] [int] NULL, [FinQuarter] [int] NULL) ON [PRIMARY]Quey for inserting data for my finMonth column CASE WHEN finmonth BETWEEN '2013-02-25' AND '2013-03-26' THEN 1 WHEN finmonth between '2013-03-26' and '2013-04-26' THEN 2 WHEN finmonth BETWEEN '2013-04-26' AND '2013-05-29' THEN 3 WHEN finmonth BETWEEN '2013-05-29'and '2013-06-26' THEN 4 WHEN finmonth BETWEEN '2013-06-26' AND '2013-07-29' THEN 5 WHEN finmonth BETWEEN '2013-07-29' AND '2013-08-28' THEN 6 WHEN finmonth BETWEEN '2013-08-28' AND '2013-09-26' THEN 7 WHEN finmonth BETWEEN '2013-09-26' AND '2013-10-29' THEN 8 WHEN finmonth BETWEEN '2013-10-29' AND '2013-11-27' THEN 9 WHEN finmonth BETWEEN '2013-11-27' AND '2013-12-23' THEN 10 END AS FinMonth, I get the following error MsgMsg 245, Level 16, State 1, Line 244Conversion failed when converting the varchar value '2013-02-25' to data type int.Please assist

Temp tables vs "permanent" temp table vs User Table Type

$
0
0
Hi,We have an SP that receives an XML field with loads of data (sometime it has over 1.000 records).The XML data is used in the SP and other SPs called from the "main" SP and used to join with other tables.What's the best way to store the XML? 1. A #temp table knowing it will always be created and dropped not taking advantage of statistics (can have PK and IDX to improve the joins);2. A permanent temp table, this is, a table created like all the others but the data is inserted and deleted, just for processing porpoise, and the key has a SessionId. This can take advantage of statistics and the table isn't created and dropped whenever the SP is called;3. A user defined table variable to be used as parameter (can have the PK to improve joins).If the software was made in c#, that can use the UDT type, i'd probably go with it but since it's VB6 it doesn't support UDT types so the data has to passed as one big XML chunk.Thanks,Pedro

Is there any way to turn of parsing?

$
0
0
Hi,I'm writing a script that will gather server information from different versions of SQL, starting from 2005.I cannot run the following query due to one or the other column not existing in the current version of SQL.[code="sql"]SELECT CASE WHEN RIGHT(LEFT(@@VERSION, 25), 4) >= 2012 THEN ROUND(1.0 * Physical_Memory_kb / 1024 / 1024, 2) ELSE ROUND(1.0 * Physical_Memory_in_bytes / 1024 / 1024 / 1024, 2) END MemGBFROM sys.dm_os_sys_info[/code]Is it possible to turn off parsing in a HINT or SET?Couldn't find anything here, but maybe someone somewhere knows a sneaky trick[url]http://technet.microsoft.com/en-us/library/ms190356.aspx[/url][url]http://technet.microsoft.com/en-us/library/ms187713.aspx[/url]I can of course create the queries dynamically, but am hoping to avoid this if possible.Thanks!BTW, how can I alias the URLs?

Need to alter my code to show limited Info

$
0
0
I am trying to write a query to show by regions the top 4 languages spoken there. How can I write this?Select DistinctPD.ProviderId,PD.FullName,PL.LanguageDesc, PR.RegionKey,MD.OperationalMarketFrom [dbo].[ProviderDim] PDJoin [dbo].[ProviderLanguagesXref]PL On PD.ProviderID=PL.ProviderIDJoin [dbo].[ProviderLobRegionXref] PR On PD.ProviderKey=PR.ProviderKeyJoin [dbo].[MarketLevelDim] MD On PR.RegionKey=MD.OperationalRegionKey Where PD.Active ='1' Order by PD.ProviderId, MD.OperationalMarket

SELECT ONLY ONE ROW FROM MANY

$
0
0
I a table that stores item data. The tables contains an itemid, label code, date time and recordID. Each item has various names associated with it. These names are stored in another table. I basically need to create a query that selects only one of the many names for each item. I have provided some sample data to illustrate.[code="sql"]-- CREATE TABLESCREATE TABLE ITEM ([ITEMID] NVARCHAR(20) NOT NULL,[LabelCode] NVARCHAR(2) NOT NULL,[DateStamp] [datetime] NOT NULL,[RECID] BigINT NOT NULL,PRIMARY KEY CLUSTERED ( [ITEMID] ASC, [RECID] ASC) ON [PRIMARY])ON [PRIMARY]CREATE TABLE AltNames([ID] INT IDENTITY(1,1) NOT NULL,[NAME] NVARCHAR(10) NOT NULL,[DateStamp] [datetime] NOT NULL,[RECID] BigINT NOT NULL,PRIMARY KEY CLUSTERED ( [ID] ASC ) ON[PRIMARY])ON [PRIMARY]--Insert some test dataINSERT INTO ITEM([ITEMID],[LabelCode],[DateStamp],[RECID])SELECT 'W-004663633','RA',GETDATE(),5914152711UNION ALLSELECT 'W-005945839','RA',GETDATE(),5914152712UNION ALLSELECT 'W-005945840','RA',GETDATE(),5914152713UNION ALLSELECT 'W-005945841','RA',GETDATE(),5914152714INSERT INTO AltNames([NAME],[DateStamp],[RECID] )SELECT 'THOMAS',GETDATE(),5914152711UNION ALLSELECT 'NIJLANDS',GETDATE(),5914152711UNION ALLSELECT 'EVANS',GETDATE(),5914152711UNION ALLSELECT 'BRIDGES',GETDATE(),5914152712UNION ALLSELECT 'KEITH',GETDATE(),5914152712UNION ALLSELECT 'ARNO',GETDATE(),5914152713UNION ALLSELECT 'HAVERKOORT',GETDATE(),5914152713UNION ALLSELECT 'SOMORE',GETDATE(),5914152713UNION ALLSELECT 'OMOREGIE',GETDATE(),5914152714UNION ALLSELECT 'SKYWALKER',GETDATE(),5914152714SELECT A.[ITEMID], A.[LabelCode] , B.NAMEFROM AltNames B INNER JOIN TableA AON A.RECID = B.RECID[/code]My output is required to look like:[b]ITEMID LABELCODE NAME[/b]W-004663633 RA THOMASW-005945839 RA KEITHW-005945840 RA SOMOREW-005945841 RA SKYWALKER

Reset ranking based on flag

$
0
0
Hi all,Looking for some help with a query problem that's had me banging my head against a wall :-)Basically I need to reset a ranking based on a flag in my dataset. I feel like I need to generate another column on which to do the grouping but I'm not sure how to go about it. My current query is this:[code="sql"]SELECT ta.EmailAddress ,tb.CreatedAt ,CASE WHEN DATEDIFF(dd,LAG(tb.CreatedAt,1) OVER (PARTITION BY ta.EmailAddress ORDER BY tb.CreatedAt),tb.CreatedAt) > 30 THEN 1 ELSE 0 END AS GroupResetFlag ,RANK() OVER(PARTITION BY ta.EmailAddress ORDER BY tb.CreatedAt) AS InitialRankFROM TableA ta INNER JOIN TableB tb ON tb.Id = ta.IdORDER BY ta.EmailAddress, tb.CreatedAt[/code]The results look like this:EmailAddress | CreatedAt | GroupResetFlag | InitialRankjoe@bloggs.com | 2012-09-04 14:00 | 0 | 1joe@bloggs.com | 2012-09-04 14:30 | 0 | 2joe@bloggs.com | 2012-09-05 12:51 | 0 | 3joe@bloggs.com | 2012-11-05 09:00 | 1 | 4joe@bloggs.com | 2012-11-06 11:22 | 0 | 5The ranking should be reset when the current 'CreatedAt' value is greater than 30 days after the previous 'CreatedAt' value for the same email. So I'm looking to get a result set like this:EmailAddress | CreatedAt | GroupResetFlag | InitialRank | NewRankjoe@bloggs.com | 2012-09-04 14:00 | 0 | 1 | 1joe@bloggs.com | 2012-09-04 14:30 | 0 | 2 | 2joe@bloggs.com | 2012-09-05 12:51 | 0 | 3 | 3joe@bloggs.com | 2012-11-05 09:00 | 1 | 5 | 1joe@bloggs.com | 2012-11-06 11:22 | 0 | 6 | 2Any ideas on how to do this? I'm running SQL2012.Thanks in advance!
Viewing all 4901 articles
Browse latest View live