Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Thursday, March 29, 2012

Converting Desktop Engine to SQL Server 2005

I have got SQL Server Desktop Engine running with 2 database and I need

to install the evaluation version of SQL Server 2005 instead. A

straight upgrade does not seem to be possible. Does someone know if

backing up the databases, uninstalling the desktop engine, installing

SQL Server 2005 and then importing/restoring the databases would be an

option to look into?

Here is an article on Upgradeing MSDE to SQL 2005 Express, you could follow this example then it is an easy upgrade to the Full SQL 2005 Product.

sqlsql

Converting database to MS-SQLServer from PostGRESQL

Forgive me if this question is a bit too generic, if it is, feel free to
just not respond.

I have a database which has been running in PostgreSQL for a number of
years at this stage which I want to port into MS SQL server.

It seems that the SQL that Postgre outputs when I do a backup is not
syntactically correct within MS-SQL server.

My question is, does anyone have any documentation on how to convert a
database from the Postgre platform to SQL server? Is it possible using
an ODBC connection to import a database structure including table
definitions, views etc into SQL Server?

Failing this, does anyone have any suggestions on where I might start -
I did attempt to go through the SQL code and modify it to suit SQL
server, but it's about 3,500 lines of code excluding the insert
statements (which themselves are also wrong) and almost every line needs
something changed when comparing SQL syntax from Postgre to MSSQL server

Thanks in advance for any comments/suggestions.

Engada.

--
Posted via a free Usenet account from http://www.teranews.comEngada wrote:

Quote:

Originally Posted by

I have a database which has been running in PostgreSQL for a number of
years at this stage which I want to port into MS SQL server.
>
It seems that the SQL that Postgre outputs when I do a backup is not
syntactically correct within MS-SQL server.


pg_dump has a number of flags that may help, e.g. --inserts

What specific types of syntax errors do you encounter?

Googling (PostgreSQL export) turns up some third-party programs designed
to simplify this type of port.

Tuesday, March 27, 2012

Converting data to UPPERCASE

Setup: SQL2000 Server running on Win2k Server
I can't find any difinitive answer to this. I need to convert the data in a
column to uppercase. Do I simply change the collation from the default of
SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can
I
do this while the database is being replicated?
Thanks in advance for your help.
John SteenNo, changing case sensitivity will no change the casing of the data.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:DBF3F536-9B8A-4426-B03D-C1647EDF170B@.microsoft.com...
> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in
a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And ca
n I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>|||Why can't you just do an update?
UPDATE Table
SET col1 = upper(col1)|||John,
You have to update the column.
update t1
set c1 = upper(c1)
Changing the collation does not change the data.
AMB
"John Steen" wrote:

> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in
a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And ca
n I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>|||Thanks, Alejandro. I was thinking that I not only had to change the
collation, but also reimport the data. This way makes more sense.
But back to the collation -- will changing it to
SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
Thanks,
John Steen
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> John,
> You have to update the column.
> update t1
> set c1 = upper(c1)
> Changing the collation does not change the data.
>
> AMB
> "John Steen" wrote:
>|||> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
No. Seems you misunderstand what collations are. Where did you learn that an
y type of collation will
force only uppercase data?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...[vbcol=seagreen]
> Thanks, Alejandro. I was thinking that I not only had to change the
> collation, but also reimport the data. This way makes more sense.
> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
> Thanks,
> John Steen
>
> "Alejandro Mesa" wrote:
>|||No that wopn't force anything, you could however do this thru a instead
of trigger or from the front-end
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||I couldn't find a good explanation, so it was an inferrence on my part.
Thanks,
John Steen
"Tibor Karaszi" wrote:

> No. Seems you misunderstand what collations are. Where did you learn that
any type of collation will
> force only uppercase data?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
> news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...
>
>|||Thanks, Denis. I'll convert the current data and mention the trigger to our
developer.
John Steen
"SQL" wrote:

> No that wopn't force anything, you could however do this thru a instead
> of trigger or from the front-end
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>sqlsql

Converting data to UPPERCASE

Setup: SQL2000 Server running on Win2k Server
I can't find any difinitive answer to this. I need to convert the data in a
column to uppercase. Do I simply change the collation from the default of
SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
do this while the database is being replicated?
Thanks in advance for your help.
John Steen
No, changing case sensitivity will no change the casing of the data.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:DBF3F536-9B8A-4426-B03D-C1647EDF170B@.microsoft.com...
> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>
|||Why can't you just do an update?
UPDATE Table
SET col1 = upper(col1)
|||John,
You have to update the column.
update t1
set c1 = upper(c1)
Changing the collation does not change the data.
AMB
"John Steen" wrote:

> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>
|||Thanks, Alejandro. I was thinking that I not only had to change the
collation, but also reimport the data. This way makes more sense.
But back to the collation -- will changing it to
SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
Thanks,
John Steen
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> John,
> You have to update the column.
> update t1
> set c1 = upper(c1)
> Changing the collation does not change the data.
>
> AMB
> "John Steen" wrote:
|||> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
No. Seems you misunderstand what collations are. Where did you learn that any type of collation will
force only uppercase data?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...[vbcol=seagreen]
> Thanks, Alejandro. I was thinking that I not only had to change the
> collation, but also reimport the data. This way makes more sense.
> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
> Thanks,
> John Steen
>
> "Alejandro Mesa" wrote:
|||No that wopn't force anything, you could however do this thru a instead
of trigger or from the front-end
Denis the SQL Menace
http://sqlservercode.blogspot.com/
|||I couldn't find a good explanation, so it was an inferrence on my part.
Thanks,
John Steen
"Tibor Karaszi" wrote:

> No. Seems you misunderstand what collations are. Where did you learn that any type of collation will
> force only uppercase data?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
> news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...
>
>
|||Thanks, Denis. I'll convert the current data and mention the trigger to our
developer.
John Steen
"SQL" wrote:

> No that wopn't force anything, you could however do this thru a instead
> of trigger or from the front-end
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>

Converting data to UPPERCASE

Setup: SQL2000 Server running on Win2k Server
I can't find any difinitive answer to this. I need to convert the data in a
column to uppercase. Do I simply change the collation from the default of
SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
do this while the database is being replicated?
Thanks in advance for your help.
John SteenNo, changing case sensitivity will no change the casing of the data.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:DBF3F536-9B8A-4426-B03D-C1647EDF170B@.microsoft.com...
> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>|||Why can't you just do an update?
UPDATE Table
SET col1 = upper(col1)|||John,
You have to update the column.
update t1
set c1 = upper(c1)
Changing the collation does not change the data.
AMB
"John Steen" wrote:
> Setup: SQL2000 Server running on Win2k Server
> I can't find any difinitive answer to this. I need to convert the data in a
> column to uppercase. Do I simply change the collation from the default of
> SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> do this while the database is being replicated?
> Thanks in advance for your help.
> John Steen
>|||Thanks, Alejandro. I was thinking that I not only had to change the
collation, but also reimport the data. This way makes more sense.
But back to the collation -- will changing it to
SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
Thanks,
John Steen
"Alejandro Mesa" wrote:
> John,
> You have to update the column.
> update t1
> set c1 = upper(c1)
> Changing the collation does not change the data.
>
> AMB
> "John Steen" wrote:
> > Setup: SQL2000 Server running on Win2k Server
> >
> > I can't find any difinitive answer to this. I need to convert the data in a
> > column to uppercase. Do I simply change the collation from the default of
> > SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> > do this while the database is being replicated?
> >
> > Thanks in advance for your help.
> >
> > John Steen
> >|||> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
No. Seems you misunderstand what collations are. Where did you learn that any type of collation will
force only uppercase data?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...
> Thanks, Alejandro. I was thinking that I not only had to change the
> collation, but also reimport the data. This way makes more sense.
> But back to the collation -- will changing it to
> SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
> Thanks,
> John Steen
>
> "Alejandro Mesa" wrote:
>> John,
>> You have to update the column.
>> update t1
>> set c1 = upper(c1)
>> Changing the collation does not change the data.
>>
>> AMB
>> "John Steen" wrote:
>> > Setup: SQL2000 Server running on Win2k Server
>> >
>> > I can't find any difinitive answer to this. I need to convert the data in a
>> > column to uppercase. Do I simply change the collation from the default of
>> > SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
>> > do this while the database is being replicated?
>> >
>> > Thanks in advance for your help.
>> >
>> > John Steen
>> >|||No that wopn't force anything, you could however do this thru a instead
of trigger or from the front-end
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||I couldn't find a good explanation, so it was an inferrence on my part.
Thanks,
John Steen
"Tibor Karaszi" wrote:
> > But back to the collation -- will changing it to
> > SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
> No. Seems you misunderstand what collations are. Where did you learn that any type of collation will
> force only uppercase data?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "John Steen" <moderndads(nospam)@.hotmail.com> wrote in message
> news:A4B10FFD-8460-4E79-BFB9-4030E87EF618@.microsoft.com...
> > Thanks, Alejandro. I was thinking that I not only had to change the
> > collation, but also reimport the data. This way makes more sense.
> >
> > But back to the collation -- will changing it to
> > SQL_Latin1_General_Pref_CP1_CI_AS force new data to be uppercase?
> >
> > Thanks,
> > John Steen
> >
> >
> > "Alejandro Mesa" wrote:
> >
> >> John,
> >>
> >> You have to update the column.
> >>
> >> update t1
> >> set c1 = upper(c1)
> >>
> >> Changing the collation does not change the data.
> >>
> >>
> >> AMB
> >>
> >> "John Steen" wrote:
> >>
> >> > Setup: SQL2000 Server running on Win2k Server
> >> >
> >> > I can't find any difinitive answer to this. I need to convert the data in a
> >> > column to uppercase. Do I simply change the collation from the default of
> >> > SQL_Latin1_General_Cp1_CI_AS to SQL_Latin1_General_Pref_CP1_CI_AS? And can I
> >> > do this while the database is being replicated?
> >> >
> >> > Thanks in advance for your help.
> >> >
> >> > John Steen
> >> >
>
>|||Thanks, Denis. I'll convert the current data and mention the trigger to our
developer.
John Steen
"SQL" wrote:
> No that wopn't force anything, you could however do this thru a instead
> of trigger or from the front-end
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>

