Thursday, March 29, 2012

Convert an Access database to SQL

I've seen software that claims it can convert an Access database into SQL one. Does anyone know how this works? Does Microsoft have a solution for this
I've only used Access databases and need to develop one with more power. For developing all I need is the developers edition right? My hosting server does have SQL
Thanks for helping a SQL newbi
JoyceAccess has an Upsizing Wizard to migrate an Access database
to SQL Server - you can find information on this in the
Access help files. You can also use DTS (Data Transformation
Services) in SQL Server to migrate your Access data to SQL
Server.
For the situation you describe and just using SQL Server for
development, the developers edition would be fine.
-Sue
On Tue, 11 May 2004 18:51:02 -0700, jje
<jevans1@.verizon.net> wrote:
>I've seen software that claims it can convert an Access database into SQL one. Does anyone know how this works? Does Microsoft have a solution for this?
>I've only used Access databases and need to develop one with more power. For developing all I need is the developers edition right? My hosting server does have SQL.
>Thanks for helping a SQL newbie
>Joyce|||Thank you so much for the quick answer.|||Some other resources here, as well:
http://www.aspfaq.com/2182
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"jje" <jevans1@.verizon.net> wrote in message
news:78ADFC44-20D8-42B8-AEDF-7496B10BDCC2@.microsoft.com...
> I've seen software that claims it can convert an Access database into SQL
> one. Does anyone know how this works? Does Microsoft have a solution for
> this?
> I've only used Access databases and need to develop one with more power.
> For developing all I need is the developers edition right? My hosting
> server does have SQL.
> Thanks for helping a SQL newbie
> Joyce|||On Tue, 11 May 2004 18:51:02 -0700, jje <jevans1@.verizon.net> wrote:
>Thanks for helping a SQL newbie
Something to note just in case...Upsizing will only transfer your data
to SQL Server. You'll essentially have a front-end/back-end where you
use Access' Forms and Reports using SQL Server tables, stored
procedures and views.
Lerchsqlsql

Convert an Access database to SQL

I've seen software that claims it can convert an Access database into SQL on
e. Does anyone know how this works? Does Microsoft have a solution for this?
I've only used Access databases and need to develop one with more power. For
developing all I need is the developers edition right? My hosting server do
es have SQL.
Thanks for helping a SQL newbie
JoyceAccess has an Upsizing Wizard to migrate an Access database
to SQL Server - you can find information on this in the
Access help files. You can also use DTS (Data Transformation
Services) in SQL Server to migrate your Access data to SQL
Server.
For the situation you describe and just using SQL Server for
development, the developers edition would be fine.
-Sue
On Tue, 11 May 2004 18:51:02 -0700, jje
<jevans1@.verizon.net> wrote:

>I've seen software that claims it can convert an Access database into SQL o
ne. Does anyone know how this works? Does Microsoft have a solution for this
?
>I've only used Access databases and need to develop one with more power. Fo
r developing all I need is the developers edition right? My hosting server d
oes have SQL.
>Thanks for helping a SQL newbie
>Joyce|||Thank you so much for the quick answer.|||Some other resources here, as well:
http://www.aspfaq.com/2182
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"jje" <jevans1@.verizon.net> wrote in message
news:78ADFC44-20D8-42B8-AEDF-7496B10BDCC2@.microsoft.com...
> I've seen software that claims it can convert an Access database into SQL
> one. Does anyone know how this works? Does Microsoft have a solution for
> this?
> I've only used Access databases and need to develop one with more power.
> For developing all I need is the developers edition right? My hosting
> server does have SQL.
> Thanks for helping a SQL newbie
> Joyce|||On Tue, 11 May 2004 18:51:02 -0700, jje <jevans1@.verizon.net> wrote:

>Thanks for helping a SQL newbie
Something to note just in case...Upsizing will only transfer your data
to SQL Server. You'll essentially have a front-end/back-end where you
use Access' Forms and Reports using SQL Server tables, stored
procedures and views.
Lerch

Convert AlphaNumeric to Numeric

Hello,

I have to convert a alpha numeric value to a numeric value using query.
Is there a way to do it.

The column data type is Varchar and I am storing alpha numeric values to it.
I have to sort the column now. when I say order by [column name] it is not comming properly.

Need some solution to do it.

Regards,
GowriShankar.

Quote:

Originally Posted by gowrishankar

Hello,

I have to convert a alpha numeric value to a numeric value using query.
Is there a way to do it.

The column data type is Varchar and I am storing alpha numeric values to it.
I have to sort the column now. when I say order by [column name] it is not comming properly.

Need some solution to do it.

Regards,
GowriShankar.


What do you mean by "alphanumeric value"? Do you have non-numeric chars in the column? If yes, how do you expect it to be converted to numeric? If no, then use "convert(int, ColumnName)" or "cast(ColumnName as int)" statements.
Please post examples|||

