What is the easiest way to automatically fill a datetime column in an SQL data table with the date the row was created? Using SQL Server 2005 if that matters.
How would I do this in a stored procedure (SQL 2005):
count = select count(*) from table1 where line like '%success%'
if count > 0:
delete from table1 where not line like '%success%'
Thanks for any help. My google skills are really failing me today :-(
I came across some vb macros that export it to a mdb ( ms access ) file. But does not work very well when copying forward constraints , etc.
I want generate schema from the database diagram for sql server 2005 database.
Using SQL Server 2005
I have the server connection name as (server1) in windows authentication mode, I want to change windows authentication mode to sql server authentication mode...
when i try to change sql server authentication mode with username = sa & password = sa, it showing error...
How to change the authentication mode or how to create a new sql connection?
I need to add a device driver to a Windows CE image, I have the driver in .dll and .reg files and in a .cab package.
I'm using Visual Studio 2005 with Platform Builder for Windows CE 6.0.
How can I do that?
I'm working in Sql Server 2005. I have an event log table that tracks user actions, and I want to make sure that inserts into the table are as fast as possible. Currently the table doesn't have any indexes. Does adding a single non-clustered index slow down inserts at all? Or is it only clustered indexes that slow down inserts? Or should I just add a clustered index and not worry about it?
I have SQL Server 2005 stored procedure. Someone one is calling my stored procedure within a transaction. In my stored proc I'm logging some information (insert into a table). When the higher level transaction rolls back it removes my insert.
Is there anyway I can commit my insert and prevent the higher level rollback from removing my insert?
Thanks
The application layer (ColdFusion) needs to insert multiple rows onto SQL Server 2005.
I was thinking of using loop in app layer to construct multiple input statements and send to SQL Server over JDBC in a single connection.
My colleague however suggests to construct an XML and bulk insert the XML instead.
Which one is the better method?
How can i update bulk data in sql server 2005 by sending the data in XML form ?
i am able to insert bulk data into the table, but i am not getting idea to update the data.
I want to use infinite WHILE loop in SQL 2005 and use BREAK keyword to exit from it on certain condition.
while true does not work, so I have to use while 1=1.
Is there a better way to organize infinite loop ?
I know that I can use goto, but while 1=1 begin .. end looks better structurally.
Hi, I have an asp.net web app and I need to launch a pdf report that is developed in SSRS using SQL 2005. The SSRS report query has been created. How can I go about launching the report?
We build a system that handling the billing analyse and what it does it just have a raw bill from vendor and process to "common" table and this is using SQL Server 2005 Integration Services.
At the moment, the batch has 300,000 rows and it took about 6 minutes to process. Now, the current spec are:
2 CPUs Intel Xeon E5345 @ 2.33 GHz
RAM 4GB
Is there anyway I can speed up this process?
Exact duplicate of: http://stackoverflow.com/questions/2845454/wcf-3-0-service-contract-method-will-return-992-rows-but-not-993-rows-50-column
My VS.Net 2005 CF 3.0 WCF will has a limit on how much data it will return
I'm using Crystal Report with VB.NET in Visual Studio 2005.
I have report that works if I pass in a list of List(Of Stuff). I had been sorting the report by one of the members of Stuff but a need now to sort first by one member, like Stuff.StatusCode and then by another member, like Stuff.ItemNumber.
Can I do this just be having more than one SortField member, or do I need to do it some other way?
Thanks as always!
Hi.
I'd like to indicate to SQL Server 2005, in my BEGIN CATCH...END CATCH block that the error is "handled"... That is, clear the error.
Is that possible??
Thanks.
A.
I am getting the error from the application as following with SQL server 2005
"Transaction count after EXECUTE
indicates that a COMMIT or ROLLBACK
TRANSACTION statement is missing.
Previous count = 1, current count =
0"
How can i find the stage where this error raised?
how can i found the missing transaction or the stored procedure where it is not committ or rollback?
I'm using 2005 and the Native XML WebServices. The integrated authentication via HTTP:80 works fine. But i need the basic authentication which requires SSL. So if i change the web service to ssl i always get a connection reset (101). I tried several ports 80,443,9999 with the same outcome.
What is the error?
Hi,
I'm using Sql Server 2005 and i'm trying to achieve something like:
In the same select statement i want to get the first x rows and the last x rows.
SELECT TOP(5) BOTTOM(5)
Of course 'bottom' does not exist so i need other solution.
I believe there is an easy and elegant solution that i'm not getting.
Doing the select again with Group By Desc is not an option.
Thanks.
i am using sql server 2005, please tell me how can i get 6 digits (unique numeric which should be random) value for every row in table.
i have a field in table in which i needs 6 digit numeric value (random and unique).
please help me to do this.
I installed SQL Server 2005 sometime ago and forgot the administrator password I set during setup. How can I connect to SQL server now?
EDIT: I think I only allowed Sql Server Authentication. Login with integrated security also does not work.
Whenever a single page report is exported to excel, sheet in excel is named by the report name.
If a report has multiple pages, the sheets are named as sheet1, sheet2,....
Is there any way to specify sheet names in SSRS 2005 ?
solution:
Found this after some googleing:
Changing the Sheet names in SQL Server RS Excel: QnD XSLT
Will try out and post an update if it works.
I have Table with two smalldatetime columns, where one is startTime and other one is endTime.
I need to select all values from table which between times of both columns compared to getdate()' time.
I'm using SQL-Server 2005.
example
startDate endDate value1
2/2/01 16:00 2/2/01 18:00 1
2/2/01 21:00 2/2/01 22:00 2
2/2/01 05:00 2/2/01 22:00 3
getdate() gives 2/2/2000 21:40
so i need to get value1 2 and 3
thanks in advance
in Sql Server 2005, I have a master table, and several other tables which are related to
this master through several one to many relations.
How can I find all tables and fields which are in relation with the
primary key in the master table, on "many" side?
I know I can extract this by querying views from INFORMATION_SCHEMA,
but I don't know where exactly I can find this info.
Thank you