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.
_____________
Code for TallyGenerator
February 2, 2006 at 4:07 am
Declare text vriable as a parameter of your SP.
_____________
Code for TallyGenerator
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.
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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 ...
_____________
Code for TallyGenerator
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....
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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.
_____________
Code for TallyGenerator
February 1, 2006 at 5:03 pm
February 1, 2006 at 5:00 pm
Is it what you are looking for?
http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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).
_____________
Code for TallyGenerator
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...
_____________
Code for TallyGenerator
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)
_____________
Code for TallyGenerator
January 31, 2006 at 8:33 pm
Viewing 15 posts - 5,641 through 5,655 (of 6,036 total)