Long story short, I'm taking a bunch of excel documents one by one, and importing them using the Import/Export wizard into a database in SQL Server 2005.
Here's one report (all processes not shown are a "Success"). Is there any way for me to ignore truncation errors? I've googled around to no avail, or at least not in my version.
- E...
I have a SQL job that simply executes a stored procedure. Each morning when the job attempts to run, I get the following error:
The current transaction cannot be committed and cannot support operations that write to the log file.
When I keep trying to restart the job, it keeps giving me that same error. However, if I just execute the...
Is it possible to create a composite key in sql 2000 of the form:
event_id id2
adf 1
adf 2
adf 3
cfg 1
cfg 2
edf 1
where the id2 restarts the count at each change of event_id. I need the numbering to be exactly like that either by creating a table or other SEL...
I am having trouble printing my diagrams, I seem to be getting portions of the diagram blocked out, etc. I've tried several different computers, printers, and databases, so it seems to be a problem with SSMS Express itself.
Is this just the way it is?
Are there any decent workarounds, or does anyone use a 3rd party product (preferably...
As i described,
I want program give me more helpful diagram for example :
MS SQL Server Diagram didn't give you a good design for relations so if you have many relations in the same table then the diagram just draw many lines to your table and didn't set the lines to specific column that would confuse you if you have many tables and co...
I have a project I am trying to move to run on IIS7 instead of the Visual Studio Development Server. Everything works on VS Development Server but when moving to IIS7 its seems to not be able to read anything from the database, but doesn't give a database error, instead it gives a NullReferenceException on the information I'm trying to ...
I have a string '2009-06-24 09:52:43.000', which I need to insert to a DateTime column of a table.
But I don't care about the time, just want to insert it as 2009-06-24 00:00:00.000
How can I do that in T-SQL?
...
I want to add a variable number of records in a table (days)
And I've seen a neat solution for this:
SET @nRecords=DATEDIFF(d,'2009-01-01',getdate())
SET ROWCOUNT @nRecords
INSERT int(identity,0,1) INTO #temp FROM sysobjects a,sysobjects b
SET ROWCOUNT 0
But sadly that doesn't work in a UDF (because the #temp and the SET ROWCOUNT). A...
I have been trying to execute sql scripts from dotnet (C#) but the sql scripts could contain GO statements and I would like to be able to wrap the collection of scripts in a transaction.
I found this question and the accepted answer got me going for handling the GO statements, but if I use a BeginTransaction it throws a InvalidOperation...
I'm new to Unicode in Microsoft SQL Server 2005 / 2008. I converted my DB to use NVarChar() instead of VarChar(). I found to my surprise that the sorting is different than with VarChar(). I found this other reference here on StackOverflow, for SQL Sorting and hyphens that explained Unicode sorting is done on a "word" basis. After mor...
Folks,
Visual Studio installed SQL Server Express on my computer, which to date has satisfied my needs. I now need to do remote database support so need the full version of management studio. I tried to install the standard version but it is blocked, apparently because Express has newer versions of the files. Can I do this? Will they pl...
I need to add a new column to a MS SQL 2005 database with an initial value. However, I do NOT want to automatically create a default constraint on this column. At the point in time that I add the column the default/initial value is correct, but this can change over time. So, future access to the table MUST specify a value instead of a...
Hi folks,
I have some sql statements that calculates some numbers. It's possible (with bonus points/penalty points) that a person could get a final score OVER 100 (with bonus points) or
UNDER 0 (with penalties).
How can i make sure that the value calculated, if it exceeds 100 it get's maxed at 100. Alternatively, if the score ends up ...
Hi
How to get enumfiles method in DMO in SMO
means if i pass the master datafil;es to a method then it wil return the corresponding datafile path and logfile path. is there is any such method in SMO ??
for ex:in DMo Enumfiles(master) then it wil return corr filepath . is such method in SMO
Plz Help me..
...
In explicit transaction, if i start the transaction by giving BEGIN TRANS but if i dont give COMMIT,ROLLBACK or END TRANS then what will happen to the application?
...
I am making an EventLog which will log the transaction log in my website. The details of the log will include the Public IP from where the transaction has orginated and also the local IP address (under the public IP).
I have found ways to obtain the Public IP Address, but i am unable to find out the local IP or machine IP from where the...
I've seen in the post called something like "a small change you've done that has increased the performance of your application" a comment about changing from:
SELECT U.userid,groups_in=(
SELECT COUNT(*)
FROM usersgroup
WHERE userid=U.userid)
FROM tbl_users U
to:
SELECT U.userid, groups_in
FROM users U
LEFT JOIN (
...
Hello everyone,
I am writing a SQL Agent Job to remove rows from Table 1 and Table 2 once a day. The step of the SQL Agent job is -- delete some specific records from Table1, then delete some specific records from Table 2.
My question is,
How to record the error during SQL Agent? Any logs/events we could use? (so that we could see in...
Hello world!
Is there any "convert" function in MS SQL server that allows to cast types safely(without throwing exception). I need something like "tryParse" in C# lang but as SQL statement.
More detailed, I need the following statement returns zero or any else but throwing exception.
select convert(float, 'fjsdhf')
thanks in advance...
What are the possible situations which make deadlock happen on SQL server?
How to solve with that situation?
...