To change date format in sql
hi guys, I have date in mm/dd/yyyy format in database.I want to display in form as dd/mm/yyyy. Can anybody help?I want to get time along with date. ...
hi guys, I have date in mm/dd/yyyy format in database.I want to display in form as dd/mm/yyyy. Can anybody help?I want to get time along with date. ...
So here is a bit of a strange one... I have a stored proc that takes 40 seconds to run. I copy the contents of the stored proc to a new query window, change the 2 input parameters (which are both dates) so they are declared and set, and run the query. It is basically instant, sub 1 second execution. The only difference is the stored proc...
Hi Microsoft provided some header files for c++ to work with DMO. Likewise to work with SQLSMO in c++ is such type of any header files are provided??? using managed c++ code is the only way to work with SMO in c++?? Plz Help me.... ...
Hello everyone. I have one user in my database, and I want to grant to him permission to read only one view, nothing more, no tables, nothing. How can I do this? Thanks a lot. P.S.: I am using MS SQL Server 2005 ...
Hi. I am using SQL 2005. Table one, LinkedDocumentFolderTable, contains the names and information about the folders that hold linked documents. Table two, LinkedDocumentTable, contains the information about the linked documents themselves. The two tables are linked by the LinkedDocumentFolderID. I need the LinkedDocumentFolderID, De...
We’re a team of SQL Servers database developers. Our clients are a mixed bag of C#/ASP.NET, C# and Java web services, Java/Unix services and some Excel. Our client developers only use stored procedures that we provide and we expect that (where sensible, of course) they treat them like web service methods. Some our client developers don...
I have a table/dataset like: 1/1/2009 | Training 1 | Mike 1/1/2009 | Training 1 | Bill 1/1/2009 | Training 1 | Steve I would like to display as 1/1/2009 | Training 1 Mike, Bill, Steve The idea is that the resulting printed page space is not wasted by printing one column on most of the page down but shortening the space to either a...
How do you store a file that was uploaded by an ASP.net webform into a sql server 2005 varbinary(max) field? Here is what I have so far: protected void btnUpload_Click(object sender, EventArgs e) { for (int i = 0; i < Request.Files.Count; i++) { StoreFile(Request.Files[i]); } } private void StoreFile(HttpPostedFile...
Hi guys, following is my stored procedure. It contains a subquery Select StartTime From DrTimings Where DrID = @DrID If this subquery returns more than one value, I get an error. Subquery returns multiple rows. I want to get each @StartTime and @EndTime in cursor. Means I want to "fetch next from Doctor into @StTime and @EndTime" C...
I have triggers that manipulate and insert a lot of data into a Change tracking table for audit purposes on every insert, update and delete. This trigger does its job very well, in other words, we are able to log the desired oldvalues/newvalues as per the business requirements for every transaction. However in some cases where the sou...
Hi All, How can I drop all the default constraints belonging to a particular table in SQL 2005? ...
i used the import/export wizard in sql server 2005 management studio to export rows from an excel sheet to an sql table and checked the Do not delete rows in destination table option. I saved the export operation as a ssis package, and yes new rows are being appended to existing ones, but now i have a requirement to delete all rows in th...
Several days ago i setup some replication for our SQL Server 2005 database, the type of replication was a transactional with updateable subscription. The replication are working fine, lately i test the upgradeable subscription feature by modifying 1 data on subscriber server but then the error was raise and data are not committed. The ...
The question is quite simple, as the title. Added a column to table I want a unique constraint , the column will insert guids, but to allow for existing data before column was added I need to allow for nulls in the check ...
I have a table with single Row when i use SP_SpaceUsed N'<TableName>' it gives me data as 16 KB and when I use dataLength something like this:- select ClientID , (0 + isnull(datalength(ClientID), 1) + isnull(datalength(LeadID), 1) + isnull(datalength(Company_Name), 1) + isnull(datalength(Website), 1) + isnull(datalength(EmployeeC...
Is it a good idea to store files in a different SQL Server 2005 database "FileDb" and point to it (files) in the "AppDb" by "FileId". Please take in consideration that I have a dedicated server and I can create as many Sql Databases as I want. update: Which perform better single database or multiple databsae? ...
I have a development database that has fees in it. It has a feeid, which is a unique key that is the identifier. The problem I run into is that the feeid/fee amount may not match when putting updating the table on a production server. This obviously could lead to some bad things happening, like overcharging for something or undercharg...
When I accidentally click on the Database Diagrams tab, I get one of the following errors: Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the data...
I am going to need to create a small windows application that stores basic data about people. The requirements are: Recruiters go out into the field and gather demographic data about people they talk to. Recruiters return 'home' and contribute their gathered data into the main database (SQL Server 2005). This is the first time I hav...
I need to create a SQL statement that uses the LIKE keyword to filter the result set. Sometimes this value is NULL. What is the best way to implement in T-SQL? I am using SQL server 2005 ...