Viewing 15 posts - 3,286 through 3,300 (of 8,731 total)
Using OPENROWSET is a bad idea when combined with an update (if at all possible). You should import the values from the text file into a table. To do that,...
February 24, 2016 at 8:15 am
Does this article work for you?
http://www.sqlservercentral.com/articles/set-based+loop/127670/
I could give you an answer, but I already wrote the whole explanation in there. 😀
February 24, 2016 at 7:46 am
donstarter (2/24/2016)
I am having an issue with using distinct on one single column in a table and getting multiple result rows for a string "looking" the same. When I...
February 24, 2016 at 7:39 am
Check the following articles to learn how to use cross tabs, which will get you exactly what you need.
http://www.sqlservercentral.com/articles/T-SQL/63681/
This is SQL Server based code and it's not guaranteed to work...
February 24, 2016 at 7:27 am
February 24, 2016 at 7:20 am
Terry.Traweek (2/24/2016)
"Active" <> "ACTIVE""Inactive" <> "Inactive"
Null is OK
1 row will be inserted
Us defaults, so collation is case insensitive.
February 24, 2016 at 6:28 am
Sergiy,
Could you share the details of the version you're using? On my laptop with 2012 SP1, I get 3 rows when running the entire script at once.
Unless you used...
February 23, 2016 at 9:25 pm
You didn't format the first row. Format will convert the values into strings.
I don't remember if it's possible to assign a format to the parameter available values, to use a...
February 23, 2016 at 1:53 pm
sharonsql2013 (2/23/2016)
Something like this SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) .But how to get for Dec and Nov?
Use a numbers table or build one on the fly or adjust as necessary.
SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-n,0))...
February 23, 2016 at 1:12 pm
Try to understand how this routines work and you'll get the correct formula for your problem.
http://www.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/
I'll explain the first one and you can get the rest.
select dateadd(dd, datediff(dd, 0, @ThisDate),...
February 23, 2016 at 1:09 pm
Alan.B (2/23/2016)
February 23, 2016 at 12:30 pm
As long as you use the certification as a way to learn, it could help you. However, most people won't hire you just by having a certification, you need to...
February 23, 2016 at 10:48 am
jbrown414 (2/23/2016)
February 23, 2016 at 10:35 am
Sean Lange (2/23/2016)
Ed Wagner (2/23/2016)
Sean Lange (2/23/2016)
I am shocked at how many people (9% at time of this post) said there would be 4 rows. :w00t:Excellent question Steve.
That is interesting,...
February 23, 2016 at 7:58 am
The error seems to be the CAST() functions. Use TRUNC() as you did on your column list.
For SQL Server, you can't use UNIQUE or TRUNC(), for Oracle your can't use...
February 23, 2016 at 7:34 am
Viewing 15 posts - 3,286 through 3,300 (of 8,731 total)