Converting Clipper .DBF tables to SQL Server 2000

My company is running a large Clipper application using Advantage Database
Server 6.2 as the backend. We have .DBF tables. We have 6 major retail
markets with over 200 tables in each folder (market).
I am looking for an easy (if that is possible) way to convert these .DBF
tables into SQL Server. In the query analyzer I have created 6 linked server
connections to each of the folders. I am able to do selects from any table
using the OpenQuery function. I have heard mention of DTS but I have no idea
what that is.
Can anyone suggest an easy way to convert these tables over? Also in some
cases its not going to be just a straight column to column data transfer. I
made need to combine data from 2 or 3 more tables on the Clipper side to mak
e
one column on the SQL Server side.
Any help would be appreciated.
David Cuffee
Sleep Train Inc.
Software DeveloperYes, you can use the DTS wizzard to import the dbf files without going
through Query Analyzer commands.
However, if you already are at the point of selecting from the tables
via OpenQuery, then you also have the option of selecting a rowset directly
into a SQL Server table using INSERT INTO. For example: "insert into
MySqlTable select a, b, c from MyDbfTable". If you know SQL, then this
method will make it easy to specify columns in proper order, combine,
transform, etc. as needed.
"David C via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:5298807695596@.webservertalk.com...
> My company is running a large Clipper application using Advantage Database
> Server 6.2 as the backend. We have .DBF tables. We have 6 major retail
> markets with over 200 tables in each folder (market).
> I am looking for an easy (if that is possible) way to convert these .DBF
> tables into SQL Server. In the query analyzer I have created 6 linked
> server
> connections to each of the folders. I am able to do selects from any table
> using the OpenQuery function. I have heard mention of DTS but I have no
> idea
> what that is.
> Can anyone suggest an easy way to convert these tables over? Also in some
> cases its not going to be just a straight column to column data transfer.
> I
> made need to combine data from 2 or 3 more tables on the Clipper side to
> make
> one column on the SQL Server side.
> Any help would be appreciated.
> David Cuffee
> Sleep Train Inc.
> Software Developer|||Thank JT. My brain must have not been thinking. Using the INSERT method with
the SELECT is very good way to do this. now that I have the OpenQuery workin
g.
Thank you very much.
David
JT wrote:
> Yes, you can use the DTS wizzard to import the dbf files without going
>through Query Analyzer commands.
> However, if you already are at the point of selecting from the tables
>via OpenQuery, then you also have the option of selecting a rowset directly
>into a SQL Server table using INSERT INTO. For example: "insert into
>MySqlTable select a, b, c from MyDbfTable". If you know SQL, then this
>method will make it easy to specify columns in proper order, combine,
>transform, etc. as needed.
>
>[quoted text clipped - 20 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200508/1

Thursday, March 22, 2012

Converting a RS 2000 reporting solution to RS 2005

I currently have a RS 2000 solution running on SQL 2000 database, AS
2000 and RS 2000.
I want to migrate this solution to the same schema running on a SQL
2005 database and AS 2005 with RS 2005.
Please kindly explain the best way I can accomplish this migration.
Thanks
KarenHi Karen,
I had a same problem few months before and I had to made it manually using
RSScripter (http://www.sqldbatips.com/samples/code/RSScripter/RSScripter.zip) for
collecting items and then manually upgrade and deploy with Visual Studio 2005.
Kind regards,
Zoran
"KarenM" <karenmiddleol@.yahoo.com> wrote in news:1159353990.309207.67240
@.m7g2000cwm.googlegroups.com:
> I currently have a RS 2000 solution running on SQL 2000 database, AS
> 2000 and RS 2000.
> I want to migrate this solution to the same schema running on a SQL
> 2005 database and AS 2005 with RS 2005.
> Please kindly explain the best way I can accomplish this migration.
> Thanks
> Karen
>

Monday, March 19, 2012

Convert varchar to decimal

Hello, I am running a SELECT statement on a varchar 50 field. I would like
to convert the output to a numeric field with 2 decimal places. I tried a
CAST but that didn't work. Any suggestions would be appreciated. Thanks,
Pancho."Pancho" <Pancho@.discussions.microsoft.com> wrote in message
news:41493A88-38CF-4F3C-8237-34B51AF3202F@.microsoft.com...
> Hello, I am running a SELECT statement on a varchar 50 field. I would
> like
> to convert the output to a numeric field with 2 decimal places. I tried a
> CAST but that didn't work. Any suggestions would be appreciated. Thanks,
> Pancho.
Not knowing the largest decimal value you might wish to display, you could
do something like this:
SELECT CONVERT(<varchar field>, dec(10,2)) AS FieldName
FROM TableName
This will allow a total of 10 digits with 2 on the right of the decimal
point.
Rick Sawtell
MCT, MCSD, MCDBA|||Hi Pancho,
What didn't work?
Did you receive an error message?
If so, what?
If not, show us your code.
"Pancho" <Pancho@.discussions.microsoft.com> wrote in message
news:41493A88-38CF-4F3C-8237-34B51AF3202F@.microsoft.com...
> Hello, I am running a SELECT statement on a varchar 50 field. I would
> like
> to convert the output to a numeric field with 2 decimal places. I tried a
> CAST but that didn't work. Any suggestions would be appreciated. Thanks,
> Pancho.|||Rick,
I tried CONVERT(FieldValue7, (dec(10,2)) AS NewFieldName
and got:
'dec' is not a recognized function name
Got the same error using 'decimal'. I am running a successful
SELECT CONVERT (CHAR (8), Field8, 112) AS Field8Text but the dec didn't work
.
"Rick Sawtell" wrote:

> "Pancho" <Pancho@.discussions.microsoft.com> wrote in message
> news:41493A88-38CF-4F3C-8237-34B51AF3202F@.microsoft.com...
>
> Not knowing the largest decimal value you might wish to display, you could
> do something like this:
> SELECT CONVERT(<varchar field>, dec(10,2)) AS FieldName
> FROM TableName
>
> This will allow a total of 10 digits with 2 on the right of the decimal
> point.
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Hi Raymond,
I got the msg "Unable to convert varchar field" when using CAST. I am
taking data from a varchar and trying to format it to a numeric field, 10
wide with 2 decimal spaces. Pls see code above in my reply to Rick. Thanks
,
Pancho.
"Raymond D'Anjou" wrote:

> Hi Pancho,
> What didn't work?
> Did you receive an error message?
> If so, what?
> If not, show us your code.
> "Pancho" <Pancho@.discussions.microsoft.com> wrote in message
> news:41493A88-38CF-4F3C-8237-34B51AF3202F@.microsoft.com...
>
>|||> Hello, I am running a SELECT statement on a varchar 50 field. I would
> like
> to convert the output to a numeric field with 2 decimal places. I tried a
> CAST but that didn't work.
What does "didn't work" mean? What did you try? Are you sure all of the
values are really numeric and can be converted? If so, why are you storing
them in a VARCHAR(50) column?|||> I tried CONVERT(FieldValue7, (dec(10,2)) AS NewFieldName
> and got:
> 'dec' is not a recognized function name
Did you try using the right syntax?
NewFieldName = CONVERT(DECIMAL(10,2), FieldValue7)|||> I got the msg "Unable to convert varchar field" when using CAST.
Well, because you decided to use a VARCHAR(50) to store decimals, invariably
you will get varchar data that is not a decimal.
You shouldn't be really surprised by this.
A start would be to filter out the rows where ISNUMERIC(column_name) = 0.
However, ISNUMERIC() is not perfect either, see http://www.aspfaq.com/2390
Then, try cleaning up your data and fixing the data type. When you do that,
you won't need to do a convert at all.|||You got me. I didn't design this DB; a vendor did. I would not have stored
a field which has cash values as a varchar either. I'm trying to convert it
from one vendor to another.
Thanks everyone for your comments. I'm closing this one now.
"Aaron Bertrand [SQL Server MVP]" wrote:

> What does "didn't work" mean? What did you try? Are you sure all of the
> values are really numeric and can be converted? If so, why are you storin
g
> them in a VARCHAR(50) column?
>
>|||"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OfuNFSyXGHA.4388@.TK2MSFTNGP03.phx.gbl...
> Did you try using the right syntax?
> NewFieldName = CONVERT(DECIMAL(10,2), FieldValue7)
>
Ooops.. Got it backwards. Thanks Aaron.
Rick

convert varchar to decimal

When running this query, several records are returned but then sql server gives the follwing error. Can you see how it can be solved please? Thanks

select
case
when isnumeric([Column 9]) = 1 then convert(decimal(24, 4), [Column 9])
else
null
end
from
tblCEMTradeFeed

Error:

Error converting data type varchar to numeric.

You can not trust function ISNUMERIC a 100%. This function returns 1 also for values like '.', '2E3' (scientific notation), '+', '-', but not all of them can be conevrted to numeric data type.

select cast('2E3' as float)

go

select cast('2E3' as numeric(5, 2))

go

What is wrong with IsNumeric()?

http://classicasp.aspfaq.com/general/what-is-wrong-with-isnumeric.html

AMB

|||How do I fix the sql then please?|||

The following expression might fix a issue,

Note:

Is numeric function will return true for “.”, “$” & etc.

Code Snippet

case when

isnumeric([Column 9]) = 1

and patindex('%[0-9]%',[column 9]) <> 0

then convert(decimal(24, 4), [Column 9])

else

null

end

|||

Hi Manivannan.D.Sekaran,

I guess the OP is expecting a decimal separator in the data, if not, why to convert to numeric(24, 4).

I think that the expression:

> and patindex('%[0-9]%',[column 9]) <> 0

will not yield the expected result. The following value will cause an error '2E3'.

select

case

when isnumeric([Column 9]) = 1 and patindex('%[0-9]%',[Column 9]) <> 0 then convert(decimal(24, 4), [Column 9])

else null end

from

(select '2E3' as [Column 9]) as t

go

AMB

|||

Did you check the link I attached to the post?

AMB

|||

Hi HUNCHBACK (padern me i can't able to get your orginal name),

Yes I agree with you. I hope STR should be a right choice to convert the string to decimal

Code Snippet

select

[Column 9],

Case When

patindex('%[0-9]%',[Column 9])<>0

Then

Case When

Isnumeric(str(replace([Column 9],'$',''),24,4)) =1

Then Cast(str(replace([Column 9],'$',''),24,4) as Numeric(24,4))

End

End

from

(

select '2E3' as [Column 9]

Union All

select '2E24' as [Column 9]

Union All

select '2E80' as [Column 9]

Union All

select '100' as [Column 9]

Union All

select '.' as [Column 9]

Union All

select '$' as [Column 9]

Union All

select '$9' as [Column 9]

Union All

select '878.8373738' as [Column 9]

Union All

Select 'mani'

) as t

|||

Hi Manivannan.D.Sekaran,

Much better. Try adding:

(

...

union all

select '$9'

) as t

AMB

Thursday, March 8, 2012

Convert SQL Srv 2000 Enterprise to SQL Srv Standard?

We are running SQL Srv 2000 Enterprise on a production SQL Server but are not
using the Enterprise features and want to conver to SQL Srv 2000 Standard.
Is it possible to "downgrade" without doing a full reinstall of SQL Srv?
I thought that was the answer based on what I have read but was holding out
some hope.
We currently own an Enterprise license but when we renew our yearly
agreement (We have educational pricing from MSFT), we wnat to remove that
license and use just standard.
"Immy" wrote:

> I'm afraid there is no option to downgrade.
> You'd need to backup your databases, uninstall and re-install the SQL
> server.
> Note that there is a cost different between Standard and Enterprise. Not
> sure you can get any refunds back from MS on this, so why don't you just
> keep the Ent. Edition installed if you've already paid for it. You may need
> the features in the future?
> Immy
> "jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
> news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
>
>
|||i have a similar issue
i'm thinking of moving to the developer edition
does this move require uninstall then reinstall? is there more difference
between these editions than simply the license agreement?
"jcs0277" wrote:
[vbcol=seagreen]
> I thought that was the answer based on what I have read but was holding out
> some hope.
> We currently own an Enterprise license but when we renew our yearly
> agreement (We have educational pricing from MSFT), we wnat to remove that
> license and use just standard.
> "Immy" wrote:

Convert SQL Srv 2000 Enterprise to SQL Srv Standard?

We are running SQL Srv 2000 Enterprise on a production SQL Server but are no
t
using the Enterprise features and want to conver to SQL Srv 2000 Standard.
Is it possible to "downgrade" without doing a full reinstall of SQL Srv?I'm afraid there is no option to downgrade.
You'd need to backup your databases, uninstall and re-install the SQL
server.
Note that there is a cost different between Standard and Enterprise. Not
sure you can get any refunds back from MS on this, so why don't you just
keep the Ent. Edition installed if you've already paid for it. You may need
the features in the future?
Immy
"jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
> We are running SQL Srv 2000 Enterprise on a production SQL Server but are
> not
> using the Enterprise features and want to conver to SQL Srv 2000 Standard.
> Is it possible to "downgrade" without doing a full reinstall of SQL Srv?|||I thought that was the answer based on what I have read but was holding out
some hope.
We currently own an Enterprise license but when we renew our yearly
agreement (We have educational pricing from MSFT), we wnat to remove that
license and use just standard.
"Immy" wrote:

> I'm afraid there is no option to downgrade.
> You'd need to backup your databases, uninstall and re-install the SQL
> server.
> Note that there is a cost different between Standard and Enterprise. Not
> sure you can get any refunds back from MS on this, so why don't you just
> keep the Ent. Edition installed if you've already paid for it. You may nee
d
> the features in the future?
> Immy
> "jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
> news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
>
>|||i have a similar issue
i'm thinking of moving to the developer edition
does this move require uninstall then reinstall? is there more difference
between these editions than simply the license agreement?
"jcs0277" wrote:
[vbcol=seagreen]
> I thought that was the answer based on what I have read but was holding ou
t
> some hope.
> We currently own an Enterprise license but when we renew our yearly
> agreement (We have educational pricing from MSFT), we wnat to remove that
> license and use just standard.
> "Immy" wrote:
>

Convert SQL Srv 2000 Enterprise to SQL Srv Standard?

We are running SQL Srv 2000 Enterprise on a production SQL Server but are not
using the Enterprise features and want to conver to SQL Srv 2000 Standard.
Is it possible to "downgrade" without doing a full reinstall of SQL Srv?I'm afraid there is no option to downgrade.
You'd need to backup your databases, uninstall and re-install the SQL
server.
Note that there is a cost different between Standard and Enterprise. Not
sure you can get any refunds back from MS on this, so why don't you just
keep the Ent. Edition installed if you've already paid for it. You may need
the features in the future?
Immy
"jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
> We are running SQL Srv 2000 Enterprise on a production SQL Server but are
> not
> using the Enterprise features and want to conver to SQL Srv 2000 Standard.
> Is it possible to "downgrade" without doing a full reinstall of SQL Srv?|||I thought that was the answer based on what I have read but was holding out
some hope.
We currently own an Enterprise license but when we renew our yearly
agreement (We have educational pricing from MSFT), we wnat to remove that
license and use just standard.
"Immy" wrote:
> I'm afraid there is no option to downgrade.
> You'd need to backup your databases, uninstall and re-install the SQL
> server.
> Note that there is a cost different between Standard and Enterprise. Not
> sure you can get any refunds back from MS on this, so why don't you just
> keep the Ent. Edition installed if you've already paid for it. You may need
> the features in the future?
> Immy
> "jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
> news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
> > We are running SQL Srv 2000 Enterprise on a production SQL Server but are
> > not
> > using the Enterprise features and want to conver to SQL Srv 2000 Standard.
> > Is it possible to "downgrade" without doing a full reinstall of SQL Srv?
>
>|||i have a similar issue
i'm thinking of moving to the developer edition
does this move require uninstall then reinstall? is there more difference
between these editions than simply the license agreement?
"jcs0277" wrote:
> I thought that was the answer based on what I have read but was holding out
> some hope.
> We currently own an Enterprise license but when we renew our yearly
> agreement (We have educational pricing from MSFT), we wnat to remove that
> license and use just standard.
> "Immy" wrote:
> > I'm afraid there is no option to downgrade.
> > You'd need to backup your databases, uninstall and re-install the SQL
> > server.
> > Note that there is a cost different between Standard and Enterprise. Not
> > sure you can get any refunds back from MS on this, so why don't you just
> > keep the Ent. Edition installed if you've already paid for it. You may need
> > the features in the future?
> > Immy
> >
> > "jcs0277" <jcs0277@.discussions.microsoft.com> wrote in message
> > news:D88E3328-FCA2-4ED5-B4FF-92BD0538769C@.microsoft.com...
> > > We are running SQL Srv 2000 Enterprise on a production SQL Server but are
> > > not
> > > using the Enterprise features and want to conver to SQL Srv 2000 Standard.
> > > Is it possible to "downgrade" without doing a full reinstall of SQL Srv?
> >
> >
> >

Wednesday, March 7, 2012

Convert sql 7 file to msde 2000

is there any way I can convert a sql7 file to msde 2000.
I don't have sql 7 running, I have msde 2000 running
A detached SQL7 mdf file can be attached to SQL 2000 with an automatic
conversion to the newer platform. The same is true with backups.
Jim
"Slim" <Slim@.slim> wrote in message
news:uyGH7VIJEHA.2884@.TK2MSFTNGP12.phx.gbl...
> is there any way I can convert a sql7 file to msde 2000.
> I don't have sql 7 running, I have msde 2000 running
>
|||is this true for MSDE 2000, not sql 2000
"Jim Young" <thorium48@.hotmail.com> wrote in message
news:ezRsqfIJEHA.3704@.TK2MSFTNGP11.phx.gbl...
> A detached SQL7 mdf file can be attached to SQL 2000 with an automatic
> conversion to the newer platform. The same is true with backups.
> Jim
> "Slim" <Slim@.slim> wrote in message
> news:uyGH7VIJEHA.2884@.TK2MSFTNGP12.phx.gbl...
>
|||Yes, its the same for MSDE 2000.
Jim
"Slim" <Slim@.slim> wrote in message
news:eTwYwyIJEHA.232@.TK2MSFTNGP12.phx.gbl...
> is this true for MSDE 2000, not sql 2000
>
> "Jim Young" <thorium48@.hotmail.com> wrote in message
> news:ezRsqfIJEHA.3704@.TK2MSFTNGP11.phx.gbl...
>
|||Hi,
I read this thread and just want to be sure, because I have a similar problem.
I have the SQL 7 Version already running on my system, because I installed it with an application I can't identify yet.
Now I need to install MSDE2000A, because another (new to install) application demands it.
Do I have to uninstall SQL 7 before or will the installation of MSDE2000A upgrade SQL 7. Or will there be both working?
Will the old application run with the new MSDE?
I'd be happy to learn about all this.

convert SQL 2005 back to SQL 2000

Dear Sir,
Our new test environment running MS SQL 2005. We have finished an
application and need to migrate that to a live server which run SQL 2000.
I have tried enough but with no luck. How can I convert our new SQL 2005
back to 2000 server? The new database contain table schema and quiet some
initial data already. How should I do this?
regards,
Guoqi Zheng
http://www.ureader.com"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ur
eader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
There's no real easy way to do this.
Best bet is to script out the schema, bulk copy out the data and rebuild on
the new box.

> regards,
> Guoqi Zheng
> http://www.ureader.com|||You have to script out all of the objects and then transfer the data using
either BCP, DTS, or SSIS. A 2005 database can not be loaded into 2000 and
it can NOT be downgraded.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ur
eader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
> regards,
> Guoqi Zheng
> http://www.ureader.com|||It can be downgraded by setting the DB options to 80 compatibility level IF
the DB doesn't use any of the newer 2005 features.
However, I think it is a mistake to not just upgrade the other server to
2005. Upgrading takes so much work, and if the DB is already working in
2005, then why go through all the hassle downgrading and upgrading when that
same fundamental expense can be borne one time to just pay for the 2005
license.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:ec7TGrEYGHA.3328@.TK2MSFTNGP02.phx.gbl...
> You have to script out all of the objects and then transfer the data using
> either BCP, DTS, or SSIS. A 2005 database can not be loaded into 2000 and
> it can NOT be downgraded.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "guoqi zheng" <no@.sorry.com> wrote in message
> news:2ea036c11bb84a0eba336a26d25d5624@.ur
eader.com...
>|||Changing the database compatibility level will not allow Guoqi Zheng to go
back to SQL 2000. The on-disk database format will still be SQL 2005 and
will not be recognized by older versions of SQL Server.
Hope this helps.
Dan Guzman
SQL Server MVP
"AFN" <replywithingroup@.notreal.com> wrote in message
news:EL90g.3630$3W1.59@.tornado.socal.rr.com...
> It can be downgraded by setting the DB options to 80 compatibility level
> IF the DB doesn't use any of the newer 2005 features.
> However, I think it is a mistake to not just upgrade the other server to
> 2005. Upgrading takes so much work, and if the DB is already working in
> 2005, then why go through all the hassle downgrading and upgrading when
> that same fundamental expense can be borne one time to just pay for the
> 2005 license.
>
> "Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
> news:ec7TGrEYGHA.3328@.TK2MSFTNGP02.phx.gbl...
>|||If you're not using any SQL 2005 specific features, you can use
Transactional Replication to keep a warm SQL 2000 fallback option open.
Regards,
Greg Linwood
SQL Server MVP
"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ur
eader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
> regards,
> Guoqi Zheng
> http://www.ureader.com

convert SQL 2005 back to SQL 2000

Dear Sir,
Our new test environment running MS SQL 2005. We have finished an
application and need to migrate that to a live server which run SQL 2000.
I have tried enough but with no luck. How can I convert our new SQL 2005
back to 2000 server? The new database contain table schema and quiet some
initial data already. How should I do this?
regards,
Guoqi Zheng
http://www.ureader.com"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ureader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
There's no real easy way to do this.
Best bet is to script out the schema, bulk copy out the data and rebuild on
the new box.
> regards,
> Guoqi Zheng
> http://www.ureader.com|||You have to script out all of the objects and then transfer the data using
either BCP, DTS, or SSIS. A 2005 database can not be loaded into 2000 and
it can NOT be downgraded.
--
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ureader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
> regards,
> Guoqi Zheng
> http://www.ureader.com|||It can be downgraded by setting the DB options to 80 compatibility level IF
the DB doesn't use any of the newer 2005 features.
However, I think it is a mistake to not just upgrade the other server to
2005. Upgrading takes so much work, and if the DB is already working in
2005, then why go through all the hassle downgrading and upgrading when that
same fundamental expense can be borne one time to just pay for the 2005
license.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:ec7TGrEYGHA.3328@.TK2MSFTNGP02.phx.gbl...
> You have to script out all of the objects and then transfer the data using
> either BCP, DTS, or SSIS. A 2005 database can not be loaded into 2000 and
> it can NOT be downgraded.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "guoqi zheng" <no@.sorry.com> wrote in message
> news:2ea036c11bb84a0eba336a26d25d5624@.ureader.com...
>> Dear Sir,
>> Our new test environment running MS SQL 2005. We have finished an
>> application and need to migrate that to a live server which run SQL 2000.
>> I have tried enough but with no luck. How can I convert our new SQL 2005
>> back to 2000 server? The new database contain table schema and quiet some
>> initial data already. How should I do this?
>> regards,
>> Guoqi Zheng
>> http://www.ureader.com
>|||Changing the database compatibility level will not allow Guoqi Zheng to go
back to SQL 2000. The on-disk database format will still be SQL 2005 and
will not be recognized by older versions of SQL Server.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"AFN" <replywithingroup@.notreal.com> wrote in message
news:EL90g.3630$3W1.59@.tornado.socal.rr.com...
> It can be downgraded by setting the DB options to 80 compatibility level
> IF the DB doesn't use any of the newer 2005 features.
> However, I think it is a mistake to not just upgrade the other server to
> 2005. Upgrading takes so much work, and if the DB is already working in
> 2005, then why go through all the hassle downgrading and upgrading when
> that same fundamental expense can be borne one time to just pay for the
> 2005 license.
>
> "Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
> news:ec7TGrEYGHA.3328@.TK2MSFTNGP02.phx.gbl...
>> You have to script out all of the objects and then transfer the data
>> using either BCP, DTS, or SSIS. A 2005 database can not be loaded into
>> 2000 and it can NOT be downgraded.
>> --
>> Mike
>> http://www.solidqualitylearning.com
>> Disclaimer: This communication is an original work and represents my sole
>> views on the subject. It does not represent the views of any other
>> person or entity either by inference or direct reference.
>>
>> "guoqi zheng" <no@.sorry.com> wrote in message
>> news:2ea036c11bb84a0eba336a26d25d5624@.ureader.com...
>> Dear Sir,
>> Our new test environment running MS SQL 2005. We have finished an
>> application and need to migrate that to a live server which run SQL
>> 2000.
>> I have tried enough but with no luck. How can I convert our new SQL 2005
>> back to 2000 server? The new database contain table schema and quiet
>> some
>> initial data already. How should I do this?
>> regards,
>> Guoqi Zheng
>> http://www.ureader.com
>>
>|||If you're not using any SQL 2005 specific features, you can use
Transactional Replication to keep a warm SQL 2000 fallback option open.
Regards,
Greg Linwood
SQL Server MVP
"guoqi zheng" <no@.sorry.com> wrote in message
news:2ea036c11bb84a0eba336a26d25d5624@.ureader.com...
> Dear Sir,
> Our new test environment running MS SQL 2005. We have finished an
> application and need to migrate that to a live server which run SQL 2000.
> I have tried enough but with no luck. How can I convert our new SQL 2005
> back to 2000 server? The new database contain table schema and quiet some
> initial data already. How should I do this?
> regards,
> Guoqi Zheng
> http://www.ureader.com

Convert Smalldatetime

Hello everyone. I am running into some small problems converting a smalldatetime field. I currently have 2005-10-17 00:00:00
in the field but what it to have forward slashes instead of th dash. I tried a few convert methods but not successful.

Does anyone have any ideas on how to make this work?

All help is appreciated.Hello everyone. I am running into some small problems converting a smalldatetime field. I currently have 2005-10-17 00:00:00
in the field but what it to have forward slashes instead of th dash. I tried a few convert methods but not successful.

Does anyone have any ideas on how to make this work?

All help is appreciated.

Try convert(varchar(10), getdate(), 111)

Regards,

hmscott|||Try convert(varchar(10), getdate(), 111)

Regards,

hmscott

Thanks Again. I worked just fine.|||WHY...do you want to conver the datetime value in the first place? Or are you just trying to truncate off the time portion, in which case this method is faster if less intuitive:
select dateadd(day, datediff(day, 0, getdate()), 0)

Friday, February 24, 2012

Convert mssql file

I am running mssql server for a sharepoint site. I have a mssql .bak file
that needs to be converted to plain text sql queries.
Is it possible to convert it somehow?
You have to restore it (in SQL Server) and query its with SQL Server or pump
the data out to some more propetary format liek access.
HTH, Jens Suessmeyer.
"Nick Mirro" <dirdx@.comcast.net> schrieb im Newsbeitrag
news:utFWDpuVFHA.3488@.TK2MSFTNGP10.phx.gbl...
>I am running mssql server for a sharepoint site. I have a mssql .bak file
>that needs to be converted to plain text sql queries.
> Is it possible to convert it somehow?
>

Convert mssql file

I am running mssql server for a sharepoint site. I have a mssql .bak file
that needs to be converted to plain text sql queries.
Is it possible to convert it somehow?
You have to restore it (in SQL Server) and query its with SQL Server or pump
the data out to some more propetary format liek access.
HTH, Jens Suessmeyer.
"Nick Mirro" <dirdx@.comcast.net> schrieb im Newsbeitrag
news:utFWDpuVFHA.3488@.TK2MSFTNGP10.phx.gbl...
>I am running mssql server for a sharepoint site. I have a mssql .bak file
>that needs to be converted to plain text sql queries.
> Is it possible to convert it somehow?
>

Tuesday, February 14, 2012

convert from db2 to sqlserver

I have an application running in db2 udb v7.2 fp7. there are 76 tables for this app. i want to convert all these tables over to sqlserver 2000. what is the easiest method to get the data from db2 to sqlserver??It depends on easiest for who...

Is the schema complex or simple (foreign keys, constraints, etc)? What is the DB2 device topography? Are there 100 rows of data, or 100 billion?

Too many questions!

-PatP|||I am going to reinstall the app in sql server. the files are not large a couple thousand rows is the largest. i just want to move the data. the ri is good, as they sit in db2 currently.|||Try this tool :

http://www.swissql.com/products/datamigration/data-migration.html|||There is actually a tool in the SQL Server Resource Kit that does a pretty good job. You might want to check it out.

-PatP|||Why would anyone want to move away from DB2?

Friday, February 10, 2012

convert datatype from db2 to sql

i am running a package which extracts result of count(x), count(y),sum(z) from db2(as400) servers

i want to store the result of all the three in a table to a column of datatype varchar(25).

can someone help me with the convert/cast function in db2 which i can include in the query.

something like : select cast(count(x) as varchar(25)) from lib.file

No, but we can help you use SSIS to convert them...

Have you searched IBM's site for a SQL reference document containing commands?|||

yaa Phil,even i thought it is better to use a data converter transformation.

the problem iam running into is iam trying to store int and decimal datatypes into the same output column.

which is a varchar.

the convertor works fine for int datatype but is giving error for decimal.

"datatype of output column 'colname' doesnot mach with the datatype 'system.decimal' of the source column 'columnname' "

"component DataReaderSource failed validation and returned validation status VS_NEEDSNEWMETADATA"

what i understand is it not problem with the conver transformation its problem with the data source reader.

let me be more clear i have 6 querys running agains AS400 in a loop 1,2,4,5 querys give output in int and querys 3,6 give output numeric.

when i put each of this querys(1,2,4,5) in datasource reader the output datasource reader pics DT_I4 as the result datatype and for querys 3,6 it pics DT_NUMERIC

i think i am left with option to change in the query itself

help needed.... thanks in advance