Viewing 15 posts - 11,386 through 11,400 (of 26,486 total)
polkadot (6/11/2012)
thank you Lynn, that works great.
Which works?
June 11, 2012 at 3:51 pm
kyle.freeman (6/11/2012)
June 11, 2012 at 3:27 pm
Just an FYI regarding the code above, it won't work if ProdPath is null, unless NULL is a valid return value.
June 11, 2012 at 2:14 pm
Evil Kraig F (6/11/2012)
June 11, 2012 at 2:10 pm
krypto69 (6/11/2012)
That is exactly what they are doing.
Anything I can do to help them?... Other than "not supported too bad".
And
Do you know of any documentation I can use to...
June 11, 2012 at 1:56 pm
ColdCoffee (6/11/2012)
this , may be?
; with cte as(
Select ProdPath = t.ProdPath + '\'
from #TestTable t
)
select SUBSTRING(c.ProdPath , 1, CHARINDEX('\',ProdPath)-1)
from cte c
Starting with what ColdCoffee did above, I came up...
June 11, 2012 at 1:53 pm
polkadot (6/11/2012)
Msg 537, Level 16, State 2, Line 1
Invalid length parameter passed to the LEFT or SUBSTRING function.
even if I go
SELECT CASE when CHARINDEX('/',...
June 11, 2012 at 1:36 pm
polkadot (6/11/2012)
Msg 537, Level 16, State 2, Line 1
Invalid length parameter passed to the LEFT or SUBSTRING function.
even if I go
SELECT CASE when CHARINDEX('/',...
June 11, 2012 at 1:34 pm
sivag (6/11/2012)
CREATE TABLE [dbo].[tblPlotInfo](
[ProjectId] [int] IDENTITY(1,1) NOT NULL,
[PtId] VARCHAR(10) NOT NULL,
[DimensionA]...
June 11, 2012 at 1:31 pm
sivag (6/11/2012)
CREATE TABLE [dbo].[tblPlotInfo](
[ProjectId] [int] IDENTITY(1,1) NOT NULL,
[DimensionA] [decimal](4, 2) NOT NULL,
[DimensionB] [decimal]((18, 4)) NOT NULL,
[DimensionC] [decimal](4, 4)) NOT NULL,
[DimensionD] [decimal](4, 2) NOT NULL,
[ActualPrice] [decimal](18, 2)...
June 11, 2012 at 1:27 pm
First, take a CLOSE look at your CHARINDEX in your case statement. Second, you need an ELSE in your case statement.
Try the following:
SELECT d.ProdPath
INTO #TestTable
FROM (
SELECT 'Beverages\Soda Pop\Mountain Dew'...
June 11, 2012 at 1:13 pm
You should probably rewrite your stored procedure to return a range of ids, using a cursor in a trigger is not the best way to process data.
Here is a rewrite...
June 11, 2012 at 1:03 pm
Cleaned up your code and fixed some data types based on the sample data you were trying to insert.
CREATE TABLE [dbo].[tblPlotInfo](
[ProjectId] [int] IDENTITY(1,1) NOT NULL,
[DimensionA] [decimal](4, 2) NOT NULL,
[DimensionB] [decimal](18,...
June 11, 2012 at 12:53 pm
WayneS (6/11/2012)
June 11, 2012 at 12:30 pm
SQLKnowItAll (6/11/2012)
tamil.selvanmca (6/11/2012)
00000002012012-06-1108:34:23MainGateEntry-Big
00000002012012-06-1108:38:30FF LAB-8 Entry ...
June 11, 2012 at 12:14 pm
Viewing 15 posts - 11,386 through 11,400 (of 26,486 total)