Quote:

Originally Posted by almaz

What do you mean by "alphanumeric value"? Do you have non-numeric chars in the column? If yes, how do you expect it to be converted to numeric? If no, then use "convert(int, ColumnName)" or "cast(ColumnName as int)" statements.
Please post examples


try like this
SELECT Description
FROM ModuleSetup
ORDER BY CAST(Description AS varchar)

convert all caps names to proper names

Is there a way in the report designer to format a field that contains names to display the name as a proper name rather than in all caps as stored in the db?

Thanks.

By proper name do you mean a name with just the first letter capitalized? You could write an expression for it. It would look something like this:

=iif(Fields!yourfield.Value.ToString.ToUpper = Fields!yourfield.Value.ToString, Fields!yourfield.Value.ToString.Chars(0).ToString & Fields!yourfield.Value.ToString.SubString(1, Fields!yourfield.Value.ToString.Length, Fields!yourfield.Value)

The expression assumes that the field will never be null and it will always be at least 2 characters long. If these aren't true it gets a little more complicated. Hopefully this puts you on the right track.

|||Due to the checks necessary, encapsulate this code into a function in the custom code section of the Report.

In Report Designer, add the following Function to the Code section of the Report properties dialog.

Public Function ToFirstUpper(str As String) As String
If (str = Nothing Or str.Length = 0)
Return String.Empty

If str.Length = 1 Then
Return str.ToUpper()
Else
Return str.Substring(0, 1).ToUpper() & str.Substring(1).ToLower()
End Function


This method is then called using the following expression.

=Code.ToFirstUpper(Fields!yourField.Value)


You can also do this directly in the SQL query. This example uses the SQL Server 2005 AdventureWorks database.

Select
UPPER(SUBSTRING(LastName, 1, 1)) + LOWER(SUBSTRING(LastName,2, LEN(LastName) - 1)) AS LastName
FROM Person.Contact


For more information on custom code:
Using Custom Code References in Expressions (Reporting Services)
How to: Add Code to a Report (Report Designer)|||If you want to use this function also outside reporting services take a look at:
http://vyaskn.tripod.com/code.htm#propercase

I haven't tried this sp yet, because I use Oracle as Datasource which has the function INITCAP..

so just rewrite your sql-statement:
select initcap(name), customerid from customers

or if you user MSSQL-Server as Source create the function in the link

Convert ADP to MDB

My company uses Microsoft ADP to manage and display data. I am the
Business Analyst for the division, my manager has asked me to import
the ADP and convert it to MDB, so that we can modify queries to
generate more reports.
To give a little background on the issue, we have a "Form" that
performs a search in the "Tables" using the queries, and outputs that
results into and calendar format in excel. All this has been hard-coded
into the VB code. Basically, the "Form" runs the code, which in turn
runs a "Module".
Some of the queries were encrypted so I had to go in and make sense
out of it, and build similar queries in MDB. I have imported all the
necessary tables, queries, modules, macros, and forms. Since it was
custom built, I am having difficulty debugging the errors... Is there
any basic stuff I should look at before I start troubleshooting'
Please help!!You'd probably want to post this to an Access forum.
-oj
<jyesbrown@.gmail.com> wrote in message
news:1152210948.534715.165750@.m79g2000cwm.googlegroups.com...
> My company uses Microsoft ADP to manage and display data. I am the
> Business Analyst for the division, my manager has asked me to import
> the ADP and convert it to MDB, so that we can modify queries to
> generate more reports.
> To give a little background on the issue, we have a "Form" that
> performs a search in the "Tables" using the queries, and outputs that
> results into and calendar format in excel. All this has been hard-coded
> into the VB code. Basically, the "Form" runs the code, which in turn
> runs a "Module".
> Some of the queries were encrypted so I had to go in and make sense
> out of it, and build similar queries in MDB. I have imported all the
> necessary tables, queries, modules, macros, and forms. Since it was
> custom built, I am having difficulty debugging the errors... Is there
> any basic stuff I should look at before I start troubleshooting'
> Please help!!
>|||I am bit confused.
ADP is merely a front-end app of SQL Server/MSDE and does not contain
tables, queries. It only has forms, reports, macros/vba code modules. If you
want to modify/create queries in ADP (they are actually Views, SPs, UDF in a
SQL Server database), you are actually directly working in a SQL Server
database.
If your goal is to switch the front end app from ADP to an mdb with linked
table (to the SQL Server back end), because of not cleared future of ADP,
then converting ADP to MDB may make some sense, otherwise, I do not see why
to do it.
Also, the way ADP connects to SQL Server (bound controls, especially) is a
bit different from the way mbd linked table. And it may also be quite
different how the server side queries (views, sps...) are used. IMO, one
must be good at both Access programming and SQL Server programming in order
to fulfill the converting, if it has to be converted.
<jyesbrown@.gmail.com> wrote in message
news:1152210948.534715.165750@.m79g2000cwm.googlegroups.com...
> My company uses Microsoft ADP to manage and display data. I am the
> Business Analyst for the division, my manager has asked me to import
> the ADP and convert it to MDB, so that we can modify queries to
> generate more reports.
> To give a little background on the issue, we have a "Form" that
> performs a search in the "Tables" using the queries, and outputs that
> results into and calendar format in excel. All this has been hard-coded
> into the VB code. Basically, the "Form" runs the code, which in turn
> runs a "Module".
> Some of the queries were encrypted so I had to go in and make sense
> out of it, and build similar queries in MDB. I have imported all the
> necessary tables, queries, modules, macros, and forms. Since it was
> custom built, I am having difficulty debugging the errors... Is there
> any basic stuff I should look at before I start troubleshooting'
> Please help!!
>|||Thanks for your reponse. I am not an expert on VB and SQL programming.
So I'm taking a different approach. To keep things simple, I have three
tables (in MDB), so I created a query that draws required information
from the tables and puts the data in a calendar format in 'Access
Report' (I made a calendar for July, with Text Boxes for each day of
the month).
Problem: The calendar displays only one record per page, it was
supposed to display all the records corresponding to the days of the
month in one page. Also, is there a way to display more than one record
in the 'Text box'?, as of now it only displays one record in each 'text
box' in each page.
Please help!!!!!!!!!!|||jyesbrown@.gmail.com wrote:
> Thanks for your reponse. I am not an expert on VB and SQL programming.
> So I'm taking a different approach. To keep things simple, I have three
> tables (in MDB), so I created a query that draws required information
> from the tables and puts the data in a calendar format in 'Access
> Report' (I made a calendar for July, with Text Boxes for each day of
> the month).
> Problem: The calendar displays only one record per page, it was
> supposed to display all the records corresponding to the days of the
> month in one page. Also, is there a way to display more than one record
> in the 'Text box'?, as of now it only displays one record in each 'text
> box' in each page.
> Please help!!!!!!!!!!
>
I think you need to seek help in one of the Access groups, these sound
like questions specific to Access, not SQL Server. It also sounds like
you're in over your head, why did you agree to do something like this
without having a clue how?
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Convert ADP to MDB

