Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Thursday, March 29, 2012

export from mssql database

Hello,

I try to export a mssql database into a csv-file.

I tried this with asp, but it doesn't work.

<%
Dim objConn
Dim csv_path

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "database","username","passwd"

csv_path =Server.MapPath("./") & "\csv_test.csv"
SQL ="SELECT * INTO OUTFILE 'C:\inetpub\wwwroot\csv_test.csv' FIELDS
TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' FROM GROUPS"
objConn.Execute SQL
objConn.Close
Set objConn = Nothing
%
There is a problem near 'C:\inetpub\wwwroot\csv_test.csv'
Can anyone help? Thank you.

Manuel"Manuel" <manuelitoh@.web.de> wrote in message
news:4a77b755.0410130720.9128112@.posting.google.co m...
> Hello,
> I try to export a mssql database into a csv-file.
> I tried this with asp, but it doesn't work.
> <%
> Dim objConn
> Dim csv_path
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.open "database","username","passwd"
>
> csv_path =Server.MapPath("./") & "\csv_test.csv"
> SQL ="SELECT * INTO OUTFILE 'C:\inetpub\wwwroot\csv_test.csv' FIELDS
> TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' FROM GROUPS"
> objConn.Execute SQL
> objConn.Close
> Set objConn = Nothing
> %>
> There is a problem near 'C:\inetpub\wwwroot\csv_test.csv'
> Can anyone help? Thank you.
> Manuel

You seem to be using MySQL syntax, not MSSQL (Microsoft SQL Server), so I
guess you'll get a better answer in a MySQL forum. If you are using MSSQL,
then I suggest you check out osql.exe, bcp.exe, or DTS.

Simon

Friday, March 23, 2012

Export Access DB to MSSQL Server 2000

Hello,

I am working on a couple fo the ASP.NET walkthoughs and I would like to practice with a Database that I created in Access. I realize that I could use the Access DB, but I would like to learn to work with a more industrial strength DB. Is there a method to export to MSSQL server 2000 from Access ?

Regards,

JamesIf I remember correctly, use below steps to do that!

Open Enterprisemanager of SQLserver 2000, Open any database where you want to import access db table, then keep your cursor on Tables --> Right Click --> Select All Tasks --> ImportData --> Click Next --> Choose Microsoft Access from theData Source list box, and from there follow the steps in wizard, it will walk you through the steps to import AccessDB to that DB.

Hope it helps! [Note: You have to have permission to do this]|||I am actually using MSDE 2000. Is the process the same ?

Regards
James|||From access process should be same

I found a link at support on steps for it, please see and use that for exporting from access

Convert an Access Database to SQL Server

Hope it helps!|||Thanks

It Works !!

Monday, March 19, 2012

Explicit DATE FORMAT

Hi:
How can I force MsSQL to a explicit DateFormat.
Like: 'DD/YY'SELECT CAST(Day(getdate()) AS char(2)) + '/' + CAST(RIGHT(Year(getdate()), 2) AS char(2))|||First, you can't control they way date is stored, because it's in 2 integer format, no matter what you do. It's the output format you're talking about. And this one depends on connection and environment setting of the client. If you're talking about QA, go to Optins and enable Use Regional settings..., then go to your Regional Settings applet in Control Panel and set it the way you want.|||Because I'm "converting" PL/SQL sentencies to TSQL I was making a "traslation".

As you may know ORACLE has this:

TO_DATE('29/01/2003', 'DD/MM/YYYY')

and I thought that MSSQL had something like that.

Thanks for your response.|||'DD/YY'?

What good does that date format do?

rdjabarov is correct, but if you insist on formatting this in your SQL code then look up the CONVERT function in Books Online.

Friday, February 24, 2012

Existing license for installed mssql server

Is there a way to determine how an existing installation of MS SQL
Server is licensed, both on 7.0 and 2000?
Thanks for any help.
Donna CunninghamHi Donna
You could look at the values returned from the SERVERPROPERTY function such
as propertynames LicenseType and NumLicences although these do not always
report values. Also check out productversion, productlevel and edition.
John
"donna.cunningham@.ingrambook.com" wrote:
> Is there a way to determine how an existing installation of MS SQL
> Server is licensed, both on 7.0 and 2000?
> Thanks for any help.
> Donna Cunningham
>

Existing license for installed mssql server

Is there a way to determine how an existing installation of MS SQL
Server is licensed, both on 7.0 and 2000?
Thanks for any help.
Donna CunninghamHi Donna
You could look at the values returned from the SERVERPROPERTY function such
as propertynames LicenseType and NumLicences although these do not always
report values. Also check out productversion, productlevel and edition.
John
"donna.cunningham@.ingrambook.com" wrote:

> Is there a way to determine how an existing installation of MS SQL
> Server is licensed, both on 7.0 and 2000?
> Thanks for any help.
> Donna Cunningham
>