What is the most straightforward approach to producing a data set that can be used in a SQL Server Reporting Services report to display the following:
SalesPerson # Sales # Gross Profit
John Doe 100 $140,000 $25,000
Everyone Else (Avg.) 1200 $2,000,000 $250,000
Jane Smith ...
We created so many inefficient stored procedure in our application, we always postpone to make it more efficient until we have serious problem with database performance.
Now, I am thinking to fix it one by one order by most often executed stored procedure.
What is the best way to figure out which stored procedure is the most executed?
...
If a statement return rows doing a simple select over the data base, is there performance difference between implement it using Function and Procedures?
I know it is preferable to do it using function, but it is really faster?
...
How can I release a winform application to a user that takes advantage of a local sql database. I would assume that I need to install the database during some kind of setup phase, but is this kind of thing possible? Is there a free version of tsql that can be used in this way? Mysql?
...
In SQL 2005/2008 is there any way to set default lock_timeout values.
Anything at the server, database, or connection string level would be great.
...
I am trying to print a selected value, is this possible?
Example:
PRINT
SELECT SUM(Amount) FROM Expense
...
how do i get current system time stamp in SQL Server.
...
Hi There,
Is there any free DotNetNuke manual? and also C# version of the program?
Thank in advance
...
Hi
I'm looking for a complete sample or tutorial (requirements, conditions, how to work...)to start working with SSIS.
Indeed, I've installed SQL server 2008 developer edition recently.
Thanks for any help
...
I have a simple table
CREATE TABLE a(
id int IDENTITY(1,1) NOT NULL,
x varchar(50)
)
I found that following query works
select cast (id as varchar(3))+cast (x as varchar(3)) c from a
where cast (id as varchar(3))+cast (x as varchar(3))='1a'
but this does not work
select cast (id as varchar(3))+cast (x as varchar(3)) c...
Hello everyone,
I am using SQL Server 2008 Enterprise on Windows Server 2008 x64. I want to run daily job at mid-night every day to make full backup of database. Any reference document to follow for a newbie of this topic?
thanks in advance,
George
...
I am creating a self-related table:
Table Item columns:
ItemId int - PK;
Amount money - not null;
Price money - a computed column using a UDF that retrieves value according to the items ancestors' Amount.
ParentItemId int - nullable, reference to another ItemId in this table.
I need to avoid a loop, meaning, a sibling cannot become a...
Dear guys
I get a base 64 string from a XML file which I want to insert into my SQL Server database. Which field type have the field in my database to be? varbinary(MAX)? Do I have to convert the base 64 string to another format before inserting into my database?
Best regards
...
Possible Duplicate:
TSQL query to concatenate and remove common prefix
Hi
How does one compile a single string from the results of an SQL query.
E.g.
Table A
Column: Name
Row 0 : John
Row 1 : Sam
Row 2 : Kate
Resulting SQL query must return a single row with the result as a single string.
E.g.
"John, Sam, Kate"
Note: U...
In our application, there's a database update that is committed only after a consequent update is being executed (both using the same transaction, of course). However, we've discovered a rare flow in which the user exits the application before the second update, causing the first to be discarded. I'm looking for a way to recognize this u...
When I try this:
SELECT *
-- INTO DB2.dbo.CustomerOrderLines
FROM DB1.dbo.CustomerOrderLines
INNER JOIN DB1.dbo.CustomerOrders ON DB1.dbo.CustomerOrders.Order_Display_Ref = DB1.dbo.CustomerOrderLines.Order_Display_Ref
WHERE DB1.dbo.CustomerOrders.Delivered_Date BETWEEN '2009-09-23' and '2009-09-24'
it show the rows correctly.
When ...
ok, my Sql Server Management Studio Object Explorer had dissapeared. I know the shortcut F8, and the view->object explorer method.. neither do anything, ive clicked everything on the keyboard, googled around, but nothing..
really need this back, its a massive hassle having to navigate through the summary window without the object explor...
I need to convert Database rows into columns and show the result in Gridview. My DB is as follows:
ID Hotel cDate Price
-----------------------------------------------
1 Hotel1 12/22/2009 12:00:00 AM 15.0000
2 Hotel2 12/22/2009 12:00:00 AM 25.0000
3 Hotel3 12/22/2009 12:00:00 AM 60.0000
4 Hotel4 12/22...
We run SQL Server 2005 exclusively for databases that we use (I'm trying to push to get them upgraded, but alas!). On the client side with Management Studio, are there any benefits to upgrading to SSMS2008 when only connecting to SQL Server 2005 databases? I've seen that Intellisense won't work, so I'm curious if it's worth the hassle.
...
maximum number of filegroups in a database?
...