Viewing 15 posts - 751 through 765 (of 1,082 total)
Ok I think I have a better way of doing this.
I'm using a dynamic pivout query so I hope this helps
DROP TABLE #Yourtbl
CREATE TABLE #Yourtbl
(PK INT,
Restaurant VARCHAR(100),
RoomStatus ...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 5:24 am
does my last reply not work?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 4:59 am
HI there,
Does anyone have any ideas or alternative methods?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 4:36 am
There is another problem in that how does your query know which related intv_schedule.program_Id gets which ex.Program_ID?
I think this is in fact what you looking for:
UPDATE s
SET program_id = e.program_ID
FROM...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 4:32 am
HHI,
There are a few places you went wrong I'll try and explain.
For simplicity I'll just look at your select statements.
[Code]
SELECT e.program_id
FROM (SELECT *
...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 4:29 am
Thanks for the reply 🙂
I guess it comes down to test test and test again 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 6, 2008 at 2:14 am
mmmm ooops,
I'll work on the performance and try and get back to you 🙁
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 11:32 am
Hi 🙂
When you say it gets lost?!!? does it throw an Error?
could you let me know what you mean, and send through an example as well .
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 11:24 am
I'm not sure what you mean about Hardcoding the names?
None of my code should be hard coded, the only section that was hard coded was the creating of the data...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 10:56 am
Hi there,
Ok I think a recursive CTE might get you what you want.
DECLARE @Yourtbl TABLE
(PK INT,
Restaurant VARCHAR(100),
RoomStatus VARCHAR(100))
INSERT INTO @Yourtbl
SELECT 10,'Yonos Restaurant','Room A- Incomplete Certification' UNION ALL
SELECT 10,'Yonos Restaurant','Room...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 10:39 am
Glad you managed to find the answer.
There are a few articles about nulls on this site.
here is one of them
http://www.sqlservercentral.com/articles/Advanced+Querying/2829/
I tend NEVER EVER to use 'something' = null
😉
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 9:56 am
HI Paul,
Please could you give us the table schema and the proc schema with example input and outputs.
Otherwise it is going to be very very hard for us to help...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 9:47 am
HI GSquared,
Don't get me wrong, I'm not a 100% but I have always been taugh both at work and here that cursors are a no-no where ever possible.
Perhaps because of...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 9:46 am
Here are few examples of how to do this differently depending what you want.
1 - example is yours.
2 - example is just returning the first word before the string like...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 9:39 am
HI,
Might be worth looking into changing that code to use a Tally table which should give you must better performance 😉
also something good to learn if you don't knwo much...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
August 5, 2008 at 9:23 am
Viewing 15 posts - 751 through 765 (of 1,082 total)