? SQL query which returns variable number of columns for each record combining multiple rows

I am working on an SQL query which should return data having same or different number of columns for each row For example, I have the following data which comes from a CTE as follows With CTE As(
 ? TSQL Dynamic Pivot Table

I am using a select statement like this...SELECT FileYear, FileSemester, StudentID, AssessmentCode, AssessAreaHdgAbbrev1, AssessResultsResultFROM vStudentReportsSemesterResultsWHERE (FileYear = 2014)
 ? SQL Server Dynamic Pivot Query

I am creating a dynamic pivot query that shows the total NetAmount per Week of every Customers within a given date range. The problem is it doesn't ADD ALL the NetAmount within the Week. Here are the
 ? How to use SSIS Visual Studio 2008 to build Dynamic Datapull from multiple SQL servers for multiple tables using foreach loop

What I want to do is build a dynamic data pull from different SQL source servers (Server1,Server2,Server3) etc. To pull down to dynamic locations on my SQL server (Dev,Prod) into databases (database1,
 ? How to use SSIS Visual Studio 2008 to build Dynamic Datapull from multiple SQL servers for multiple tables using foreach loop

What I want to do is build a dynamic data pull from different SQL source servers (Server1,Server2,Server3) etc. To pull down to dynamic locations on my SQL server (Dev,Prod) into databases (database1,
 ? How to use SSIS Visual Studio 2008 to build Dynamic Datapull from multiple SQL servers for multiple tables using foreach loop

What I want to do is build a dynamic data pull from different SQL source servers (Server1,Server2,Server3) etc. To pull down to dynamic locations on my SQL server (Dev,Prod) into databases (database1,
 ? Copying SSIS packages deployed on SQL Server back to Visual Studio 2008

My Development SSIS box with my Visual studio 2008 installation is not working anymore. I am trying to figure out how I can take the packages running on my production SQL 2008 SP2 server and insert t
 ? Spring-data-jpa with SQL Server - Geometry Deserialization Exception

I'm using Spring-data-JPA for CRUD operations on a legacy SQL Server database.When I add the geometry column to my domain class, I get the following exception (I included the whole thing for those who
 ? SQL Server 2016 Security Features

Always Encrypted and Dynamic data masking are two important security features available in SQL Server 2016. Can both of these features co-exist on single database table.If yes, what should be the orde
 ? Tool/script to clone SQL Server database with reduced rights (without backup functionality)?

In short, I need a way to copy a database from one server to another without access to backup functionality, i.e. read and recreate schema and other objects with statements like CREATE TABLE, copy dat
 ? SqlDataAdapter dataset fill padding string with 0

Having a strange issue using SqlDataAdapter to execute a stored procedure and return the result set. The procedure returns a single string value, and executes correctly and returns the proper value wh
 ? How bad is opening and closing a SQL connection for several times? What is the exact effect?

For example, I need to fill lots of DataTables with SQLDataAdapter's Fill() method:DataAdapter1.Fill(DataTable1);DataAdapter2.Fill(DataTable2);DataAdapter3.Fill(DataTable3);DataAdapter4.Fill(DataTable
 ? Insert data from stored procedure returning mutiple dataset into a temporary table in SQL Server 2008

My stored procedure returns more than one result set.I want to get the data returned by the second select statement from the stored procedure and I want to insert that data in a temporary table in SQL
 ? SQL Server stored procedure allows to insert into a table only numbers, not characters

I developed a vb.net application which connects to a SQL Server 2014. At server side I created the following stored procedure to insert a row to a table when called out by vb app.create procedure uspI
 ? Arithmetic overflow error converting expression in to data type datetime

Hoping someone can help. I've looked on the internet for a solution but none seem to resolve it. I want to query a large table and only get the results back where a column equals today's date. Here's
 ? Arithmetic overflow error converting expression to data type datetime (Int64 to datetime)

TryingSELECT convert(datetime, 20120825142616 , 120) AS timeRunning into exceptionArithmetic overflow error converting expression to data type datetime.The value '20120825142616 ' is of type 'Int64' p

Page 1 of 910  |  Show More Pages:  Top Prev Next Last