Viewing 15 posts - 781 through 795 (of 1,082 total)
Is that case statment solution not working???
August 1, 2008 at 5:35 am
How are you getting the data in to the table with the expo values ?
Could you give me an example of an insert line of data thanks
Chris
August 1, 2008 at 5:29 am
HI There,
Will this not help you?
UPDATE Item
SET BandDate = CASE WHEN dbo.fnConst_GetModel(ItemId) = 1 THEN NULL ELSE getdate() END
Thanks
Chris
August 1, 2008 at 5:25 am
HI Kisha,
Please could you provide us with some sample data, and datatype definitions?
Thanks
Chris
August 1, 2008 at 5:04 am
Hi,
I'm not sure that it is possible with this procedure.
Because of this error.
Msg 8164, Level 16, State 1, Procedure sp_get_composite_job_info, Line 58
An INSERT EXEC statement cannot be nested.
Which isn't because...
August 1, 2008 at 4:46 am
Thats the one,
since my last post I been trying to find a way to do it without doing a CHAR cast.
Well done Jeff thats awesome 🙂
July 31, 2008 at 10:36 am
Nice solution Jack, too me a bit to work it out but I ended up with the same solution 😉
July 31, 2008 at 10:23 am
Hi Vampire.
What you have said above is not 100% correct.
You can infact insert rows into a table from a SP as mentioned.
For example:
[Code]
CREATE PROCEDURE dbo.MyProc
AS
SET NOCOUNT ON
SELECT
1 as...
July 31, 2008 at 9:35 am
Hi Karthik,
The main difference between your query and mine, other than the fact that mine seems run much faster is the following.
I can control exactly how I want data split...
July 31, 2008 at 3:33 am
HI There,
I'm not sure how if you have an input of 70 you get a result of 10,30,40,50,60,70,80,90
Please could you explain your input and out values again?
Thanks
Chris
July 30, 2008 at 10:07 am
Hi ,
Firstly yes the first query actaully also runs in ms on my server.
so I increased the volume to 10000
This took around 3.5secs
Where as the below code took a 1sec...
July 30, 2008 at 4:37 am
Hi,
Here is a section of Code that will create a dynamic pivot:
I have used a UNION select to insert my data, but you will need to replace this with your...
July 30, 2008 at 4:05 am
HI all,
A Good idea would be to change the function supplied to use the Tally table instead of a loop.
Thanks
Chris
July 30, 2008 at 3:43 am
HI All,
OK I managed to find a solution.
If someone can find a better one please let me know thanks:
;WITH myCTE ([id],[SECTION],[Total],[col1])
AS
(
SELECT
[id],
SECTION,
Total,
CAST(col1 as VARCHAR(10))as col1
FROM @tbl a
UNION ALL
SELECT
a.[id],
a.SECTION,
a.Total,
CAST(a.col1 +...
July 29, 2008 at 6:02 am
Viewing 15 posts - 781 through 795 (of 1,082 total)