Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Char Varchar Not Copied While Transferring


 

Hi, 
 
I have the following problem.
 
I am using DTS connecting SQL SERVER 2005 and Sybase9. I successfully copy from  Sybase9 to SQL SERVER 2005.
 
Now when i am copying from  SQL SERVER 2005 to  Sybase9  char and varchar types are not copied. The data types are the same as well as data type length. Integers, numeric and date values are copied.  I have tried data conversion but that did not help.
 
sql server 2005 collation is Greek_CI_AI and Sybase9 collection is 1253ELL
 
Any solution how to solve loosing char and varchar types  when copying from   SQL SERVER 2005 to  Sybase9  ?
 
Note: I connected to Sybase using System DSN
 
Regards,
Vasilis
 




View Complete Forum Thread with Replies

Related Forum Messages:
Datatype Question Varchar(max), Varchar(250), Or Char(250)
 

I have a table that contains a lot of demographic information. The data is usually small (<20 chars) but ocassionally needs to handle large values (250 chars).  Right now its set up for varchar(max) and I don't think I want to do this. 
 
How does varchar(max) store info differently from varchar(250)?  Either way doesn't it have to hold the container information?  So the word "Crackers" have 8 characters to it and information sayings its 8 characters long in both cases. This meaning its taking up same amount of space?
 
Also my concern will be running queries off of it, does a varchar(max) choke up queries because the fields cannot be properly analyzed? Is varchar(250) any better?
 
Should I just go with char(250) and watch my db size explode?
 
Usually the data that is 250 characters contain a lot of blank space that is removed using a SPROC so its not usually 250 characters for long.
 
Any insight to this would be appreciated.

View Replies !
Char Vs. Varchar
Greetings,I have a question. I work on some SQL2k/ASP.NET apps at work. Mypredacessor, who created the databases/tables seemed to have liked touse 'char' for all text fields. Is there a reason why he would havedone this over using varchar? It's a minor annoyance to always have toRTRIM data and it makes directly making changes to the database moreannoying (with all the pointless trailing spaces)?I usually use char for fixed string lengths, like state abbreviationsor something, and varchar for strings of unknown length.Is it a performance issue? Our database doesn't do much traffic, forthe most part.

View Replies !
Char Vs Varchar
Hi,
This question may sound silly,but please comment.
Please tell me a situation where char should be used and not varchar.
Let us assume that we are dealing with non unicode characters.
Well, I find varchar is always smarter than char, so why char?
Thanks!!
Rudra

View Replies !
Varchar And Char
i would like to know if there is an overhead in using VARCHAR when you use to store it...

a colleague of mine claims that if the field is defined to be VARCHAR the system creates and additional column DOUBLE/DECIMAL with storage size of 17/18bytes.

such that if the size of the varchar field is less than 30 it is better to be defined as CHAR instead.

please help me out here... i think there's something wrong with his statement, but i need concrete proof to it... a link to page or pdf file would be very much appreciated.

View Replies !
Varchar V Char
I have recently inherited a database where all of the tables use varchar instead of chars for fields. Very , very few of these fields are involved in keys of even indices, but performance is an issue. I thought that I had read that varchars are worse for performance than chars when page splits may occur. Is this related to updates only, or does it matter?

Any help appreciated.

View Replies !
Char Vs Varchar
Hi,

Does any body know of any performance implications of using 'varchar' data type against 'char'?

I have some columns that are using 'char' data type, but the data in them is not fixed length. So, to gain some disk space I am planning to change the data type to 'varchar'. But, I am concerned if there will be any performance de-gradation or any other implications of doing this.

Regards
Chakri

View Replies !
Char (8) Vs. Varchar (8)
In relation to the code in this thread

http://forums.databasejournal.com/showthread.php?t=42622

My customer code field is Char (8) but accept an argument of Varchar (8) to my stored procedure. Don't ask me why!?!!

The customer code could be anything from 'A' to 'ZZZZZZZZ'.

Will this have any effect especially relating to overhead and retrieving incorrect data?

View Replies !
Varchar Vs. Char
Which is better in terms of searching records: char or varchar?

