sql-server-2012

Concatenate multiple data rows into one row

风流意气都作罢 提交于 2021-01-29 05:54:43
问题 I have three tables and I want to merge book ids that have readers and versions into one rows. Readers and Version should be concatenated with ','. Book Id name description ---------------------- 1 Book1 Book 1 Title 2 Book2 Book 2 Title 3 Book3 Book 3 Title 4 Book5 Book 5 Title BookReader BookId Name ---------------------- 1 James 2 Stephane 2 Michael BookVersion BookId version ---------------------------------- 1 v1 1 v2 2 v1 2 v2 2 v3 For now i use this query select b.id as BookId, r.name

Combining two sql columns with delimited data by collating into a single column with delimited data

自作多情 提交于 2021-01-29 05:40:45
问题 I have two sql columns each with delimited data that I want to collate and combine into a single delimited column. The number of items in the column is variable for each row. However there will always be a matching number of items between the two columns of each row. For Example... ******************************* ORIGINAL SQL TABLE ******************************* value * unit ******************************* 4 ; 5 * mg ; kg 50 * mg 7.5 ; 325 * kg ; mg 100 ; 1.5 ; 50 * mg ; g ; mg *************

SSIS Logging in SQL 2012

橙三吉。 提交于 2021-01-29 02:29:49
问题 In the 2008R2 version I was using SSIS logging to a sysssislog table in a defined database. 2012 brings now the concept of Integration Services Catalogs that have their own SSISDB db. Is it still necessary to use the logging to sysssisslog tables or is the information that ends there now somewhere in SSIS DB (what i would expect, since all the reporting for SSIS execution is based on this db as well). 回答1: The logging you are familiar with remains available to you with the 2012 release of SQL

Unable to complete login process due to delay in opening server connection in azure Db using ssis

ε祈祈猫儿з 提交于 2021-01-28 23:00:36
问题 I am using azure db and my ssis package is failing with the below error and also the both the source and destination Database are working fine. we are using sql2012 and our destination is Azure. Microsoft (R) SQL Server Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 9:31:13 AM Error: 2014-12-03 09:31:39.32 Code: 0xC0202009 Source: PKG_ Connection manager "Azure_Destination" Description: SSIS Error Code DTS_E_OLEDBERROR

pymssql executemany insert value very slow

我怕爱的太早我们不能终老 提交于 2021-01-28 18:16:14
问题 python-2.7.15, pymssql-2.1.4, SQL_Server-2018, Windows 10 Pro, MS-Office-2016 import time import csv import pymssql db_settings = { "host" : "127.0.0.1", "port" : "1433", "user" : "sa", "password" : "********", "database" : "testdb", "charset" : "utf8" } conn = pymssql.connect(**db_settings) cursor = conn.cursor() ff = csv.reader(open('base.csv', 'r')) sql = """ BEGIN INSERT INTO Base([name], [year], [update], [status], [timeline], [language], [pic]) VALUES (%s, %s, %s, %s, %s, %s, %s) END ""

SQL Server Agent Schedule - hourly on the half

依然范特西╮ 提交于 2021-01-28 10:23:12
问题 I've created an SSIS package to connect to an external provider and download some data over FTP. They tell me their process creates the data once an hour, on the hour, however I would like to execute my package every hour on the half because I want to ensure their process is finished before I connect. As you can see, I've created a daily schedule which runs hourly starting at 00:30. Is this all that is required for what I want it to do or am I missing something? Thanks 回答1: Is this all that

SQL Server Agent Schedule - hourly on the half

北慕城南 提交于 2021-01-28 10:21:58
问题 I've created an SSIS package to connect to an external provider and download some data over FTP. They tell me their process creates the data once an hour, on the hour, however I would like to execute my package every hour on the half because I want to ensure their process is finished before I connect. As you can see, I've created a daily schedule which runs hourly starting at 00:30. Is this all that is required for what I want it to do or am I missing something? Thanks 回答1: Is this all that

SQL Server Agent Schedule - hourly on the half

会有一股神秘感。 提交于 2021-01-28 10:20:51
问题 I've created an SSIS package to connect to an external provider and download some data over FTP. They tell me their process creates the data once an hour, on the hour, however I would like to execute my package every hour on the half because I want to ensure their process is finished before I connect. As you can see, I've created a daily schedule which runs hourly starting at 00:30. Is this all that is required for what I want it to do or am I missing something? Thanks 回答1: Is this all that

SQL Server Agent Schedule - hourly on the half

霸气de小男生 提交于 2021-01-28 10:20:35
问题 I've created an SSIS package to connect to an external provider and download some data over FTP. They tell me their process creates the data once an hour, on the hour, however I would like to execute my package every hour on the half because I want to ensure their process is finished before I connect. As you can see, I've created a daily schedule which runs hourly starting at 00:30. Is this all that is required for what I want it to do or am I missing something? Thanks 回答1: Is this all that

sql server restrict query

会有一股神秘感。 提交于 2021-01-28 06:58:22
问题 I Use SQL Server 2012 and want to restrict my user to execute update query and delete query with condition. If user want to update or delete all rows of table, use Where 1=1 condition. I want trust from my users and reduce wrong query. thanks in advance 来源: https://stackoverflow.com/questions/21873538/sql-server-restrict-query