If I am inserting a few million records into a table, should I disable the indexes before then rebuild after?
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
Hello, 2008R2
I have a VARCHAR column with a date as DD/MM/YYYY. I want to convert to DATE datatype. I trieddeclare @D date = '21/1/2015';
select CONVERT(date, @D, 103); but get the error:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character...
Hello, For a SQL2008R2 instance running on a Windows 2008R2 OS.
Is a way to find what is causing this?
Is it a problem with the port 5201 not being setup?
I do not known when this started but might be when the virtual was moved.
I blanked the IP address before posting this question.
Date...
In this time of emails, the art of memo writing has suffered.
I received an email with a .pdf attachment, which turned out to be a memo about the companies health care switch. The memo does not have any errors, however, the style seem to be taken from emails rather than business memo writing...
Well since it was over 100 here is a new thread.
On a minivan:
MAD FMLY
Past threads:
Vanity plates
Vanity Plates II
Vanity Plates III
Vanity Plates IV
Vanity Plates V
Vanity Plates VI
Vanity Plates VII
Vanity Plates VIII
Vanity Plates IX
Vanity Plates X
Vanity Plates XI
Vanity Plates XII...
Hello, SQL Server 2008R2
To continue the log shipping questions...
I would like to change the retention of log files. When we had little space we set it to 24 hr. Now we have room I would like to change the value.
Do I need to recreate the log shipping which I do using the wizard or is...
Hello, SQL2008R2
I may have asked this before but here we go:
If I have a LEFT join that needs to INNER join to a table the number of records returned change.
SELECT A.*
FROM A
INNER JOIN B ON A.V1 = B.V1
LEFT JOIN C ON A.V2 = C.V2
-- gives 3 records
INNER JOIN D ON C.V3 = D.V3
-- by adding...
Hello, SQL2008R2
I could not think of a good way to search for this on the web.
I have a date in the format of ddmmyyyy imported from a CSV file.
Our default is mdy. I would prefer not to change the format (SET DATEFORMAT) but if that is the best way to handle things, okay.
I want to be...
Hello, SQL2008R2
If I create a view with the following code:SELECT
C.Client,
AM.RefNum,
AM.GroupVal,
AM.MiscVal,
COUNT(AM.RefNum) OVER (PARTITION BY AM.GroupVal, C.Client) AS ClientRelated,
cte.CNT - COUNT(AM.RefNum) OVER (PARTITION BY AM.GroupVal, C.Client) AS...
Hello, SQL2008R2
I get to take a week off, however that means they need a person permission to push table/stored procedure updates. I know I can grant the person SysAdmin rights and have done so in the past.
Is there a way to grant "modify and create" privilege for tables and stored procedures...
Hello, SQL2008R2
When I am using SSMS and in Object Explorer Details, I drill down to stored procedures, it is now taking a few seconds to start populating the window. In fact there is a progress bar that appears. This has always been very quick.
Where should I start looking for as the cause...
Coming to work I thought of the sentance "I saw a deer four times on the way to work". I assume this implies I saw the same deer four time not four deer. So I guess the sentance should be "On my way to work there were four times I saw deer"?
djj
The Lord is my shepherd (Psalm 23) - I need...
Hello, VB.NET 2010
I am self taught at VB.NET and have not worked with it for a couple of years. I have code that works fine but I would like to know if there is a better way.
Dim sfFiles As New IO.DirectoryInfo("mypath")
Dim sfFileList As IO.FileInfo() = sfFiles.GetFiles(".txt")
Dim sfFileInfo...
The teacher asked the class my six year old great-nephew is in, to write down what they wanted to be when they grow up. My great-nephew wrote CHEF. Not that he wants to be a chef, but he did not know how to spell astronaut.
A boy after my own heart. I am constantly rephrasing posts as I do...
Hello, SQL2008R2
I noticed that when I do sp_who2 that the column "ProgramName" for my SSMS session is ".Net SqlClient Data Provider". I was doing an update at the time.
Why does it not say "Microsoft SQL Server Management Studio"?
Thank you,
djj
The Lord is my shepherd (Psalm 23) - I need...
Hello, SQL Server 2008R2
I have an insert trigger on a table. It seems to work for .NET applications but I did an insert with the SSIS Import/Export wizard and it did not seem to fire.
CREATE TRIGGER trig_MyTable_Insert ON MyTable FOR INSERT AS
SET NOCOUNT ON;
BEGIN
INSERT INTO...
In college I saw a sign "Inflammable".
After words like inactive (not active), inappropriate (not appropriate) and inadvisable (not advisable), I thought the inflammable would mean NOT flammable. Boy I hate the English (American) language.
djj
The Lord is my shepherd (Psalm 23) - I need...
Hello, SQL2008R2
I am trying to find stored procedures that have 'EXEC' or 'EXECUTE'. Now I would like to exclude the procedures where the only place EXEC exists is commented out. I am using the column [definition] from table sys.sql_modules to look at the code.
I thought about something like...
Hello, SQL2008R2
Question one if you execute a TRUNCATE TABLE can this be rolled back?
In a Try/Catch if I include Raiseerror then do a Rollback with the error still work?
TRY CATCH
BEGIN TRANSACTION My1;
TRUNCATE TABLE MyTable;
.
. My code here
.
COMMIT...
Hello, SQL2008R2
If you have a left join that in turn is joined by an inner join why do I not get all recordsSELECT A.ValA1, B.Val1
FROM MyTableA A
LEFT JOIN MyTableB B ON A.AID = B.AID
INNER JOIN MyTableC C ON B.BID = C.BID; will only give where B matches A while using a left join to C gives...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.