2,736 Topics
| |
I need help troubleshooting a performance issue. I have a stored procedure that is selecting from 3 joined tables, and is hanging on the first time this procedure is running. Sometimes hanging so long that I get a timeout error. After the first run, it's faster, but still takes longer … | |
Sum of One and not the Other I have a requirement to query one figure and the sum of another. What I need is one query to produce the MonthPayment for each CompanyID for a given ContractID and the Sum of TotalPayment with matching CompanyID and ParentCompanyID for each CompanyID … | |
I know sql provides us with LTRIM and RTRIM but is there anyway to remove the spacing in the middle. '123 Johnson St' should be '123 Johnson St. Anyone know of any functions or tricks? | |
MS SQL 5 vb.net asp.net I working on a new site that requires me to show a page with a single product and it's information. I have a Next and previous button that will take the user to the next item in that category / subcategory. basic Querey to show … | |
Does anyone know if it is possible to modify the maintenance plans through t-sql and if so please provide the code to do so. THANKS! | |
I found this script online for full DB backups but I was wondering how to change this to also set differential backups? [CODE]DECLARE @name VARCHAR(50) -- database name DECLARE @path VARCHAR(256) -- path for backup files DECLARE @fileName VARCHAR(256) -- filename for backup DECLARE @fileDate VARCHAR(20) -- used for file … | |
Hello, I have a table of many rows, and some rows have a connection to other rows. A simplified example of the table I am trying explain is below. ID MYVar LinkedToMYVar 1 10 0 2 20 0 3 30 10 4 40 0 5 50 10 6 60 30 … | |
Hi Friends, i ve a doubt in sql.. want to display all dates between 2 dates.. for example if our input are 9/2/2011 and 12/2/2011 na, the output are 10/2/2011 11/2/2011 .. i need query for this..can u clear my doubts.. | |
I have a table that contains ID, lastname and firstname of a person. How to make my stored procedure handle the where conditions using only stored procedure. SELECT * FROM person where lastname = @lastname SELECT * FROM person where firstname = @firstname SELECT * FROM person where ID = … | |
G'day Folks. This is a general question and not a request for code. I have a client with many DTS packages on their sql server 2000. Has anyone had to migrate these buggers to sql server 2005 or 2008? Was it difficult? - After substantial googling/searching I'm not sure I … | |
MyTable: People who moved from Blah City, Blah State: Name Location Date Kids Jack LA 02/05/1999 0 Cindy Chicago 12/15/2005 2 Randy LA 06/19/2003 3 Jason Seattle 04/06/2002 0 1. Who moved to LA? [CODE] SELECT Name, Location FROM MyTable ORDER BY Location; [/CODE] Expected result: LA Jack, Randy What … | |
Hi Everyone, I have a table that has a 2 column primary key. I set up the key where the 2nd column is an identity column. When I ran my VB application I discovered the ID (2nd column) did not increment the correct way. I was hoping it would increment … | |
USE [DIAMDBF] GO /****** Object: StoredProcedure [dbo].[STOCKREPORT] Script Date: 01/21/2011 11:32:40 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO ALTER PROCEDURE [dbo].[JEWELLSTOCKREPORT] @SELDBNM SYSNAME, @FILENO1 nvarchar(7), @FROMCODE nvarchar(20), @TOCODE nvarchar(20), @START nvarchar(12), @LAST nvarchar(12), @DATE1 nvarchar(12), @DATE2 nvarchar(12), @DATEFORMAT varchar(12), @GROUPCODE char(10), @FROMLOT nvarchar(10), @TOLOT nvarchar(10) AS Declare @execstring … | |
I want to convert a kind of a large MSSQL table to text -- ideally CSV. One crude way would be to use SQL Developer to do a SELECT * and do a copy-and-paste. But there must be a more precise and efficient way of doing this. Perhaps SQL Developer … | |
I have 3 tables; Group, MemberOfGroup and Graduates. GroupID is a primary key for Group and MatricNo is a primary key for Graduates. Both GroupID and MatricNo are composite key for MemberOfGroup. I want to show the group lists according to member size. Below is my sql. [CODE]Select g.GroupName, count(m.MatricNo) … | |
Hi, I have recently finished a windows desktop application for a client that connects to a sql server database. Throughout development while the server instance was on my local machine the application and server communicated fine with the connection string below [CODE] <add name="myString" connectionString="Data Source=myServerName;Initial Catalog="myDbName";Integrated Security=True" providerName="System.Data.SqlClient" /> … | |
Here is a sample of my table: ID Name Codes 1 John D S12, S13, S89 1 John D S98, T12 2 Joe D X27, S28 3 Bob S F12, F13, X43 3 Bob S S44, X38, S90 4 Steve F D25 I want a query that will return the … | |
Hi, I tried installing MS SQL server 2008 on win 7 Ultimate x86. It was slipstreamed installation with SQL SP1. I got 7 errors during installation. All of them are showing almost similar messages (but different event ids)except the 2nd error (which was about failure to open some registry). The … | |
Hi i was installing sql 2000 on win 7 but it gave a message something like "sql have compatibility issues with this version of windows". I want to use sql 2000 with vs2005. Is it possible to run sql server 2000 on win 7? If yes how can i run … | |
I am using COLDFUSION . And using coldfusion i am inserting a table using URLEncode function. For instance, the word 'Registration Fee' will be inserted into a table like 'Registration%20Fee' after encoding using URLEncode function in coldfusion.But I need to write a mssql statement to decode the word and want … | |
hi there, i have a question in C# files. i have a client application which is created in visual studio C#. and from that i copy a file to a folder in the server computer folder. so when i am trying to display it ot the user i user System.Diagnostic.Prcess.Start(PathToTheFileInTheServer) … | |
hello Hope u all be fine Plz help i want to create a single database host in a server that is access by both ASP.net website and access remotely by windows mobile Application. The user want to easily update,create,delete their record through mobile application and update,create,delete their record through Asp.net … | |
How to create xml from MSSQL database.Could any one help me to find out this . It would be much helpful and appreciated if any provide me an example also. | |
hi i designed my database in vs 2008 and then I want to use this file as odbc database. is there any way to configure it and is odbc support mdf files? | |
Hi I want to convert Sql Server Database to Access Database , I have one database and it has different tables and view also. please help me how to do this ? | |
Hi, I need a little help importing an XML file into sqlserver 2008. I followed this example [url]http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx[/url] (make sure you goto the rest of the pages in the article!) , generated the schema etc., but I can't get the import to do what I need. I was able to … | |
SQL 2008 database disappeared after canceling copy Hi All, We have an SQL 2008 database of around 12GB. I was trying to create a copy of the database through the Microsoft SQL Management Server Studio. The server is in production mode, and it was taking too long to copy, and … | |
I want to get the list of items from a database as a Java resultset. When I use the following SQL statement it works perfectly fine [CODE]SELECT First_Name FROM dbo.Names where First_Name LIKE 'A%';[/CODE] However when I pass it as a parameter, it does not work I have tried a … | |
[CODE]select PREMISEADDRESS1 from PREMISE PREM inner join STATUS ST on PREM.LOCATIONID = ST.LOCATIONID inner join SUPPLIES SUP on ST.STOPID = SUP.STOPID where SUP.ITEMID [COLOR="Red"]=[/COLOR] (select count(ITEMID)[COLOR="Red"] > [/COLOR]10) from SUPPLIES) [/CODE] Hello, I do not use SQL all that often but I would like to view all of the premisesaddresses … |
The End.