We have a piece of code that checks addresses as they come into our system to see if we have already created a shipping package for that destination. This process needs to be a fast as possible and am wondering if it could be made faster by simply changing the datatype of the search fields. I have the fields in question indexed. Anyone have any suggestions on this subject? Thanks in advance.

View Replies !
VARCHAR Vs. CHAR
Why would you want to use char when you have varchar? Is there any performance hit using a varchar and the size you make that varchar?

Debate going at work.

Phil

View Replies !
CHAR Vs VARCHAR
Hi,

Is that true that using CHAR datatype improves the performance comparing to VARCHAR

thanks
indeed.

View Replies !
Nchar, Varchar,char?
What is the difference between the above data types in SQL?  Which datatype should I use if I wanted both numbers and characters?

View Replies !
VarChar Or Char Faster?
Does using varchar or varchar(max) affect the system performance?
Should I use fixed size coloumns to increase speed?

View Replies !
Changed From Char To Varchar
i changed my state table from char 20 to varchar 20 and it still fills it with empty space at the end of the statename
I tried entering it with the trim command still no good
i looked a the sql command made in vs and it says that the variables are varchar
is there something i am missing with varchar
does it only work properly if it is over 50 or does it not change completely when you change from char to varchar

View Replies !
How Many Char's In Varchar Record
helloHow could I check how many chars are in record, defined as varchar(8000).It's obvious that in such defined record could be 1 char to 8000 char. Butwhat query to SQL database should I post to give information about realylenght of this records ?thanks from advanceAdam

View Replies !
Char Or Varchar For A Primary Key?
Hi,I'm planning the structure of a SqlServer 2005 database for a newapplication.The requirement is that primary keys must be "natural"; i.e. in the tableCustomers the primary key will be a max. 10 characters string (but thestring may be filled i.e. with only 5 charachters).Should I define these primary keys as char[5] or varchar[5]?I'm interested in your opinion in particular about performace issue, becausethere will be tables with millions of records...Thanks,Davide.

View Replies !
Char Vs Varchar And Indexes
all these while i've only used varchar for any stringi heard from my ex-boss that char helps speed up searches. is thattrue?so there are these:1) char with index2) char without index3) char with clustered index4) varchar with index5) varchar without index6) varchar with clustered indexsome of my tables primary key (clustered) is a string type. would itbe benificial to use char? or would using (6) makes no difference?for non primary key columns that needs to be searched a lot, can i say(1) is the best?

View Replies !
Why Specify The Char Length In Varchar?
Newbie question:

Why bother specifing the length in varchar()?
Why not just specify the max and not worry about truncation?

Thanks,

Martin

View Replies !
Difference Between CHAR And VARCHAR
I have one question to all SQL Guru's
I know the basic difference between CHAR and VARCHAR of CHAR taking all the space it is declared with and VARCHAR taking only amount of space used.

I want to know or link to any doucment which gives the difference between CHAR and VARCHAR more than what is mentioned above.

Please this is a urgent requirment.


Thanks in advance.

View Replies !
Difference Between Char & Varchar
what'z the difference between char & varchar, like i am doing a cast function, which one should be used..

View Replies !
SQL Variable Char Kinda Like Varchar
Hi, is there a type of data that we don't need to specify the length but can grow dynamically?instead of using varchar 2000, a type that acts like a varchar but the length is unlimited ....Thanks,

View Replies !
Join Zero Padded Char To Varchar
Having a brain fart and can't figure this out...I have 2 databases I need to join:db1.customer.customer_no char(15) right justified, zero paddedsample customer numbers:000000000000001000000000000010000000000000234000000000012345db2.customer.customer_no varchar(20) left justified, no paddingsample customer numbers:11023412345How do I join tables on customer_no? Use cast, convert? Strip zeroes fromdb1 table?Thanks.

View Replies !
Convert Varchar Or Char To Float
Hello,
Is there a way to convert varchar or char to float?
Thank you

View Replies !
Nchar Or Char Or Nvarchar Or Varchar???
Hi,

Which of the above data type (alongwith size) should be used for storing things like Customer Name, Company name etc . ???

Also, what really is the benefit of one over the over :confused:

Thanks

