Viewing 15 posts - 946 through 960 (of 1,082 total)
Hi Peter,
I suggest making sure you are connected to the correct DB before going through with your format!
Thanks
Chris
February 19, 2008 at 2:43 am
HI,
Try this:
SELECT RIGHT([MyVarchar],CHARINDEX('_',REVERSE([MyVarchar]))-1)
Thanks
Chris
February 12, 2008 at 7:24 am
Hi Adam,
Out of interest, would a computed col be a bad implimentation for this problem?
Thanks
Chris
February 12, 2008 at 7:09 am
HI ,
Not sure that this falls into best practise maybe someone can help.
But you could also create BillingMonthas a computed column
e.g
CREATE TABLE dbo.Mytable
(
Col1 INT
,Col2 VARCHAR(100)
,etc....
,Leadtime INT
,OITDate INT
,BillingMonth as [Leadtime] +...
February 12, 2008 at 6:51 am
Hi,
Ok in this line
(OITDate+Leadtime) as BillingMonth
replace Leadtime
With the record the case statement that you used to determine Leadtime.
I'll look into another method as this may not be the best...
February 12, 2008 at 6:41 am
HI again 🙂
Sorry I didn't read through you code properly.
From my knowledge you can not reference an ALIAS from a select in the same select.
Hope this helps?
you may need to...
February 12, 2008 at 5:33 am
HI ,
The convert should work!
your syntax is wrong though. should be: CONVERT(VARCHAR(10), [DATEVALUE],103) as [VARNAME]
ARe you sure that :Leadtime is a valid col in your ReportingData table?
Thanks
Chris
February 12, 2008 at 5:30 am
HI There,
Please could you provide the full update statement?
Thanks
Chris
February 12, 2008 at 5:01 am
Hi,
The above solution is missing the order by in the over clause:
select * from
(select *, row_number() over(ORDER BY ID) AS RowNo FROM Employee) Emp
where RowNo = @Num
I also did...
February 12, 2008 at 3:29 am
HI There,
Haev you tried running that code?
I ran it on a table of 428577 rows for the N = 5 and it ran for 5minutes and then I cancelled...
February 12, 2008 at 3:03 am
Thanks for the reply 🙂
The one thing that concerns me is that for our 3 country tables at the moment they all have the same number of rows referencing the...
February 7, 2008 at 1:58 am
Hi All,
Does anyone have any feedback on this for me?
Thanks
Chris
February 7, 2008 at 1:04 am
Hi ,
Just in case you are interested.
If you have a numbers/tally table in your database which is always good to have.
Here is an alternate to your split function that does...
February 5, 2008 at 12:46 am
Hi,
The reason for this is that you have created a tabular function (meaning it returns a table).
To get data from this type of function you need to treat it as...
February 5, 2008 at 12:41 am
HI Grant,
Thanks for your reply, and that is pretty much what I was expecting someone to come back and say.
I also believe that you shouldn't put bad practise in place...
February 4, 2008 at 4:49 am
Viewing 15 posts - 946 through 960 (of 1,082 total)