Viewing 15 posts - 616 through 630 (of 1,082 total)
Are there any other cols in the table that might help with identifying the groupings?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 23, 2008 at 4:33 am
Ok at last I see what is need, now just to work it out 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 23, 2008 at 2:22 am
HI ,
Why then is 6 & 8 a result in the second example.
Also Chris your code doesn't return 10 & 11 as the OP expected.
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 23, 2008 at 2:16 am
HI there
Are you sure your outputs are correct?
I'm a bit confused.
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 22, 2008 at 9:52 am
HI there,
Please could you read the link below to get the best help from here.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 22, 2008 at 8:58 am
Hi There,
Firstly I would recommend using BOL as the explanations are pretty good.
However seeing as though I'm here I'll try.
OK Firstly they both have different lengths.
NVARCHAR tends to take twice...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 19, 2008 at 10:16 am
HI All,
as per my orignal post here is the solution with some sample data.
[font="Courier New"]
DECLARE @table TABLE
(
[id1] INT ,
[id2] INT ,
[id3] INT ,
[id4] INT ,
[id5]...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 19, 2008 at 9:50 am
Try this
SELECT id1, id2, id3
FROM table
where
(id5 = 7 AND x = 1)
OR
x = 0
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 19, 2008 at 9:25 am
HI,
My set date was an example but if you date has a time then the SET @dte = '2008-01-01 01:01:00.010'
or whatever your data is.
looking at the other solutions mine might...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 17, 2008 at 3:06 am
HI there,
I think this might help.
[font="Courier New"]
DECLARE @dte DATETIME
SET @dte = '2008-01-02 00:00.000'
SELECT
@dte AS [StartDAte],
DATEADD(dd, DATEDIFF(dd,0, @dte),-1) AS [Day before with no time],
DATEDIFF(ms,DATEADD(dd, DATEDIFF(dd,0, @dte),-1),@dte) [Diff in...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 17, 2008 at 2:37 am
Hi there,
Did this help?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 17, 2008 at 2:17 am
Hi there,
This will list all the [Field Names] that are repeated more than once and how many times they are repeated.
[font="Courier New"]
SELECT
[Field Name],
COUNT(*)
FROM [Table Name]
GROUP BY [Field...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 16, 2008 at 6:47 am
if your with is not the first line of code, then you need a ; before it
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 16, 2008 at 6:28 am
HI Grant,
No problem I opened the plan in NOTEPAD ++ and found the text you referring to 🙂
very helpful 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 16, 2008 at 5:59 am
Thanks Paul,
This will be a good read for the boss.
I'm hoping to get exams that I could let the team know about in case things start falling over on live...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
September 16, 2008 at 5:42 am
Viewing 15 posts - 616 through 630 (of 1,082 total)