My company uses Microsoft ADP to manage and display data. I am the
Business Analyst for the division, my manager has asked me to import
the ADP and convert it to MDB, so that we can modify queries to
generate more reports.
To give a little background on the issue, we have a "Form" that
performs a search in the "Tables" using the queries, and outputs that
results into and calendar format in excel. All this has been hard-coded
into the VB code. Basically, the "Form" runs the code, which in turn
runs a "Module".
Some of the queries were encrypted so I had to go in and make sense
out of it, and build similar queries in MDB. I have imported all the
necessary tables, queries, modules, macros, and forms. Since it was
custom built, I am having difficulty debugging the errors... Is there
any basic stuff I should look at before I start troubleshooting'
Please help!!You'd probably want to post this to an Access forum.
-oj
<jyesbrown@.gmail.com> wrote in message
news:1152210948.534715.165750@.m79g2000cwm.googlegroups.com...
> My company uses Microsoft ADP to manage and display data. I am the
> Business Analyst for the division, my manager has asked me to import
> the ADP and convert it to MDB, so that we can modify queries to
> generate more reports.
> To give a little background on the issue, we have a "Form" that
> performs a search in the "Tables" using the queries, and outputs that
> results into and calendar format in excel. All this has been hard-coded
> into the VB code. Basically, the "Form" runs the code, which in turn
> runs a "Module".
> Some of the queries were encrypted so I had to go in and make sense
> out of it, and build similar queries in MDB. I have imported all the
> necessary tables, queries, modules, macros, and forms. Since it was
> custom built, I am having difficulty debugging the errors... Is there
> any basic stuff I should look at before I start troubleshooting'
> Please help!!
>|||I am bit confused.
ADP is merely a front-end app of SQL Server/MSDE and does not contain
tables, queries. It only has forms, reports, macros/vba code modules. If you
want to modify/create queries in ADP (they are actually Views, SPs, UDF in a
SQL Server database), you are actually directly working in a SQL Server
database.
If your goal is to switch the front end app from ADP to an mdb with linked
table (to the SQL Server back end), because of not cleared future of ADP,
then converting ADP to MDB may make some sense, otherwise, I do not see why
to do it.
Also, the way ADP connects to SQL Server (bound controls, especially) is a
bit different from the way mbd linked table. And it may also be quite
different how the server side queries (views, sps...) are used. IMO, one
must be good at both Access programming and SQL Server programming in order
to fulfill the converting, if it has to be converted.
<jyesbrown@.gmail.com> wrote in message
news:1152210948.534715.165750@.m79g2000cwm.googlegroups.com...
> My company uses Microsoft ADP to manage and display data. I am the
> Business Analyst for the division, my manager has asked me to import
> the ADP and convert it to MDB, so that we can modify queries to
> generate more reports.
> To give a little background on the issue, we have a "Form" that
> performs a search in the "Tables" using the queries, and outputs that
> results into and calendar format in excel. All this has been hard-coded
> into the VB code. Basically, the "Form" runs the code, which in turn
> runs a "Module".
> Some of the queries were encrypted so I had to go in and make sense
> out of it, and build similar queries in MDB. I have imported all the
> necessary tables, queries, modules, macros, and forms. Since it was
> custom built, I am having difficulty debugging the errors... Is there
> any basic stuff I should look at before I start troubleshooting'
> Please help!!
>|||Thanks for your reponse. I am not an expert on VB and SQL programming.
So I'm taking a different approach. To keep things simple, I have three
tables (in MDB), so I created a query that draws required information
from the tables and puts the data in a calendar format in 'Access
Report' (I made a calendar for July, with Text Boxes for each day of
the month).
Problem: The calendar displays only one record per page, it was
supposed to display all the records corresponding to the days of the
month in one page. Also, is there a way to display more than one record
in the 'Text box'?, as of now it only displays one record in each 'text
box' in each page.
Please help!!!!!!!!!!|||jyesbrown@.gmail.com wrote:
> Thanks for your reponse. I am not an expert on VB and SQL programming.
> So I'm taking a different approach. To keep things simple, I have three
> tables (in MDB), so I created a query that draws required information
> from the tables and puts the data in a calendar format in 'Access
> Report' (I made a calendar for July, with Text Boxes for each day of
> the month).
> Problem: The calendar displays only one record per page, it was
> supposed to display all the records corresponding to the days of the
> month in one page. Also, is there a way to display more than one record
> in the 'Text box'?, as of now it only displays one record in each 'text
> box' in each page.
> Please help!!!!!!!!!!
>
I think you need to seek help in one of the Access groups, these sound
like questions specific to Access, not SQL Server. It also sounds like
you're in over your head, why did you agree to do something like this
without having a clue how?
Tracy McKibben
MCDBA
http://www.realsqlguy.comsqlsql

