Tag: sql-server-2008

Pivot rows to columns SQL 2008

I have done quite a bit of review here and have gotten close to what I need, but I am stumped on the last little bit (or so I hope). I am using dynamic pivot to transpose my data from DocID PropID StrVal NumVal DateVal 5938 21 TARRO, THOMAS A III NULL NULL 5938 21 […]

SQL Server 2008 ssrs multiple records into one

I’ve been reading other similar “multiple records into one” posts, but either cannot seem to get any to work, or they don’t really apply to what I am trying to do. Here are my 3 tables. vehicle, vehicle_repair, comments vehicle columns: vehicle_name and other vehicle related info,vehicle_make, vehicle_model vehicle_repair columns: vehicle_name, vehicle_repair_type, vehicle_repair_num, etc, etc […]

SQL Server : Replication Error – the row was not found at the Subscriber when applying the replicated command

I got the following error in Activity Monitor, The row was not found at the Subscriber when applying the replicated command. (Source: SQL Server, Error number: 20598) After some research, I found out the error occurs because it’s trying to delete records which are not exists in the subscriber(Also are not exists in publisher) {CALL […]

Group Concatenate in MS SQL Server

I have two tables dbo.Supplier and dbo.L_ProductSupplier (AS LPST) and for all product IDs on LPST table, I want to concatenate the Supplier Names from dbo.Supplier (AS ST) which is linked to LPST by the SupplierID field (each product can have multiple suppliers) e.g. the query should take this: LPST.ProductID LPST.SupplierID ST.SupplierName 1 A CompanyA […]

calculation of amount for quarter

I have a question, I want merge my table data through date, All information provide in given table If Aggregation =Quaterly My table Table-1 Amount | Date | Aggregation 100 | 2013-01-01 | Quaterly 100 | 2013-02-01 | Quaterly 100 | 2013-03-01 | Quaterly 200 | 2013-04-01 | Quaterly 200 | 2013-05-01 | Quaterly 200 […]

How to map table fields from source as the variables of stored procedure in destination in SSIS Package?

I want to transfer data from source Database table named Patient (which contains many rows) to destination database tables(2) named Person & Patient. I already have stored procedure named AddPatient in destination database which will add person related fields to Person table and other fields to Patient table, so I would like to execute that […]

How do I install MS SQL Server 2008 R2 or 2012 Standard Edition on Windows 8.1

I have had problems in doing this and getting errors all the time at the end. I am running Windows 8.1. So, I was wanting to learn more about SQL Server 2012 through training offered on Lynda.com. However, they reference a prerequisite course on MS SQL Server which was published prior to the release of […]

Get Combine Records from SQL SERVER with Distinct and comma Separated columns

I have three Tables. Group Extension Extention_Group (Is a Middle table having GroupID and ExtensionID as reference IDs) I have three queries which I’m using right now, Query for getting distinct items from Extention_Group Table on the basis of GroupID select distinct GroupID from Extention_Group order by GroupID Query for getting required required columns from […]

transfers character fields with packed data with ssis

I am converting existing dts packages to ssis packages and I am running into issues with columns containing (what I thought was) packed data (comp-3 ?). Edit: turns out the it wasn’t packed data but binary zeros. The source is in a SQL 2005 database. The column is datatype char(100) containing a comp-3 packed field. […]

Trigger alter and create table SQL Server 2008

I would like to feed a table with all the updates and alters of tables in my database. For example: if I add a column called testColumn in the table Test my table would have something like this: TABLE COLUMN DATE Test testColumn 2014-05-05 05:25:31 I tried this using sys.tables and sys.columns but it doesn’t […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.