sql-server-2012

Why aren't my charts in SSRS 2012 displaying?

随声附和 提交于 2019-12-12 15:11:54
问题 I recently moved several reports over to a new server. Everything works fine displaying tables and data, but charts are not displaying properly. It looks like the image is not rendering properly. My initial thought was that this was a permissions issue, specifically that the service account used to run SSRS needed permissions to a certain folder on the server that is used to generated chart images, but I can not find anything about this in searching for a solution. This happens with old

SQL Server 2012: DATETIME discrepancies between inserts and triggers

不羁岁月 提交于 2019-12-12 14:52:54
问题 We are having a very strange problem whereby when calling GETUTCDATE() the returned value is very slightly earlier in the second statement than the first. The scenario we have is the following: We insert into a table to track a users current status, this table has a trigger on which inserts into an associated history table of the users past statuses with a DATETIME field and the insert calls GETUTCDATE() Once this is done we have another table with an associated record we insert into calling

how to get the distinct records based on maximum date?

牧云@^-^@ 提交于 2019-12-12 14:43:01
问题 I'm working with Sql server 2008.i have a table contains following columns, Id, Name, Date this table contains more than one record for same id.i want to get distinct id having maximum date.how can i write sql query for this? 回答1: Use the ROW_NUMBER() function and PARTITION BY clause. Something like this: SELECT Id, Name, Date FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY Id ORDER BY Date desc) AS ROWNUM FROM [MyTable] ) x WHERE ROWNUM = 1 回答2: If you need only ID column and other columns

Resolving TRY_PARSE() overflow with datetime in SQL Server 2012. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM

女生的网名这么多〃 提交于 2019-12-12 14:43:01
问题 I recently started changing queries to use TRY_PARSE() but I run into a problem when the resulting date is before the year 1753. For example: SELECT TRY_PARSE('01-Jan-0001' AS datetime) Results in a .NET error: Msg 6521, Level 16, State 1, Line 1 A .NET Framework error occurred during statement execution: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. System.Data.SqlTypes.SqlTypeException: at System.Data.SqlTypes

Replicate a filtered subset of data: Merge or Transactional replication?

♀尐吖头ヾ 提交于 2019-12-12 14:09:21
问题 First of all thanks for reading. I need to replicate a subset of data that is based on a join filter; filter based on a join with an other table (Microsoft:"Using join filters, you can extend a row filter from one published table to another."). This is the setting: SQL Server 2012; replication sources on a subscription of a transaction replication replication needs to be one direction sync (from publisher to subscriber); only one subscriber/subscription; small dataset with not many

How to compare two tables in SSIS? (SQL Server)

烈酒焚心 提交于 2019-12-12 14:02:25
问题 I am creating an SSIS package that will compare two tables and then insert data in another table. Which tool shall I use for that? I tried to use "Conditional Split" but it looks like it only takes one table as input and not two. These are my tables: TABLE1 ID Status TABLE2 ID Status TABLE3 ID STatus I want to compare STATUS field in both tables. If Status in TABLE1 is "Pending" and in TABLE2 is "Open" then insert this record in TABLE3. 回答1: If your tables are not large you can use a Lookup

SQL Server 2012 - Fulltext search on top of a filetable - PDF not being searched

爷,独闯天下 提交于 2019-12-12 13:08:15
问题 I'm getting my feet wet with handling a load of Office and PDF documents with SQL Server 2012's FILETABLE feature, and using fulltext search on top of that. I've configured my SQL Server to support fulltext search and filestream, and I've created a FILETABLE , dumped 800+ documents of all sorts into the folder, and that all works nicely. In order to be able to fulltext index MS Office documents, I've installed the MS Filter Pack 2.0, and to handle the PDF files, I've downloaded Adobe's

3d spatial objects in sql server

烈酒焚心 提交于 2019-12-12 13:07:59
问题 Is there any way I can define a 3D solid within SQL Server using the spatial data type? If so, can I see an example of how this would be done? say, just a 1x1x1 simple cube? Would I have to define 6 polygons (1 for each face of the cube) and use those together somehow? Everything I have read online tends to show examples purely with 2D shapes. I do know the Point type can handle X,Y,Z (and M) - So spatial 3D is possible, but I am finding it hard to get good examples. Especially of polygons /

Select row data in addition to structured XML data

早过忘川 提交于 2019-12-12 12:38:25
问题 I know how to join an XML variable to other tables, but in this case, I am trying to select each row from a table plus the structure of the XML from each respective table row , alongside that row. I cannot find any examples online to help with this, as most examples deal with a single XML value (apologies if there are, I was unable to locate them in amongst the myriad of other XML examples). The table structure is this: CREATE TABLE tbl_QuizHistory ( HistoryId int PRIMARY KEY, QuizData xml

BCP Import error “Invalid character value for cast specification”

左心房为你撑大大i 提交于 2019-12-12 12:37:36
问题 All I am using BCP for import export and getting "Invalid character value for cast specification" error for only 1(first row of export) row while trying to import back. Table Structure Col1 -- Numeric(19,0) Col2 -- NVARCHAR(400) Col3 -- NVARCHAR(400) I am using following commands FOR Export EXEC master..xp_cmdshell 'bcp "SELECT TOP 10 Col1, Col2, Col3 FROM Server.dbo.TableName" queryout C:\Data\File.dat -S Server -T -t"<EOFD>" -r"<EORD>" -w' Same way I am generating a FORMAT file EXEC master.