Viewing 15 posts - 5,491 through 5,505 (of 8,731 total)
There's no need for 2 CTEs.
WITH cteEmpaddress AS (
SELECT Eid,
Addresscode,
...
November 25, 2014 at 11:09 am
Why do you want the result in the 8th row? That should be done in the front end.
To do a sum like that you need CASE.
SELECT SUM(CASE WHEN id IN(2,3,4)...
November 25, 2014 at 8:29 am
Or you can use the truncate option of ROUND()
SELECT ROUND(45.67, 0, 1)
November 25, 2014 at 8:24 am
The problem was that your table names have spaces. That's the reason that you need the square brackets. If you don't change them soon enough it will be a nightmare...
November 25, 2014 at 8:18 am
Jeff Moden (11/24/2014)
chenke (2/17/2010)
November 24, 2014 at 4:55 pm
SQLRNNR (11/24/2014)
November 24, 2014 at 3:59 pm
This is a bit simpler than Jason's example. Check the way I post the sample data, you're supposed to post it this way to get better help.
CREATE TABLE employee (
...
November 24, 2014 at 2:54 pm
This has happened to me when the result set is too large to be displayed. Try returning less rows or use a different client application.
November 24, 2014 at 2:02 pm
g.britton (11/21/2014)
ZZartin (11/21/2014)
g.britton (11/21/2014)
ZZartin (11/21/2014)
Sean Lange (11/21/2014)
ZZartin (11/21/2014)
Just out of curiousity but how do you use a cursor without using a while loop?
Under the hood a cursor is a just...
November 21, 2014 at 2:48 pm
Damian-167372 (11/21/2014)
and i also wanted to know how this code can be...
November 21, 2014 at 2:37 pm
Sean Lange (11/21/2014)
ZZartin (11/21/2014)
Sean Lange (11/21/2014)
ZZartin (11/21/2014)
Just out of curiousity but how do you use a cursor without using a while loop?
Under the hood a cursor is a just a...
November 21, 2014 at 1:36 pm
Damian-167372 (11/21/2014)
Luis Cazares (11/21/2014)
Damian-167372 (11/21/2014)
yes your absolutely right I agree table variable is a overhead for this query,
but for any other large queries I can use this method...
November 21, 2014 at 10:55 am
Damian-167372 (11/21/2014)
yes your absolutely right I agree table variable is a overhead for this query,
but for any other large queries I can use this method slightly change to...
November 21, 2014 at 10:35 am
Totally out of context.
If anyone of you have heard about what has been happening in Mexico these last few days. Would you mind sharing it with me by PM? I'd...
November 21, 2014 at 10:18 am
It seems that you have some things that don't belong there.
bcp Weather.dbo.TestTable in C:\wdisplay\webfiles\customtextout7.txt -c -S localhost\PSIMONDS\SQLEXPRESS -T
Read more about bcp in here:
http://msdn.microsoft.com/en-us/library/ms162802.aspx
http://www.sqlservercentral.com/articles/BCP+(Bulk+Copy+Program)/105867/
November 21, 2014 at 9:13 am
Viewing 15 posts - 5,491 through 5,505 (of 8,731 total)