Viewing 15 posts - 5,641 through 5,655 (of 6,036 total)
Author posted:
arrrg! I only need to catch a little piece from a text file!!!!
My solution absolutely fits this task.
February 2, 2006 at 4:07 am
Declare text vriable as a parameter of your SP.
February 2, 2006 at 2:20 am
You need to be sure nobody will change settings of front end application and sent you strings with dates in American format. Otherwise you SP will fail again.
February 1, 2006 at 7:56 pm
Try this:
SET @StartDate = '05/01/2006'
SET @EndDate = '25/01/2006'
And I prescribed to use a function because within function you can check for ISDATE(@string) = 1, if not try another format, etc.
If...
February 1, 2006 at 7:31 pm
Something like this:
CREATE PROC USP_RptActions @StartDateString nvarchar(20), @EndDateString DATETIME
AS
DECLARE @StartDate DATETIME, @EndDate DATETIME
SELECT @StartDate = dbo.SomeConversionUDF(@StartDateString), @EndDate = dbo.SomeConversionUDF(@EndDateString)
SELECT ...
February 1, 2006 at 7:07 pm
Two ways to do it.
1. Check what are the settings of your SQL Server and convert strings from your forms into appropriate format inside your code, before you call SP.
2....
February 1, 2006 at 6:43 pm
Datetime values are not stored in database as YYYY-MM-DD. They are stored as decimal numbers where int part represents number of full days passes since 1/1/1900 00:00:00.000 and fractional part...
February 1, 2006 at 5:49 pm
And you convert you parameters to DATETIME out of SP scope because parameters are datetime datatype.There is no point for SET DATEFORMAT DMY inside this SP.
February 1, 2006 at 5:03 pm
February 1, 2006 at 4:24 pm
First of all get rid of @IRN and @RequestNo
If eventually you insert 2 or more rows trigger will fail.
You can do it in one statement:
UPDATE ImagingWorks
SET DA = 1
FROM...
February 1, 2006 at 3:48 pm
Check your data, check datatypes, etc.
You definitely do something wrong.
I tested this on real table:
CREATE PROC dbo.test_Address @RowId uniqueidentifier
AS
select * from address where rowguid = @rowid
go
declare @RowId uniqueidentifier
select...
February 1, 2006 at 2:46 pm
Why not to use simple SUBSTRING ?
You can use start > 8000 only length must be within 8000 (4000 for "N" types).
February 1, 2006 at 2:10 pm
CREATE TABLE dbo.CharReplace (
CharToReplace nchar(1) NOT NULL,
CharReplacement nchar(1) NOT NULL
)
INSERT INTO dbo.CharReplace (CharToReplace, CharReplacement)
SELECT .... -- put here your replacement rules
SELECT REPLACE(datename(w,t.data), C.CharToReplace , C.CharReplacement )
FROM Table...
January 31, 2006 at 9:00 pm
You are trying to create "3 dimentional" query: assign table to each cell in another table. SQL Server cannot handle this.
Create scalar function for
Select count(*) from dbo.ArticlesByProject(@ProjectID)
January 31, 2006 at 8:33 pm
Viewing 15 posts - 5,641 through 5,655 (of 6,036 total)