Print Page | Close Window

SQL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=3356
Printed Date: 30 March 2026 at 3:35pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SQL
Posted By: Gullanian
Subject: SQL
Date Posted: 07 June 2003 at 12:46pm

What changes do I need to make to my scripts SQL querys to make them compatible with SQL server?

any URL's, handy tips greatly appreciated!

many thanks




Replies:
Posted By: fernan82
Date Posted: 07 June 2003 at 4:27pm

No changes needed, the same queries you use for access will work fine on ms sql but to get better performace and security you should use http://www.databasejournal.com/features/mssql/article.php/1565961 - stored procedures

 

 



-------------
FeRnAN
http://www.danasoft.com/">


Posted By: Gullanian
Date Posted: 07 June 2003 at 4:48pm

ok thanks! they seem pretty cool

ok 1 more thing, when I put a url in a text field, any characters not used up have space bars after them, if you know what i mean, so when I pull out the url to redirect to it has loads of %20 after it preventing it from redirecting! anyone know why?



Posted By: michael
Date Posted: 08 June 2003 at 10:15am
The problems is that either you datatype is a fixed character firld type or was at one time. For example if you field is char or nchar  (50)  the entries are always 50 characters long. if it is e.g. varchar(50) it can be up to 50 but does not add spaces if it is shorter.
If you imported the data or changed the fieldtype from char to varchar at one point it keeps the spaces as SQL sees them as data. So if you you change you fieldtype to a variable type like varchar you can use a simple query to get rid of the spaces in your field.
Update tablename Set field = RTrim(field)

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Gullanian
Date Posted: 08 June 2003 at 1:34pm
Thank you very much!  One more question, I had a field in the old access database which took binary data for users to upload images, in access its datatype was OLE Object, whats the equivalent in SQL?  Many thanks


Posted By: michael
Date Posted: 08 June 2003 at 6:32pm
SQL Server has a Datatype called image which you could use to store I believe up to 2GB of data per field. Thus you might want to consider storing the file somewhere and just point to it from the db

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: ctscott
Date Posted: 10 November 2003 at 6:44am

Originally posted by michael michael wrote:

The problems is that either you datatype is a fixed character firld type or was at one time. For example if you field is char or nchar  (50)  the entries are always 50 characters long. if it is e.g. varchar(50) it can be up to 50 but does not add spaces if it is shorter.
If you imported the data or changed the fieldtype from char to varchar at one point it keeps the spaces as SQL sees them as data. So if you you change you fieldtype to a variable type like varchar you can use a simple query to get rid of the spaces in your field.
Update tablename Set field = RTrim(field)

Thank you michael. that's exactly what i was wanting to know.



-------------
______________________
http://www.cfbtrivia.com" rel="nofollow - College Football Trivia


Posted By: ljamal
Date Posted: 10 November 2003 at 7:52am
The biggest differences between SQL and Access are:
1) date format and the date function. SQL surrounds dates with single quotes not #
2) stored procedures
3) the ability to return multiple recordsets with one call to the database.

#1 is important.
#2 can improve the efficiency of your application
#3 will improve the efficiency of your application

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net