Viewing 15 posts - 8,266 through 8,280 (of 8,731 total)
EDIT: Nevermind, I hadn't examined your code.
October 30, 2012 at 8:42 am
Lynn Pettis (10/29/2012)
Jeff Moden (10/29/2012)
rajeshpalo2003 78748 (10/29/2012)
Please go to the following link:-http://sqlcheatsheet.wordpress.com/2012/10/26/sql-server-2008-2008-r2-cheatsheet/
Download the PDF (sqlserver2008r2_cheatsheet_v1-01.pdf). Password: Harinam
This is very good document for the freshup your memories with SQL Server features.
For...
October 29, 2012 at 9:41 pm
For what I understood, there's one condition missing in the previous solutions.
Here's my guess (since I have nothing to test on)
Declare
@OrdNbr CoNumType
Select ISNULL( order_nbr, 'xxxxxx') order_nbr, field1, field2, field3
from table
where...
October 29, 2012 at 4:17 pm
Have you tried replacing the While loop with a GO N?
SELECT *
FROM MyTable
waitfor delay '00:00:02'
GO 5
October 29, 2012 at 3:27 pm
AFAIK, there's no way to convert a timestamp to datetime because there are no datetime values in the timestamp.
To avoid confusions, Microsoft has implemented the synonym rowversion.
Reference:
http://msdn.microsoft.com/en-us/library/ms182776(v=sql.90).aspx
October 29, 2012 at 2:44 pm
It worked using just lower case.
The document does not have a great format. It's hard to read.
October 29, 2012 at 2:39 pm
Easiest way
DECLARE @Top int --The number of records to return
DECLARE @SelectType varchar(6) --Either Top, Bottom or ALL
SET @Top = 5
SET @SelectType = 'ALL'
--SET @SelectType = 'Bottom'
IF...
October 29, 2012 at 12:34 pm
You have some problems in your query, I'll explain in the code
SELECT em.EmpNo as 'EmpNo',
--You should not compare NULLs with = or <> because it will always return unknown...
October 29, 2012 at 9:30 am
AFAIK, and someone can correct me if I'm wrong, SQL Server has some problems optimizing plans for CTEs and table variables. Using a temp table might improve the performance, but...
October 29, 2012 at 9:18 am
I have 2 suggestions for you (none of them include an index because I'm no expert on them).
1. Include the actual execution plan files (.sqlplan) that contain more information than...
October 29, 2012 at 8:18 am
In SQL Server 2008 they introduced the date type if you don't need the time.
Consider using it.
For earlier versions, you can always eliminate the time before storing it in the...
October 27, 2012 at 7:25 pm
You can find that information in these links
For the schemas:
http://msdn.microsoft.com/en-us/library/ms182642.aspx
http://msdn.microsoft.com/en-us/library/ms176011.aspx
For the stored procedure:
http://msdn.microsoft.com/en-us/library/ms187926.aspx
I'll give you a tip: use google or even better press F1
October 26, 2012 at 5:33 pm
That's because when you use a wildcard in the beginning of a string, you won't be able to use indexes.
I'm not sure if you can increase performance using PATINDEX or...
October 26, 2012 at 3:28 pm
Sean Lange (10/26/2012)
October 26, 2012 at 2:02 pm
I've had that problem before with a really bad database design.
I recommend you to change the type of that column to avoid more problems.
Now, the solution would be to cast...
October 26, 2012 at 1:55 pm
Viewing 15 posts - 8,266 through 8,280 (of 8,731 total)