Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Thursday, March 29, 2012

Convert ACCESS code to SQL Server

Hi,
I m working on the project which was using MS Access but now i want to use SQL Server 2005.
But there are some queries which are not understood by me, so please help me in converting those.
Following is the query:

SHAPE {select stlcode , SampleTypeCode,InNo,NoOfSamples,RecdDistrict,RecdT al,DtRecd , RecdFrom, RecdNameDesg, PrimaryInNo, MicroInNo, WaterInNo from SInward order by SampleTypeCode,InNo } AS ParentCMD APPEND
({select SampleType, InNo, SrNo, StlCode, AStlCode, SampleTakenDt, FarmerNm, FarAddVil, FarAddPost, FarAddDist, FarAddTal , FarAddPin, SurveyGrNo, ReprArea, LastSeason, LastSeasonCrop, NextSeason, NextSeasonCrop, NextSeasonCrop22, AgeOfTree, LandProfile, DepthFrom, DepthTo, WaterSource, CollectdBy, SampleAccepted, LabSampleNo, HCNumber, MicroLabSampleNo, WaterLabSampleNo from SDetails order by SrNo } AS ChildCMD RELATE SampleTypeCode TO SampleType, InNo to InNo, stlcode to stlcode) AS ChildCMD

This query was previously written in MS Access and now I want it to be in SQL Server 2005, So please help me in solving this.
Thanx

Quote:

Originally Posted by sachinkale123

Hi,
I m working on the project which was using MS Access but now i want to use SQL Server 2005.
But there are some queries which are not understood by me, so please help me in converting those.
Following is the query:

SHAPE {select stlcode , SampleTypeCode,InNo,NoOfSamples,RecdDistrict,RecdT al,DtRecd , RecdFrom, RecdNameDesg, PrimaryInNo, MicroInNo, WaterInNo from SInward order by SampleTypeCode,InNo } AS ParentCMD APPEND
({select SampleType, InNo, SrNo, StlCode, AStlCode, SampleTakenDt, FarmerNm, FarAddVil, FarAddPost, FarAddDist, FarAddTal , FarAddPin, SurveyGrNo, ReprArea, LastSeason, LastSeasonCrop, NextSeason, NextSeasonCrop, NextSeasonCrop22, AgeOfTree, LandProfile, DepthFrom, DepthTo, WaterSource, CollectdBy, SampleAccepted, LabSampleNo, HCNumber, MicroLabSampleNo, WaterLabSampleNo from SDetails order by SrNo } AS ChildCMD RELATE SampleTypeCode TO SampleType, InNo to InNo, stlcode to stlcode) AS ChildCMD

This query was previously written in MS Access and now I want it to be in SQL Server 2005, So please help me in solving this.
Thanx


That is not simple thing, most of the query you have to change.

1.Access Date in where clause will be # change to
2.Access IIF condition, change to CaseBlab blab.|||

Quote:

Originally Posted by hariharanmca

That is not simple thing, most of the query you have to change.

1.Access Date in where clause will be # change to
2.Access IIF condition, change to CaseBlab blab.


Thanxs for u r reply...
now i can think that way...sqlsql

Convert a SQLExpress File based DB Project to SQLExpress Server DB Project

Hi All,

I've been struggling with this for hours...

Could someone please advise me on how to convert my current File based SQL Server Express website to a Server based SQL Express one.

Particularly interested in what I need to do in the SQL Express management tool, changes I need to make the projecvt itself and changes needed to get IIS to understand things have been changed.

Thanks,

Martin.

Hi Martin, you can try these steps:

1. Detach the database file from your project: open the project with VS2005->right click the mdf file in Solution Explorer->choose detach

2. Attach the database into SQL: open Management Studio->right click Databases in Object Explorer-> choose Attach.

3. change your connection string: remove AttachDBFileName property; modify the database property to point to the new attached database.

For more information, you can refer tohttp://msdn2.microsoft.com/en-us/library/ms187858.aspx

Tuesday, March 27, 2012

Convert .MDF to .bak

hi friends i am using vwd 2005 i created a project now i want to upload it on the server, but i want which database i used in the database convert it into .bak file for upload it on the server how i convert it, i don't have MS SQL SERVER 2005 or any except vwd 2005.

Whthout the SQL server where you had the DB at first place .. ??

convert ###,###,##0 to INT

Hi,

I've imported an Excel file into a work table, via an Access Project. One of my fields is an integer, represented in Excel with thousands separator e.g. 3,137,458

The above now sits in a varchar column, and I need to convert these values to an INT. Strangely, is numeric() returns One, but then convert( int, ...) does not like the commas.

To add insult to injury, my MSDE does not seem to allow me to CREATE FUNCTION. It protests even if I do Grant Create Function to Login, while running as 'sa'. Side question: is this a known limitation of MSDE ?

Is there an efficient way to convert such strings to Int ?

I note that the commas may actually be missing, since their presence depends on the "Digit Grouping" value in the Regional Settings of Control Panel.

In the past, I was using Sybase, and I had to use set-based queries, running against a few work fields in my table. The first query would use charindex() to find the position of the first comma, if any. The second query would pick up the portion of the string up to the comma, then another query chasing the next comma, etc. Rather painful.Hmm...maybe you could try playing around with the replace command to filter out the commas.

I tested this 1 line code in QA and it works fine.

select cast(replace('3,137,458',',','') as int).|||oops, temporary blindness ... apologies ... please ignore this question

convert( int, REPLACE( column_name, ',', '' ) )|||thanks, mate, I've just found it at the same time. Works like a charm.
Me self-learner too...

Sunday, March 25, 2012

Conversion of Database into text file

hi All,

Actually i have a project on data minning...n i have to convert the databases into text files so that they can be consolidate ....n when consolidation of the databases(in the form of text files) would be done i have to convert the consolidated one (text file) into database again.

so anyone plz tell me dat how to convert a database (using sql server & C#) into text file...

regards,

Hello.

This is what Sql Server Integration Services was made for. Any reason why you want to create the text-files?

You have many other options.

It looks to me that what you can do with an INSERT queries using linked servers. Have a look at sp_addlinkedserver in TSQL. You might get help from reading http://gorm-braarvig.blogspot.com/2005/11/access-database-from-sql-200564.html (ignore step 1 and 3)

Hope this helps.

Conversion from vb.net 1.0 to vb.net 2.0 (Crystal Reports Error)

i am facing the crystal reports error when i convert my project from vb.net 1.0 to 2.0. can any one tell me how i remove these errors

waiting ........

you havn't said what the errors are. AND this is not the forum for your question.

You will be waiting a long time.

sqlsql

Sunday, February 19, 2012

Consume HTTP Endpoints in Visual Studio 2005

I'm not a web developer but trying to use Sql 2005 Web Services. I tried to
create a Windows Application in Visaul Studio 2005.
In the New Project dialog box, I couldn't find Windows Application template
to add Web Reference. Anyone has an idea where to get the template.
Help.
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200606/1First off, because this has to do with VS, this post would be better answere
d in
a dotnet NG.
You may find the add rreference to a WS, not in the New Project but in the
Project Explorer.
HTH
JeffP...
"Naana via webservertalk.com" <u14055@.uwe> wrote in message
news:61208a3a26ff9@.uwe...
> I'm not a web developer but trying to use Sql 2005 Web Services. I tried t
o
> create a Windows Application in Visaul Studio 2005.
> In the New Project dialog box, I couldn't find Windows Application templat
e
> to add Web Reference. Anyone has an idea where to get the template.
> Help.
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200606/1