View Replies !
Unloading Varchar/char Fields
I have a table with several columns in both varchar and char format. If I unload them using bcp then the output from the varchar columns get padded with spaces. Can anybody suggest how I can get around this so that I get the data output exactly as it is held in the database (i.e. if 2 characters held in a varchar(30) I only want the 2 characters output in a tab-delimited format)

View Replies !
% Performance Impact If Use Varchar Instead Of Char?
Hi,
Anybody have any idea howmuch % of performance will be affect if we are using varchar instead of char data type?.
Thanks,
Ravi

View Replies !
Whats More Feasible ? Char OR Varchar ???
which data type would be more feasible to use, CHAR or VARCHAR, if i know that a few months down the line there will be a platform shift ,from SQL server to Oracle.
awaiting a reply.
thanks
kedar

View Replies !
Char Vs Varchar &#043; Padding Issue
I have upsized some tables from ms access (using the wizard) which has created many nvarchar fields. I know the system doesn't need unicode characters so I straight away changed them to varchar and the system is all working but am now deciding on which ones to change to char as I understand you get a performance gain. I am trying to do this without changing much ms access front end code so don't want to deal with rtrim I am thinking change the ones I can guarantee the length of. These happen to be the primary keys.

My questions are is this the correct way of doing things, am I correct in assuming I would have to rtrim alot in program code if I changed all to char.

Finally and. most importantly what about a single character field which could be null can I make this a char(1) and it will still return null if empty as it would as a varchar(1). I suppose this question is how does the padding work is it the character followed by a number of nulls (ascii 0 I think).

Sorry for the multiple questions but I think they are all related

View Replies !
Can Varchar Length Be Set To More Than 8000 Char?
Hi, everyone, I want to know is there a way for me to set varchar to store more than 8000 characters? (I did checked from sql server books online and i know that the maximum storage for varchar, but i just want to know is there any exceptional way for me to store more than that).

Thanks for any reply.

aex

View Replies !
Cross Tab Char/varchar (a Solution)
Louis writes "Thought I share this snippet. You can "concatenate" over rows, using the update statement. The result rows are: ROW1 [C,], ROW2 [B,C], ROW3 [A,B,C].

create table #me (text varchar(1),notes varchar(100))
insert into #me
select text='A',notes=' '
UNION
select text='B',notes=' '
UNION
select text='C',notes=' '

declare @text varchar(1000)
select @text = null
update #me
set @text = notes = text +','+ isnull(@text,'')

select * from #me"

View Replies !
Datatypes Nchar/nvarchar Vs Char/varchar
can anybody please explain me why microsoft using nvarchar/nchar instead of varchar/char in northwind database and pubs database. I know if a column holds unicode data you should use nvarchar or nchar but for me all those tables in northwind/pubs are not holding unicode data. but still why microsoft settled for nchar/nvarchar.

View Replies !
Varchar 8000 Maxing Out At 1000 Char
We just ported a web admin app from SQL 7/IIS 4 to SQL 2000/IIS 5.

There is one table maintained that has 3 varchar 8000 fields (plus an id and name field). One the new servers you can only enter ~1000 characters into any of the large fields. Even if the other 2 field are empty, the remaining field still will not allow more characters. I have stripped all CR and TAB chars, there is only chars and spaces.

This all worked fine on the old servers.

Has anyone come across this?

TIA
September

View Replies !
Data Types (char, Varchar, Nchar, Nvarchar, ...)
Could someone please help me by explaining which one is best to use and when?  For example, storing the word "Corona Del Mar" - which Data Type would be suggested?
 Thanks.

View Replies !
Varchar Vs Char In 1st Field Of Composite Clustered Index
Would it be OK to use varchar(5) instead of char(5) as the first field of acomposite clustered index?My gut tells me that varchar would be a bad idea, but I am not finding muchinformation on this topic on this when I Google it.Currently the field is Char(4), and there is a need to increase it to hold 5characters.TIA

View Replies !
Converting CHAR/VARCHAR/TEXT Into NCHAR/NVARCHAR/NTEXT!!!
Hi,
We are in process of converting all of the data type of the fields from CHAR/VARCHAR/TEXT into NCHAR/NVARCHAR/NTEXT (DBCS). Having more than 900 store procedure its look like real pain to make modification in all of the SPs.

