Viewing 15 posts - 1 through 15 (of 217 total)
Thanks!
I was wondering, do you know if it would be possible to combine both queries so that I get something like this?
SELECT 'Jimmy' AS Person,'12345' As weaponId,1 AS isFinished, 2...
February 2, 2016 at 8:12 am
sharonsql2013 (2/1/2016)
Should your Output have Alex = 2?
No because it's the same weaponId. I only want to count isFinished once for each weaponId.
Thanks
February 1, 2016 at 1:08 pm
Thanks for the tip on creating a query to show data. Much better than what I had. 🙂
I'm afraid I'm still a little lost though.
So I have my query:
SELECT
...
January 22, 2016 at 8:06 am
Thanks. I tried joins, but I am not receiving the same number of rows as I am with the original query.
I replace the delete with a select for testing:
SELECT...
January 7, 2016 at 1:43 pm
productionStarted should be tr.productionStarted
partID should be tr.partID
Thanks!
ChrisM@Work (1/7/2016)
January 7, 2016 at 9:17 am
Thank you, but you are using 'u.testId' which comes from one of my CTEs.
Sergiy (1/5/2016)
This simple query will do:
DECLARE @PartID_List VARCHAR(8000)
SET @PartID_List = '1,2,3,4,5,6,7,8,9,10,11,12'
SELECT...
January 7, 2016 at 8:46 am
Jeff Moden (12/16/2015)
Personally, I'm a BIG fan of xp_CmdShell and I might be missing something but... I don't see you actually using it anywhere in your scripts.
Oh ok, I was...
December 17, 2015 at 7:32 am
Ok I downloaded and installed Redgate but I don't really see how this will copy data from the production database to my development database. I can see how Redgate...
October 14, 2011 at 10:56 am
Here is my table and query:
/****** Object: Table [dbo].[pageList] Script Date: 09/15/2010 11:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[pageList](
[userID] [int] NULL,
[pageName] [nvarchar](255) NULL,
[pageDate]...
September 15, 2010 at 9:55 am
dates are stored in datetime format:
2010-04-28 00:00:00.000
2010-04-29 00:00:00.000
2010-04-29 00:00:00.000
2010-04-29 00:00:00.000
2010-04-30 00:00:00.000
2010-05-03 00:00:00.000
2010-05-03 00:00:00.000
2010-05-04 00:00:00.000
2010-05-04 00:00:00.000
2010-05-05 00:00:00.000
2010-05-05 00:00:00.000
2010-05-06 00:00:00.000
2010-05-07 00:00:00.000
2010-05-10 00:00:00.000
September 15, 2010 at 9:14 am
Oh I see...thanks for BOL link.
I tried using 101 instead of 103, and I still get a random order by.
I also just tried doing ORDER BY pageDate, but that generated...
September 15, 2010 at 8:58 am
Yes, I would like to be able to do this:
ORDER BY
CASE
WHEN @SortSeq = 'asc' AND @SortOrder =...
September 10, 2010 at 7:49 am
Oops...I definately don't want 2 resultsets!
So I would rewrite it like this
SELECT * FROM myTable
Where Case
WHEN @myVar = 1 THEN
...
March 31, 2010 at 8:34 am
The queries are all the same except for various AND statements.
So I guess I could do this?
SELECT * FROM myTable
WHERE 1 = 1
select case @myVar
WHEN 1 THEN
...
March 30, 2010 at 6:23 pm
Viewing 15 posts - 1 through 15 (of 217 total)