Viewing 15 posts - 1 through 15 (of 29 total)
Thx Lowell!
It worked! I first had some issue regarding the modulus operator "%". Beacuse I use ASA (sybase) in this application and in ASA, the percent sign is a comment...
December 3, 2009 at 1:01 am
arun.sas:
This worked fine. Thx a lot 🙂
What if I want to create a table och the result of the union statement ?
Hade read some about pivot/cross table. Don´t know if...
November 16, 2009 at 12:52 am
Hi,
Thx for quick reply 🙂
Gonna try it right away. Get back with the result.
Regards
November 11, 2009 at 12:24 pm
Thx a lot for a quick answer! 🙂
November 9, 2009 at 2:31 pm
Now I have an excel sheet where you fill out item name, main cat and sub cat and then
I save it as an .csv file and the result of...
May 26, 2009 at 3:37 am
Hi,
This works perfekt. I´m thinking of maybe making this more dynamic in some way. Let´s say you don´t know how many "cat" youré having. Let´s say you have for exampel...
May 11, 2009 at 2:49 am
Finally!
Got it to work after many hour´s 🙂
///drop Table #custTable
create Table #custTable (num int, cat char(1) )
insert #custTable values (0,'A')
insert #custTable values (0,'A')
insert #custTable values (0,'B')
insert #custTable values...
May 11, 2009 at 1:48 am
Jeff:
Is this what you ment by an "anchor" ?
I wonder if there is any way to use this within an CASE statemant ?
/ Magnus
May 8, 2009 at 1:06 am
I took an screener so you can see the result for yourself. I think there are som syntax differences regarding how you work with variables and updates.
SQL // not working
SET...
May 7, 2009 at 3:09 pm
Old Hand:
Thx, i just tried youré code snippet and it don´t work. Well, it works but it doesn´t give right the output. The result is:
number, cat
31, A
31, A
91, B
91, B
0,...
May 7, 2009 at 2:25 pm
Old Hand:
Well, "etc" isn´t a part of the result actually. I just wrote it to mark a stop in the result of the query. So don´t mind about the "etc"...
May 7, 2009 at 11:40 am
Hi,
The code below generates the following result.
declare @i1 int
declare @i2 int
select @i1=10
select @i2=40
update custom.t1
set num=
case
when
t1.cat='s1'
then
number+@i1
when
...
May 7, 2009 at 5:16 am
I almost got this CASE update statement to work now for the catagory field. But the strange thing is that it´s only update´s cat "s1" like this
cat "s1"
10
11
12
etc..
cat "s2"
40
40
40
etc..
If you...
May 6, 2009 at 7:34 am
Finally i got i to work!
Was searching the internet back and forward regarding this clustered index issue, found a lot of information and tried a lot without any luck.
Then...
May 6, 2009 at 4:34 am
Jeff:
I think youré right. I think it has something to with clustered index on the table.
// Magnus
May 5, 2009 at 1:28 am
Viewing 15 posts - 1 through 15 (of 29 total)