After failed to find any help from GOOGLE, I am posting this request. I am basically looking for any automated tool which are convert data type in SP based on the field of the table used in the SP. Or at least which can provide me some sort of list which can helpful for doing manual reactoring.

PLEASE HELP ME!!!

Thanks,

Firoz Ansari

View Replies !
Implicit Conversion Of Char Value To Varchar Cannot Be Performed Because The Collation Of The Value Is Unresolved..
I got this erorr when trying to create my stored proc,
 
What do i need to fix, and how do i fix it?!!

Msg 457, Level 16, State 1, Procedure PROC_DAILY_ACTIVITY, Line 13

Implicit conversion of char value to varchar cannot be performed because the collation of the value is unresolved due to a collation conflict.
 



Code Block
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
 
-- =============================================
-- Author: <Zaccheus,Tenchy>
-- Create date: <NOVEMEBER,12,2007>
-- Description: <Reporting stored procedure,DAILY ACTIVITY,>
-- =============================================
CREATE PROCEDURE [dbo].[PROC_DAILY_ACTIVITY]
(@Region_Key int=null)
AS
BEGIN
SELECT
Region_Key,
Null as Customer_Code,
Non_Customer_Activities.Question_code,
Non_Customer_Activities.Description,
Region AS Region,
Name AS Territory_Name,
Non_Customer_Activities.Que_Desc AS Store_Name,
Non_Customer_Activities.Logged_Time AS TheDate,
Non_Customer_Activities.response AS Response,
Null as is_Visit_Fg
FROM [FSSRC].[dbo].Qry_Sales_Group Sales_Group
INNER JOIN
(Select QH.[question_code]
,Question_Header.Description
,CONVERT(datetime,DATEADD(day, (qh.cycle_day-1), p.start_date),6) Logged_Time
,SUBSTRING([entity_code],1,5) SR_Code
,[response]
,Territory_Code SR_Territory_Code
,'Not Customer Related' Que_Desc
From question_history QH
INNER JOIN Period P
ON p.period_code = qh.period_code
INNER JOIN [RC_DWDB_INSTANCE_1].[dbo].[Tbl_Territory_In_Sales_Responsible] as Territory_In_Sales_Responsible
ON Territory_In_Sales_Responsible.SalesPerson_Purchaser_Code=SUBSTRING([entity_code],1,5) COLLATE Latin1_General_CI_AS
INNER JOIN dbo.questions Question_Header
ON Question_Header.question_code = QH.question_code
WHERE [entity_code] like '%.USER%'
AND Question_Header.Question_Code IN('AME01','ASE01','ACO01','ALU01','AOS01','APH01','ATR01','ATE01','ACR06','ACR05','ACR02','ACR03','ACR08','ACR07')
AND CONVERT(datetime,DATEADD(day, (qh.cycle_day-1), p.start_date),6) = '11/9/2007'
) Non_Customer_Activities
ON Sales_Group.Code = Non_Customer_Activities.SR_Territory_Code
UNION ALL
SELECT
Customer_Activities.Customer_Code,
NULL,
NULL,
Region AS Region,
Name AS Territory_Name,
Customer_Activities.Customer_Name AS Store_Name,
Customer_Activities.Logged_Time AS TheDate,
NULL AS Response,
is_Visit_Fg
FROM [FSSRC].[dbo].Qry_Sales_Group Sales_Group
INNER JOIN
(Select distinct time_log Logged_Time
,[entity_code] Customer_Code
,[name] Customer_Name
,Territory_Code Cust_Territory_Code
,MAX(is_Visit_Fg) Is_Visit_Fg
From question_history QH
INNER JOIN Period P
ON p.period_code = qh.period_code
INNER JOIN dbo.questions Question_Header
ON Question_Header.question_code = QH.question_code
INNER JOIN [FSSRC].[dbo].[customer]
ON Entity_Code = [customer_code]
INNER JOIN [FSSRC].[dbo].[visit] V
ON V.[customer_code] = QH.[entity_code]
AND V.[period_code] = QH.[period_code]
AND V.[cycle_day] = QH.[cycle_day]
INNER JOIN [RC_DWDB_INSTANCE_1].[dbo].[Tbl_Territory_In_Sales_Responsible] as Territory_In_Sales_Responsible
ON Territory_In_Sales_Responsible.SalesPerson_Purchaser_Code=[sales_person_code] COLLATE Latin1_General_CI_AS
WHERE [entity_code] NOT like '%.USER%'
AND Convert(datetime,convert(Varchar,time_log,110)) = '11/9/2007'

GROUP BY
time_log
,[entity_code]
,[name]
,Territory_Code
) Customer_Activities
ON Sales_Group.Code = Customer_Activities.Cust_Territory_Code
WHERE @Region_Key=Region_Key
order by 4
END
 
 

