Odd Chars In Result From Xp_loginconfig

Sep 13, 2006

Hi

I am trying to get the domain name of the server running this instance of SQL server 2000 using xp_loginconfig but have been getting some very strange results. The code example below shows the problem quite nicely. Basically the output shows white space of some sort before the "/HelloWorld" in the second select.

Any ideas why? and how to get rid of it. I've tried using RTRIM() but that made no difference.

On some server instances I dont even see the "/HelloWorld" perhaps it's put in a new line char or something like that.

Thanks
Christian


create table #tmp (ConfigName varchar(100) null, ConfigValue varchar(100) null)
insert into #tmp exec master..xp_loginconfig

select ConfigName+'/HelloWorld' from #tmp where ConfigName = 'default domain'
select ConfigValue+'/HelloWorld' from #tmp where ConfigName = 'default domain'

drop table #tmp

GO

View 4 Replies


ADVERTISEMENT

TSQL - Select First 3 Chars Where Not Special Chars

Feb 5, 2002

Say I have a column called 'NAME' in a table called 'CLIENT' and the values in NAME are Surnames or company names like:

NAME
----------------------
1-FOR-ALL
A.B. SMITH (TOOLS LTD)
BROWN
THOMSON
VW CAR SALES



I want my select to return the first 3 characters, excluding special characters (only characters between 1 and z).

In example, the following would be returned for the data above:

NAME
----------------------
1FO
ABS
BRO
THO
VWC

View 1 Replies View Related

TSQL - Select First 3 Chars Where Not Special Chars

Feb 11, 2002

Say I have a column called 'NAME' in a table called 'CLIENT' and the values in NAME are Surnames or company names like:

NAME
----------------------
1-FOR-ALL
A.B. SMITH (TOOLS LTD)
BROWN
THOMSON
VW CAR SALES



I want my select to return the first 3 characters, excluding special characters (only characters between 1 and z).

In example, the following would be returned for the data above:

NAME
----------------------
1FO
ABS
BRO
THO
VWC

View 1 Replies View Related

Non English Chars Are Being Shown As Junk Chars

Jan 9, 2008

Hi All

I have loaded some data to the application using flat files

which has non english chars.

all the columns in the database are NVARCHAR type.

but in db and in application UI, the non english chars are being diplayed as junk chars. ???121

The application supports UTF-8 format

is there any setting at db level to be modified to display the non english char set as is.

Thanks

View 2 Replies View Related

Truncation Error: 255 Chars To 2 Chars.

Aug 27, 2007

Hi,

I am very new to using SSIS.

Trying to import data from MS Access 2000.

I receive the error "
[OLE DB Destination [1907]] Warning: Truncation may occur due to inserting data from data flow column "GENDER" with a length of 255 to database column "GENDER" with a length of 2. " on the source flow.

I have done some googling and came up with this post: http://torontosql.dotnetnuke-portal.com/Default.aspx?tabid=32233 which I thought may help, but it does not.

The query against the access datasource features the column: iif([sex]=1, 'm', 'f'). I tried using left(..., 2) as well, but SSIS is determind to treat the field as 255 characters for some reason.

I don't even particualrly care that the field is 255 chars and the sources is only two, I just want the data in! I have other fields coming up with similar error.

Can someone please advise?

PS, what is th significance of the "External Columns" Vs "Output Columns" on the Input and Output Properties tab in Advanced Editor?

I am really struggling with SSIS, it is not as intuitive as DTS.


View 1 Replies View Related

Remove Chars

Mar 13, 2001

I have a field name call firstname and other field middleinit, now the table contains data. and i want to extract data, the firstname field sometimes contains the middle initial, for for example JOHH D.
now I would like to set the firstname field with JOHN only and and set the middleinit field like D only
thanks

View 2 Replies View Related

Can't Contain Non-alphabetic Chars

Jun 11, 2008

With this procedure,can't show if GiftTitle contains space ,nonalphabetic chars(&,-,..) and if start with numnber.
How can i modify ??
Plz help me.
Thanks.

CREATE PROCEDURE dbo.trymatrix AS
DECLARE @SQLCommand varchar(4096), @column sysname

SET @SQLCommand = 'select c.CustomerID as Cust_ID,Name as Co_Name, ' + char(13)

DECLARE curGift CURSOR STATIC LOCAL FOR

select distinct GiftTitle from Redemption1

OPEN curGift

WHILE 1 = 1

BEGIN

FETCH curGift INTO @column

IF @@FETCH_STATUS <> 0

BREAK

SET @SQLCommand = @SQLCommand +