convert adDBtimeStamp to datetime

Hello,
I use a SQL Server with ODBC driver and >NET C#.
I want to convert a date field with adDBtimeStamp format to a DATETIME
format, but no solution could be found till now.
My query is as follows:
SELECT received_at as EXPR1
FROM TTable
WHERE datepart(w(datetime(received_at)))>10
Has anybody any solution for conversion?
*** Sent via Developersdex http://www.examnotes.net ***What is the SQL datatype of "received_at" and what are you attepting to
do with it? adDBtimeStamp maps to a DATETIME type in SQL Server so no
conversion should be necessary. However your example code isn't valid
in SQL Server - there is no WEEK or DATETIME function and your syntax
for DATEPART is wrong.
Maybe the following was what you intended, assuming you are in fact
dealing with a DATETIME column:
SELECT received_at AS expr1
FROM TTable
WHERE DATEPART(WEEK,received_at)>10 ;
David Portas
SQL Server MVP
--|||
It seems that no conversion is made and no explicit conversion could be
applied.
for the sequence:
SELECT received_at AS expr1
FROM TTable
WHERE DATEPART(WEEK,received_at)>10
the outcome is:
Driver]Expected lexical element not found: )
*** Sent via Developersdex http://www.examnotes.net ***|||Lucian,
If the adDBtimeStamp values are seen as strings of the
form 'yyyymmddhhmmss', try this:
declare @.t table (
adDBtimeStamp char(14)
)
insert into @.t values ('20051012171534')
select
convert(datetime,
substring(adDBtimeStamp,1,8) + space(1) +
substring(adDBtimeStamp,9,2) + ':' +
substring(adDBtimeStamp,11,2) + ':' +
substring(adDBtimeStamp,12,2),
112) as SQLdt
from @.t
Steve Kass
Drew University
Lucian Baltes wrote:

>Hello,
>I use a SQL Server with ODBC driver and >NET C#.
>I want to convert a date field with adDBtimeStamp format to a DATETIME
>format, but no solution could be found till now.
>My query is as follows:
>SELECT received_at as EXPR1
>FROM TTable
>WHERE datepart(w(datetime(received_at)))>10
>Has anybody any solution for conversion?
>
>
>*** Sent via Developersdex http://www.examnotes.net ***
>