View Replies !
What's Difference About Datatype &"Char,VarChar,NChar,NVarChar In Sql 2000 ?
Hi All:
         I am new to Sql 2000 database,Now  I'm planing to create a table in my databse,my table included below fields like this :
       PoNo(the length is 15 characters) ,Supplier Name(the length is 50 characters).etc
      but I don't how to select the datatype for them. should I  select  Char or VarChar ?
      which one is the best slection ?
  thans in advanced!
 
 
         
    

View Replies !
What Is The Difference Between Updating Null Value Vs Empty String To Varchar/char Field?
Hi,
What is the difference updating a null value  to char/varchar type column

 versus empty string to char/varchar type column?Which is the best to do and why?
Could anyone explain about this?
 
Example:
 
Table 1 : tCountry  - Name varchar(80) nullable
Table 2 :tState      - Name char(2) nullable
Table 3 :tCountryDetails  - countryid,state (char(2) nullable) - May the country contain state or no state
So,when the state is not present for the country ,i have two options may be - null,''
tCountryDetails.State = '' or tCountryDetails.State = null?

View Replies !
Employing XML Formatted String Data Rather Than Normal String(char(), Nchar() Or Varchar() Values
Hello,
Is there a way of passing in an xml formatted string or text to the report through a data set and have the textbox or table in which it displays keep the formatting specified in the xml string rather than in the textbox properties?
 
Thanks.

View Replies !
Replace Text In Text, Char && Varchar Fields All At Once?
I have followed many tutorials on selecting and replacing text in text fields, varchar fields and char fields, but I have yet to find a single script that will to all 3 based on field type. Let's assume for a moment that I don't know where all in my database a certain value that I need changed resides ... i.e., the data's tablename and fieldname. How would I go about doing the following ... or more importantly, is this even possible in a SQL only procedure?1) Loop over entire database and get all user tables2) Loop over all user tables and get all fields3) Loop over all fields and determine the field type4) switch between field types and change a string of text from 'a' to 'b'Please be gentle, I'm a procedure newb.

View Replies !
Is It Possible To Prevent Databases From Being Copied?
Hi,

We have a point of sale application (C# .NET 2.0) and a Sql Server 2005 database back end.

Our customers are concerned that employees could create a backup of the SQL Server database (or even of the MDF file) and use it to steel customer data.

Very often, the application is running on a single PC in a shop using Sql Server Express Edition 2005 under Windows XP. The users usually log on as local administrator. It's hard for us to force our customers to change their local security policies.

Ideally, I would like some form of security mechanism that prevents a backup from being restored on to another PC without either a password or some other form of authentication.

Is this possible?

Regards,

 

Sigol.

View Replies !
Attach Db File Copied Previously
I got a mdf file from my co-workerwho just stopped SQL server and delete ldf fileand give me a mdf file.if it was detached, it would work finebut it was just copied.Is there any way to attach this mdf file?I tried sp_attach_db and sp_attach_single_file_dband both failed.thanks,

View Replies !
Different Results Same Query Between Original And Copied Db
Hi all,

I restored a backup of a database running SQL Server in W2K to my own laptop (Windows XP) for report testing pourposes. The restore worked perfectly, but when I ran the store procedure that returns my "report" set I noticed that several of the fields within the result set are different, the number of rows and customers are a perfect match to the production report. The fields that are different are calculated fields that invoque a user defined function, which again are exactly the same on both databases. I tried dropping the stored procedure and the 4 functions and recreating them again but I get the same results, the number of rows, the customers and all "non" function calculated fields are perfect, only the fields calculated with the functions are wrong.

Has anybody seen this behavior?

Thanks for your help

Luis Torres

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved