Viewing 15 posts - 3,016 through 3,030 (of 13,874 total)
Use INSERT rather than SELECT ... INTO
January 23, 2020 at 4:07 pm
Thank you John. I am wondering why should I specify my version of SQL Server or it should be the Database Name?
Why are you using OPENROWSET in this case?
January 23, 2020 at 3:42 pm
You need to make sure that your SQL returns a row (and exactly one row), even if there is no underlying data. You could do this with a UNION ALL...
January 23, 2020 at 1:51 pm
Phil, here you go: https://blog.sqlauthority.com/2017/03/24/sql-server-jump-identity-column-restart/
Thank you very much. I knew about the Identity jump 'feature', but hadn't read deeply enough into the topic to know about the associated caching.
To the OP:...
January 22, 2020 at 8:28 pm
Please point me to a link which talks about this "pool of new Ids for Identity columns", because I am unfamiliar with it.
January 22, 2020 at 6:49 pm
Unfortunately, when I scripted out the inserts, the select worked on the result, ie. just rendering the result into a grid was sufficient to "fix" the underlying error.
Understood, but...
January 22, 2020 at 4:49 pm
Are you able to post some sample SQL which would allow us to recreate the issue?
January 22, 2020 at 4:19 pm
Have a read here.
You should be able to change your existing Script Task logging commands along those lines.
I suggest that you try converting your existing 'success' messages to use...
January 22, 2020 at 11:45 am
Or if you upgrade to SQL 2016, there is a built-in string splitting function that could handle it without needing to create the DelimitedSplit8k function.
You're referring to STRING_SPLIT(),...
January 20, 2020 at 8:25 pm
You need to split your string on the backslash and choose the 10th item. Here's an example using the infamous DelimitedSplit8k (notice how I changed your tabledef to VARCHAR(8000) to...
January 20, 2020 at 7:02 pm
For scheduled processing of cubes, you might find it simpler to write XMLA scripts & then simply call them from SQL Agent job steps (link).
January 20, 2020 at 5:00 pm
Fine for small files, but -
Reading the entire file into memory as a single string will not scale.
... Script Component as Source. You can read the file once, line...
January 17, 2020 at 2:59 pm
If you were running this package as a SQL Server Agent scheduled task, what account does the script task actually run under? I have a similar job set up...
January 17, 2020 at 2:56 pm
Can you confirm that all of the files are in .XLS format?
Probably unrelated, but I saw this error when I tried to open a .XLSB file using a (ACE) .XLSX...
January 17, 2020 at 11:56 am
Returning a decimal is easy:
SELECT CAST(COUNT(*) AS DECIMAL(19,6)) / COUNT(DISTINCT p.postid)
January 14, 2020 at 8:14 pm
Viewing 15 posts - 3,016 through 3,030 (of 13,874 total)