'sum(case GiftTitle when ''' +@column +''' then 1 else null end) as '+ @column + ','+char(13)

END

DEALLOCATE curGift

SET @SQLCommand = left (@SQLcommand, len(@SQLcommand)-2) + char(13)

SET @SQLCommand = @SQLCommand +

'from Customer c

inner join Redemption1 d

on c.CustomerID=d.CustomerID

group by Name,c.CustomerID

order by c.CustomerID'

PRINT @SQLCommand

EXEC (@SQLCommand)

View 4 Replies View Related

Set Variable Based On Result Of Procedure OR Update Columns Fromsproc Result

Jul 20, 2005

I need to send the result of a procedure to an update statement.Basically updating the column of one table with the result of aquery in a stored procedure. It only returns one value, if it didnt Icould see why it would not work, but it only returns a count.Lets say I have a sproc like so:create proc sp_countclients@datecreated datetimeasset nocount onselect count(clientid) as countfrom clientstablewhere datecreated > @datecreatedThen, I want to update another table with that value:Declare @dc datetimeset @dc = '2003-09-30'update anothertableset ClientCount = (exec sp_countclients @dc) -- this line errorswhere id_ = @@identityOR, I could try this, but still gives me error:declare @c intset @c = exec sp_countclients @dcWhat should I do?Thanks in advance!Greg

View 4 Replies View Related

Problem Assigning SQL Task Result To A Variable - Select Count(*) Result From Oracle Connection

Dec 26, 2007



I have an Execute SQL Task that executes "select count(*) as Row_Count from xyztable" from an Oracle Server. I'm trying to assign the result to a variable. However when I try to execute I get an error:
[Execute SQL Task] Error: An error occurred while assigning a value to variable "RowCount": "Unsupported data type on result set binding Row_Count.".

Which data type should I use for the variable, RowCount? I've tried Int16, Int32, Int64.

Thanks!

View 5 Replies View Related

Table-valued User-defined Function: Commands Completed Successfully, Where Is The Result? How Can I See Output Of The Result?

Dec 11, 2007

Hi all,

I copied the following code from Microsoft SQL Server 2005 Online (September 2007):
UDF_table.sql:

USE AdventureWorks;

GO

IF OBJECT_ID(N'dbo.ufnGetContactInformation', N'TF') IS NOT NULL

DROP FUNCTION dbo.ufnGetContactInformation;

GO

CREATE FUNCTION dbo.ufnGetContactInformation(@ContactID int)

RETURNS @retContactInformation TABLE

(

-- Columns returned by the function

ContactID int PRIMARY KEY NOT NULL,

FirstName nvarchar(50) NULL,

LastName nvarchar(50) NULL,

JobTitle nvarchar(50) NULL,

ContactType nvarchar(50) NULL

)

AS

-- Returns the first name, last name, job title, and contact type for the specified contact.

BEGIN

DECLARE

@FirstName nvarchar(50),

@LastName nvarchar(50),

@JobTitle nvarchar(50),

@ContactType nvarchar(50);

-- Get common contact information

SELECT

@ContactID = ContactID,

@FirstName = FirstName,

@LastName = LastName

FROM Person.Contact

WHERE ContactID = @ContactID;

SELECT @JobTitle =

CASE

-- Check for employee

WHEN EXISTS(SELECT * FROM HumanResources.Employee e

WHERE e.ContactID = @ContactID)

THEN (SELECT Title

FROM HumanResources.Employee

WHERE ContactID = @ContactID)

-- Check for vendor

WHEN EXISTS(SELECT * FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

THEN (SELECT ct.Name

FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

-- Check for store

WHEN EXISTS(SELECT * FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE sc.ContactID = @ContactID)

THEN (SELECT ct.Name

FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE ContactID = @ContactID)

ELSE NULL

END;

SET @ContactType =

CASE

-- Check for employee

WHEN EXISTS(SELECT * FROM HumanResources.Employee e

WHERE e.ContactID = @ContactID)

THEN 'Employee'

-- Check for vendor

WHEN EXISTS(SELECT * FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

THEN 'Vendor Contact'

-- Check for store

WHEN EXISTS(SELECT * FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE sc.ContactID = @ContactID)

THEN 'Store Contact'

-- Check for individual consumer

WHEN EXISTS(SELECT * FROM Sales.Individual i

WHERE i.ContactID = @ContactID)

THEN 'Consumer'

END;

-- Return the information to the caller

IF @ContactID IS NOT NULL

BEGIN

INSERT @retContactInformation

SELECT @ContactID, @FirstName, @LastName, @JobTitle, @ContactType;

END;

RETURN;

END;

GO

----------------------------------------------------------------------
I executed it in my SQL Server Management Studio Express and I got: Commands completed successfully. I do not know where the result is and how to get the result viewed. Please help and advise.

Thanks in advance,
Scott Chang

View 1 Replies View Related

Saving Query Result To A File , When View Result Got TLV Error

Feb 13, 2001

HI,
I ran a select * from customers where state ='va', this is the result...

(29 row(s) affected)
The following file has been saved successfully:
C:outputcustomers.rpt 10826 bytes

I choose Query select to a file
then when I tried to open the customer.rpt from the c drive I got this error message. I am not sure why this happend
invalid TLV record

Thanks for your help

Ali

View 1 Replies View Related

End Result Is Main Query Results Ordered By Nested Result

May 1, 2008

As the topic suggests I need the end results to show a list of shows and their dates ordered by date DESC.
Tables I have are structured as follows:

SHOWS
showID
showTitle

SHOWACCESS
showID
remoteID

VIDEOS
videoDate
showID

SQL is as follows:

SELECT shows.showID AS showID, shows.showTitle AS showTitle,
(SELECT MAX(videos.videoFilmDate) AS vidDate FROM videos WHERE videos.showID = shows.showID)
FROM shows, showAccess
WHERE shows.showID = showAccess.showID
AND showAccess.remoteID=21
ORDER BY vidDate DESC;

I had it ordering by showTitle and it worked fine, but I need it to order by vidDate.
Can anyone shed some light on where I am going wrong?

thanks

View 3 Replies View Related

CASE Function Result With Result Expression Values (for IN Keyword)

Aug 2, 2007

I am trying to code a WHERE xxxx IN ('aaa','bbb','ccc') requirement but it the return values for the IN keyword changes according to another column, thus the need for a CASE function.

WHERE GROUP.GROUP_ID = 2 AND DEPT.DEPT_ID = 'D' AND WORK_TYPE_ID IN ( CASE DEPT_ID WHEN 'D' THEN 'A','B','C' <---- ERROR WHEN 'F' THEN 'C','D ELSE 'A','B','C','D' END )

I kept on getting errors, like

Msg 156, Level 15, State 1, Line 44Incorrect syntax near the keyword 'WHERE'.
which leads me to assume that the CASE ... WHEN ... THEN statement does not allow mutiple values for result expression. Is there a way to get the SQL above to work or code the same logic in a different manner in just one simple SQL, and not a procedure or T-SQL script.

View 3 Replies View Related

SqlDbType Chars's And VarChar's

Jun 19, 2006

I have an overloaded method in my data access layer that I use to load the parameters into a command object.  One of these overloaded methods is as follows:
public void LoadSqlParameter(string name, string value, ParameterDirection direction){            param                           = new SqlParameter();            param.ParameterName = name;            param.Value                 = value;            param.Direction            = direction;
            param.SqlDbType        = SqlDbType.VarChar;
            cmd.Parameters.Add(param);}
Will using a SqlDbType of VarChar cause me any problems if the actual parameter in the stored procedure is a Char? 
Am I better off leaving out the line that specifies the type?
Thanks
 
 

View 2 Replies View Related

A Textstring More Than 8000 Chars.

Feb 1, 2001

Hi,
I have a problem with a text string which is more than 8000 chars.
I am taking this string as an input from an application.so,I cannot define a local variable as text or ntext and varchar has limitation of only 8000 char.
Can anyone help me in dealing with this situation.
Also,I cannot break the string at application level.I wish if I could solve it at db level somehow?
TIA
pd

View 5 Replies View Related

Maximum Chars Per Column - 256

Sep 23, 1999

In a query Analyser, there is a provision to change the "Maximum characters per column 256 " to our size in advanced option.

It works ok.

We are using VisualInterdev for developing ASP's -- there
thro ADO - we are getting the rows from sql server 7.0 -- there data more than
256 characters are truncated.

How will i get the actual data ?.. where i can do the settings..?

help needed...

Wincy

View 2 Replies View Related

Help - Still Trying To Insert 255+ Chars Into Text

Jun 7, 1999

How do you insert more than 255 characters into a text field? or am I using READTEXT and DATALENGTH incorrectly?

I am trying to concatenate two 255 varchar strings. Both do have 255 characters of data.
I want to insert the concatenated strings into a field define as a text data type.
if I try to ' insert into tempTbl(textFieldDataType) values (@text1+@text2) it appears only the @text1 is inserted.
I have been told the data is really there, but I can only read the 256 position + with READTEXT.

DECLARE @textptr varbinary(16)
select @textptr = (select TEXTPTR(textFieldDataType) from tempTbl where pktempTbl = 33)
READTEXT tempTbl.textFieldDataType @textPtr 255 10

This should have read 10 text positions after the 255th position. However, I get msg
Msg 7124, Level 16, State 1
The offset and length specified in the READTEXT command is greater than the actual data length of 255.

If I use the datalength function, it appears to confirm that @text2 was never inserted

declare @length int
select @length = (select datalength(textFieldDataTypet) from tempTbl where pktempTbl = 33)
select @length

@length is returned as 255

View 1 Replies View Related

Max Chars In A Varchar Field?

Feb 1, 2007

What's the maximum number of characters that varchar field will take? I read somewhere that it's 8k, but I may have misunderstood.

I have to potentially store 100k+ chars in a field.

What's the best way to do this?

Thanks,
--PhB

--PhB

View 1 Replies View Related

Getting First 200 Chars Of Text Stored In Variable

Apr 21, 2008

Hi all,I have a variable called Description which is set from a database field - How do i set another variable to grab the first 200 chars from this var?
hope this makes sense
 

View 2 Replies View Related

Displaying Fields Greater Than 255 Chars

Apr 29, 2001

I have a column of varchar(2000) but when I use it in a select statement I only get the first 255 characters displayed. (all the data is there as I can see different parts using substring) How do I get the complete column to display?

View 2 Replies View Related

All Text Fields Truncated To 255 Chars

Jun 25, 2006

Hi

I defined the following table in MSSQL 2000


sql Code:






Original
- sql Code





CREATE TABLE saved_query (
id INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
name VARCHAR(32) NOT NULL,
query_text VARCHAR(2048) NOT NULL
)






 CREATE TABLE saved_query (      id INT NOT NULL IDENTITY(1,1) PRIMARY KEY,      name VARCHAR(32) NOT NULL,      query_text VARCHAR(2048) NOT NULL)



and whenever I insert or update the query_text field, it's always truncated to 255 characters. Why? I clearly specified a larger field size. I also tried defining query_text as a "TEXT" but got the same result.

Thanks for any help


Ken

View 2 Replies View Related

Want To Make A Select With Special Chars?

Jan 4, 2006

Hello,
I have a problem....
In a table i have some descriptions and i notice that at least one is as follow:

"some product 'delay' to every"

now if i try to make a insert in another table with that description i get an error...
because of the char '

is there any way to make this insert?

the database is MSSQL 2000

View 2 Replies View Related

How To Find Out The Count Of Individual Chars

May 14, 2008

Hi,
Can any one tell me
how to find out the count of individual chars in a String

ie., my string is s='ganesh kumar'
my output must be as below

Character Occurance
--------------------
g 1
a 2
n 1
e 1
s 1
h 1
k 1
u 1
m 1
r 1
----------------------

Can any one do it,
This is interview question..

Ganesh


Solutions are easy. Understanding the problem, now, that's the hard part

View 7 Replies View Related

LIKE-operator With Long Strings (over 256 Chars)

Jul 24, 2007

I am using SQL Server Compact Edition and I get an exception when running a query with a LIKE-operator which parameter is a string with length greater than 256 characters.

Has anybody had this problem? Any ideas on how to fix this?

Thanks.

View 3 Replies View Related

Searching Strings For Specific Chars ?

Nov 16, 2007

Hi if i wanna search a certain column for a specific character

so it could be '&' occuring anywhere in the string
can i use the like operator ?

so have something like

SELECT name from table
where name like '%&%'

View 7 Replies View Related

Replace Chars In Any Field Of A Table

Feb 1, 2006

I need to strip some puntcuation from any field in a given table.I'd rather like to avoid using the replace () for each field in thetable.Anyone have a nifty way do this?Is there a special name that I can use in the replace that means theentire row?(other than syntax, something like REPLACE(@ROW,CHAR(39),'') )tiaRob

View 1 Replies View Related

Chinese Chars Through Stored Procedures...

Jul 20, 2005

Hi,I have a problem with my Stored Procedures...Recently we decided to change the type of our column in our databse fromvarchar to nvarchar because of new customers (chinese).Everything works fine EXCEPT the stored procedures... When i try to passchinese characters for a simple SP that those a basic insert in my table, itinserts ??? instead of chinese characters...Did i miss something obvious?Thanks a lot!Etiennep.s.: you can email me at Join Bytes! or reply on thisnewsgroup.

View 1 Replies View Related

BCP Command With Arguments Having Special Chars

Jul 20, 2005

Hi all,The command is as follows:BCP asdos+_reports..StageCONTACTINFO OUT C:16E8.tmp -w -b10000 -t"|" -r-Sblrkec28791dsqlserver -Uadmin -Padmin -eC:ERRCONTACTINFO.txtHere, since the first argument(database name) has a special char '+' init, the command gives a syntax error. How can i escape it? Double quotes"",[] didnt work!! Pls help!TIA

View 1 Replies View Related

Finding Hidden Chars In Sql Query

Jul 5, 2007

I am working on a login system in flex and asp. I am encrypting the password before it is inserted it into the SQL database. But then when i do SELECT statement with username and encrypted password it returns 0 users found.
I outputted the sql statement and they passwords look excatly the same. But the SQL Select count(*) returns a 0.

link to the encrypting is used:
http://www.4guysfromrolla.com/webtech/110599-1.2.shtml

other information:
script language: asp + flex
database: sql server 2005

So i am thinking that their are hidden chars in the password. Is their a way to check this or even convert/exclude them ?
Any links or tips would be very helpfull

View 3 Replies View Related

Cannot Compare NVarChar(Max) Fields Over 4000 Chars

Oct 24, 2006

I had a post a week or so ago with this issue, I found the cause, but cannot figure out how to fix it... The problem is the comparison on the NVarChar(Max) fields when one of them exceeds 4000 chars. If I comment out the following lines of the stored proc, everything works. I tested without using COALESCE and it still does not work. COALESCE(Comments, '') = COALESCE(@o_Comments, '') ANDCOALESCE(SpecialNotes, '') = COALESCE(@o_SpecialNotes, '') ANDCOALESCE(IAppComments, '') = COALESCE(@o_IAppComments, '') ANDCOALESCE(MgmtNotes, '') = COALESCE(@o_MgmtNotes, '') AND  set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[pe_updateAppraisal]
-- Add the parameters for the stored procedure here
@OrderId INT,
@FileNumber NVarChar(25),
@OrderDate DateTime,
@ClientID NVarChar(25),
@ClientFileNumber NVarChar(25),
@PropertyTypeID INT,
@EstimatedValue money,
@PurchaseValue money,
@LoanOfficer NVarChar(50),
@ReportID INT,
@ReportFee money,
@FeeBillInd bit,
@FeeCollectInd bit,
@CollectAmt money,
@Borrower NVarChar(50),
@StreetAddrA NVarChar(50),
@StreetAddrB NVarChar(50),
@City NVarChar(50),
@CountyID INT,
@StateID INT,
@Zip NVarChar(50),
@ContactName NVarChar(50),
@PhoneA NVarChar(50),
@PhoneB NVarChar(50),
@PhoneC NVarChar(50),
@ApptDate DateTime,
@ApptTime NVarChar(25),
@AppraiserID INT,
@InspectionDate DateTime,
@DateMailed DateTime,
@TrackingInfo NVarChar(50),
@ReviewedBy INT,
@PreNotesID INT,
@PostNotesID INT,
@StatusID INT,
@Comments NVarChar(MAX),
@SpecialNotes NVarChar(MAX),
@MgmtName NVarChar(50),
@MgmtContactName NVarChar(50),
@MgmtAddress NVarChar(50),
@MgmtPhone NVarChar(50),
@MgmtFax NVarChar(50),
@MgmtFee money,
@CheckNumber NVarChar(25),
@MgmtNotes NVarChar(MAX),
@SentAppraiser DateTime,
@InfoReceived DateTime,
@CheckReceived DateTime,
@CheckMailed DateTime,
@INumFamilies NVarChar(10),
@IStyle NVarChar(15),
@IUnit NVarChar(15),
@IConstruction NVarChar(15),
@IBasement NVarChar(10),
@IBFinished NVarChar(10),
@IGarage NVarChar(10),
@INumCars NVarChar(2),
@IGarageType NVarChar(10),
@IContactHas NVarChar(10),
@IAvailable NVarChar(10),
@IInformedAmt NVarChar(5),
@IRealtorContract NVarChar(10),
@IContractContact NVarChar(50),
@IPermitCO NVarChar(10),
@ICORenewal NVarChar(10),
@IRenewalInt NVarChar(15),
@IAppComments NVarChar(MAX),
@IKitchen1 NVarChar(5),
@IKitchen2 NVarChar(5),
@IKitchen3 NVarChar(5),
@IKitchen4 NVarChar(5),
@IKitchenB NVarChar(5),
@IBedroom1 NVarChar(5),
@IBedroom2 NVarChar(5),
@IBedroom3 NVarChar(5),
@IBedroom4 NVarChar(5),
@IBedroomB NVarChar(5),
@IBathroom1 NVarChar(5),
@IBathroom2 NVarChar(5),
@IBathroom3 NVarChar(5),
@IBathroom4 NVarChar(5),
@IBathroomB NVarChar(5),
@AppraiserPerc NVarChar(6),
@AppraiserFee money,

@o_OrderId INT,
@o_FileNumber NVarChar(25),
@o_OrderDate DateTime,
@o_ClientID NVarChar(25),
@o_ClientFileNumber NVarChar(25),
@o_PropertyTypeID INT,
@o_EstimatedValue money,
@o_PurchaseValue money,
@o_LoanOfficer NVarChar(50),
@o_ReportID INT,
@o_ReportFee money,
@o_FeeBillInd bit,
@o_FeeCollectInd bit,
@o_CollectAmt money,
@o_Borrower NVarChar(50),
@o_StreetAddrA NVarChar(50),
@o_StreetAddrB NVarChar(50),
@o_City NVarChar(50),
@o_CountyID INT,
@o_StateID INT,
@o_Zip NVarChar(50),
@o_ContactName NVarChar(50),
@o_PhoneA NVarChar(50),
@o_PhoneB NVarChar(50),
@o_PhoneC NVarChar(50),
@o_ApptDate DateTime,
@o_ApptTime NVarChar(25),
@o_AppraiserID INT,
@o_InspectionDate DateTime,
@o_DateMailed DateTime,
@o_TrackingInfo NVarChar(50),
@o_ReviewedBy INT,
@o_PreNotesID INT,
@o_PostNotesID INT,
@o_StatusID INT,
@o_Comments NVarChar(MAX),
@o_SpecialNotes NVarChar(MAX),
@o_MgmtName NVarChar(50),
@o_MgmtContactName NVarChar(50),
@o_MgmtAddress NVarChar(50),
@o_MgmtPhone NVarChar(50),
@o_MgmtFax NVarChar(50),
@o_MgmtFee money,
@o_CheckNumber NVarChar(25),
@o_MgmtNotes NVarChar(MAX),
@o_SentAppraiser DateTime,
@o_InfoReceived DateTime,
@o_CheckReceived DateTime,
@o_CheckMailed DateTime,
@o_INumFamilies NVarChar(10),
@o_IStyle NVarChar(15),
@o_IUnit NVarChar(15),
@o_IConstruction NVarChar(15),
@o_IBasement NVarChar(10),
@o_IBFinished NVarChar(10),
@o_IGarage NVarChar(10),
@o_INumCars NVarChar(2),
@o_IGarageType NVarChar(10),
@o_IContactHas NVarChar(10),
@o_IAvailable NVarChar(10),
@o_IInformedAmt NVarChar(5),
@o_IRealtorContract NVarChar(10),
@o_IContractContact NVarChar(50),
@o_IPermitCO NVarChar(10),
@o_ICORenewal NVarChar(10),
@o_IRenewalInt NVarChar(15),
@o_IAppComments NVarChar(MAX),
@o_IKitchen1 NVarChar(5),
@o_IKitchen2 NVarChar(5),
@o_IKitchen3 NVarChar(5),
@o_IKitchen4 NVarChar(5),
@o_IKitchenB NVarChar(5),
@o_IBedroom1 NVarChar(5),
@o_IBedroom2 NVarChar(5),
@o_IBedroom3 NVarChar(5),
@o_IBedroom4 NVarChar(5),
@o_IBedroomB NVarChar(5),
@o_IBathroom1 NVarChar(5),
@o_IBathroom2 NVarChar(5),
@o_IBathroom3 NVarChar(5),
@o_IBathroom4 NVarChar(5),
@o_IBathroomB NVarChar(5),
@o_AppraiserPerc NVarChar(6),
@o_AppraiserFee money
AS
BEGIN

UPDATE Orders
SET FileNumber = @FileNumber,
OrderDate = @OrderDate, ClientID = @ClientID,
ClientFileNumber = @ClientFileNumber, PropertyTypeID = @PropertyTypeID,
EstimatedValue = @EstimatedValue, PurchaseValue = @PurchaseValue,
LoanOfficer = @LoanOfficer, ReportFee = @ReportFee,
FeeBillInd = @FeeBillInd, FeeCollectInd = @FeeCollectInd,
CollectAmt = @CollectAmt, Borrower = @Borrower,
StreetAddrA = @StreetAddrA, StreetAddrB = @StreetAddrB,
City = @City, CountyID = @CountyID, StateID = @StateID, Zip = @Zip,
ContactName = @ContactName, PhoneA = @PhoneA, PhoneB = @PhoneB,
PhoneC = @PhoneC, ApptDate = @ApptDate, ReportID = @ReportID,
ApptTime = @ApptTime, AppraiserID = @AppraiserID,
InspectionDate = @InspectionDate, DateMailed = @DateMailed,
TrackingInfo = @TrackingInfo, ReviewedBy = @ReviewedBy,
StatusID = @StatusID, Comments = @Comments,
SpecialNotes = @SpecialNotes, CheckNumber = @CheckNumber,
MgmtName = @MgmtName, MgmtContactName = @MgmtContactName,
MgmtAddress = @MgmtAddress, MgmtPhone = @MgmtPhone,
MgmtFax = @MgmtFax, MgmtFee = @MgmtFee, MgmtNotes = @MgmtNotes,
CheckMailed = @CheckMailed, CheckReceived = @CheckReceived,
InfoReceived = @InfoReceived, SentAppraiser = @SentAppraiser,
PreNotesID = @PreNotesID, PostNotesID = @PostNotesID,
INumFamilies = @INumFamilies,
IStyle = @IStyle, IUnit = @IUnit, IConstruction = @IConstruction,
IBasement = @IBasement, IBFinished = @IBFinished,
IGarage = @IGarage, INumCars = @INumCars,
IGarageType = @IGarageType, IContactHas = @IContactHas,
IAvailable = @IAvailable, IInformedAmt = @IInformedAmt,
IRealtorContract = @IRealtorContract, IContractContact = @IContractContact,
IPermitCO = @IPermitCO, ICORenewal = @ICORenewal,
IRenewalInt = @IRenewalInt, IAppComments = @IAppComments,
IBedroomB = @IBedroomB, IBedroom1 = @IBedroom1, IBedroom2 = @IBedroom2,
IBedroom3 = @IBedroom3, IBedroom4 = @IBedroom4, IKitchenB = @IKitchenB,
IKitchen1 = @IKitchen1, IKitchen2 = @IKitchen2, IKitchen3 = @IKitchen3,
IKitchen4 = @IKitchen4, IBathroomB = @IBathroomB, IBathroom1 = @IBathroom1,
IBathroom2 = @IBathroom2, IBathroom3 = @IBathroom4, IBathroom4 = @IBathroom4,
AppraiserPerc = @AppraiserPerc, AppraiserFee = @AppraiserFee
WHERE OrderID = @o_OrderId AND
COALESCE(FileNumber, '') = COALESCE(@o_FileNumber, '') AND
COALESCE(OrderDate, 01/01/1900) = COALESCE(@o_OrderDate, 01/01/1900) AND
COALESCE(ClientID, 0) = COALESCE(@o_ClientID, 0) AND
COALESCE(ClientFileNumber, '') = COALESCE(@o_ClientFileNumber, '') AND
COALESCE(PropertyTypeID, 0) = COALESCE(@o_PropertyTypeID, 0) AND
COALESCE(EstimatedValue, 0) = COALESCE(@o_EstimatedValue, 0) AND
COALESCE(PurchaseValue, 0) = COALESCE(@o_PurchaseValue, 0) AND
COALESCE(LoanOfficer, '') = COALESCE(@o_LoanOfficer, '') AND
COALESCE(ReportID, 0) = COALESCE(@o_ReportID, 0) AND
COALESCE(ReportFee, 0) = COALESCE(@o_ReportFee, 0) AND
COALESCE(FeeBillInd, 0) = COALESCE(@o_FeeBillInd, 0) AND
COALESCE(FeeCollectInd, 0) = COALESCE(@o_FeeCollectInd, 0) AND
COALESCE(CollectAmt, 0) = COALESCE(@o_CollectAmt, 0) AND
COALESCE(Borrower, '') = COALESCE(@o_Borrower, '') AND
COALESCE(StreetAddrA, '') = COALESCE(@o_StreetAddrA, '') AND
COALESCE(StreetAddrB, '') = COALESCE(@o_StreetAddrB, '') AND
COALESCE(City, '') = COALESCE(@o_City, '') AND
COALESCE(CountyID, 0) = COALESCE(@o_CountyID, 0) AND
COALESCE(StateID, 0) = COALESCE(@o_StateID, 0) AND
COALESCE(Zip, '') = COALESCE(@o_Zip, '') AND
COALESCE(ContactName, '') = COALESCE(@o_ContactName, '') AND
COALESCE(PhoneA, '') = COALESCE(@o_PhoneA, '') AND
COALESCE(PhoneB, '') = COALESCE(@o_PhoneB, '') AND
COALESCE(PhoneC, '') = COALESCE(@o_PhoneC, '') AND
COALESCE(ApptDate, 01/01/1900) = COALESCE(@o_ApptDate, 01/01/1900) AND
COALESCE(ApptTime, '') = COALESCE(@o_ApptTime, '') AND
COALESCE(AppraiserID, 0) = COALESCE(@o_AppraiserID, 0) AND
COALESCE(InspectionDate, 01/01/1900) = COALESCE(@o_InspectionDate, 01/01/1900) AND
COALESCE(DateMailed, 01/01/1900) = COALESCE(@o_DateMailed, 01/01/1900) AND
COALESCE(TrackingInfo, '') = COALESCE(@o_TrackingInfo, '') AND
COALESCE(ReviewedBy, 0) = COALESCE(@o_ReviewedBy, 0) AND
COALESCE(PreNotesID , 0) = COALESCE(@o_PreNotesID, 0) AND
COALESCE(PostNotesID, 0) = COALESCE(@o_PostNotesID, 0) AND
COALESCE(StatusID, 0) = COALESCE(@o_StatusID, 0) AND
/*COALESCE(Comments, '') = COALESCE(@o_Comments, '') AND
COALESCE(SpecialNotes, '') = COALESCE(@o_SpecialNotes, '') AND*/
COALESCE(CheckNumber, '') = COALESCE(@o_CheckNumber, '') AND
COALESCE(MgmtName, '') = COALESCE(@o_MgmtName, '') AND
COALESCE(MgmtContactName, '') = COALESCE(@o_MgmtContactName, '') AND
COALESCE(MgmtAddress, '') = COALESCE(@o_MgmtAddress, '') AND
COALESCE(MgmtPhone, '') = COALESCE(@o_MgmtPhone, '') AND
COALESCE(MgmtFax, '') = COALESCE(@o_MgmtFax, '') AND
COALESCE(MgmtFee, '') = COALESCE(@o_MgmtFee, '') AND
/*COALESCE(MgmtNotes, '') = COALESCE(@o_MgmtNotes, '') AND*/
COALESCE(SentAppraiser, 01/01/1900) = COALESCE(@o_SentAppraiser, 01/01/1900) AND
COALESCE(InfoReceived, 01/01/1900) = COALESCE(@o_InfoReceived, 01/01/1900) AND
COALESCE(CheckReceived, 01/01/1900) = COALESCE(@o_CheckReceived, 01/01/1900) AND
COALESCE(CheckMailed, 01/01/1900) = COALESCE(@o_CheckMailed, 01/01/1900) AND
COALESCE(INumFamilies, '') = COALESCE(@o_INumFamilies, '') AND
COALESCE(IStyle, '') = COALESCE(@o_IStyle, '') AND
COALESCE(IUnit, '') = COALESCE(@o_IUnit, '') AND
COALESCE(IConstruction, '') = COALESCE(@o_IConstruction, '') AND
COALESCE(IBasement, '') = COALESCE(@o_IBasement, '') AND
COALESCE(IBFinished, '') = COALESCE(@o_IBFinished, '') AND
COALESCE(IGarage, '') = COALESCE(@o_IGarage, '') AND
COALESCE(INumCars, '') = COALESCE(@o_INumCars, '') AND
COALESCE(IGarageType, '') = COALESCE(@o_IGarageType, '') AND
COALESCE(IContactHas, '') = COALESCE(@o_IContactHas, '') AND
COALESCE(IAvailable, '') = COALESCE(@o_IAvailable, '') AND
COALESCE(IInformedAmt, '') = COALESCE(@o_IInformedAmt, '') AND
COALESCE(IRealtorContract, '') = COALESCE(@o_IRealtorContract, '') AND
COALESCE(IContractContact, '') = COALESCE(@o_IContractContact, '') AND
COALESCE(IPermitCO, '') = COALESCE(@o_IPermitCO, '') AND
COALESCE(ICORenewal, '') = COALESCE(@o_ICORenewal, '') AND
COALESCE(IRenewalInt, '') = COALESCE(@o_IRenewalInt, '') AND
/*COALESCE(IAppComments, '') = COALESCE(@o_IAppComments, '') AND*/
COALESCE(IKitchen1, '') = COALESCE(@o_IKitchen1, '') AND
COALESCE(IKitchen2, '') = COALESCE(@o_IKitchen2, '') AND
COALESCE(IKitchen3, '') = COALESCE(@o_IKitchen3, '') AND
COALESCE(IKitchen4, '') = COALESCE(@o_IKitchen4, '') AND
COALESCE(IKitchenB, '') = COALESCE(@o_IKitchenB, '') AND
COALESCE(IBedroom1, '') = COALESCE(@o_IBedroom1, '') AND
COALESCE(IBedroom2, '') = COALESCE(@o_IBedroom2, '') AND
COALESCE(IBedroom3, '') = COALESCE(@o_IBedroom3, '') AND
COALESCE(IBedroom4, '') = COALESCE(@o_IBedroom4, '') AND
COALESCE(IBedroomB, '') = COALESCE(@o_IBedroomB, '') AND
COALESCE(IBathroom1, '') = COALESCE(@o_IBathroom1, '') AND
COALESCE(IBathroom2, '') = COALESCE(@o_IBathroom2, '') AND
COALESCE(IBathroom3, '') = COALESCE(@o_IBathroom3, '') AND
COALESCE(IBathroom4, '') = COALESCE(@o_IBathroom4, '') AND
COALESCE(IBathroomB, '') = COALESCE(@o_IBathroomB, '') AND
COALESCE(AppraiserPerc, 0) = COALESCE(@o_AppraiserPerc, 0) AND
COALESCE(AppraiserFee, 0) = COALESCE(@o_AppraiserFee, 0)
END 

View 13 Replies View Related

Getting Error While Passing Values As Special Chars

Mar 4, 2008

Hi friends, I m facing an error while i m passing the values in query as special characters like (',"). anyone can help me?code will be more preferable.Thank you. 

View 1 Replies View Related

DTS Export To File Truncates Column To 255 Chars

Jul 23, 2001

I am having DTS problem exporting from a table to a text file (my 600
character table column is truncated to 255 characters in the output text
file). I don't why this is happining nor how to get the DTS not truncate to
255 characters. Is this a bug? A limitation? How do I get around this
problem?
.......I am running SQL Server 7 SP1 and database is in 6.5 compatability
mode.

View 1 Replies View Related

URGENT HELP!!! To Print Variables More Than 255 Chars (SQL Server 6.5)

Oct 23, 1999

Is there any way to print variables more than 255 from ISQL on DOS


eg:-

DECALRE @Var1 (255)
DECALRE @Var2 (255)

SELECT @Var1 = 'a long line of 255 chars' -- a long line of 255 chars
SELECT @Var2 = 'a long line of 255 chars' -- a long line of 255 chars

-- I wish to print

PRINT @Var1+@Var2 -- that is 510 chars

-- (i dont wish to use SELECT @Var1+@Var2)


any body???

thanks in advance

domini

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved