Viewing 15 posts - 1 through 15 (of 23 total)
I am already using SQL 2016 Standard. Still familiarizing with the features. And the data I received was from various web scrapes through a 3rd party vendor which is why...
August 8, 2016 at 12:30 am
I wrote this query but it is not returning entire results. It is failing when TYPE is not an array e.g. Fishing in this instance as it is not JSON...
August 5, 2016 at 5:34 pm
I also don't like to use Partitions and Ranks etc due to the sorting overhead
The default value for the new column will be set to 1 thus will allow...
March 6, 2014 at 5:26 pm
You have not coded for the brackets to be displayed. Brackets has to be part of the Expression.
August 6, 2012 at 11:47 pm
I managed to write the code. I have 4 outputs from the script component: ValidRows, HeaderRows, FooterRows and ErrorRows
The code is as follows:
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
...
June 1, 2012 at 1:48 am
I want to store complex transformation business rules within a rules repository table and then use SSIS to call those transformation rules. Not sure how this can be achieved by...
March 26, 2012 at 3:14 pm
If I correctly understand your requirement, you need to do Pivoting.
Here is the code:
SELECT
PVT.AU,
PVT.DIVISION,
PVT.LOWER_OFFICE,
PVT.[STAND CHART],
PVT.[US BANK]
FROM
(select AU, DIVISION, HIGH_OFFICE, LOWER_OFFICE, GL, GL1, GL + GL1 AS TotalRevenue
from TESTGROUNDFORIDEAS
) SRC
PIVOT
(
SUM(TotalRevenue)
FOR HIGH_OFFICE...
February 26, 2012 at 5:18 pm
All i wanted was a solution which was provided to me. And thanks for your time to provide SQL Coding Standards and more insight into T-SQL. I am sure lots...
February 16, 2012 at 6:21 pm
Thanks, This is exactly what I was looking for.
February 16, 2012 at 5:05 pm
The above code that I provided was just a sample code. In a real Prod environment, there will be a proper table with keys and indexes defined.
Also most of the...
February 7, 2012 at 5:35 pm
Recursive CTE's are not an issue. It works fine and gives expected result. But yes going back to previous version of SQL it will not work.
Definitely not interested in Cursor...
February 7, 2012 at 3:49 pm
Finally managed to resolve this. The full solution is:
--------------------------------------
-- CREATE DATABASE
--------------------------------------
CREATE DATABASE TEST
GO
USE [TEST]
GO
--------------------------------------
-- DROP TABLE
--------------------------------------
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Test_Apportion]') AND type in (N'U'))
DROP...
November 8, 2011 at 10:40 pm
I was expecting the result to be like:
TransactionID LedgerID Period Amount Paid ...
November 8, 2011 at 6:26 am
I managed to write a sample code and it's working as expected:
DECLARE @t TABLE
(ReadNum int,
GroupLevel int,
SeqNum int
)
Insert Into @t Values (1001,1,1)
Insert Into @t Values (1002,1,2)
Insert Into @t Values (1003,1,3)
Insert Into...
November 7, 2011 at 8:02 pm
Viewing 15 posts - 1 through 15 (of 23 total)