saquery.com
a web developer' s kung fu…
Categories: Sql | Add a Comment

The command sa_describe_query describes the result set for a query. One row describes a specific output column of the query. Regarding to the Posts Master a Foreign Key with Sql Anywhere and Get minimum and maximum values of different sql datatypes it is possible to extend the sa_describe_query command as follows.

See how smart we can handle Web Requests in SQL Anywhere with a few lines of SQL Code. [inline] Specify HTTP Web service protocol and Port in SQL Anywhere The Database Start Parameter -xs specifies server-side Web service communication protocols. With the internal Webserver we can handle web requests within a SQL Anywhere Server. Simply [...]
Categories: MySql, Sql | Add a Comment
I prefer this way to determine whether a table exists in a MySQL database.
Categories: more skills, Sql | Add a Comment
SAQ_DESCRIBE_FOREIGNKEYIn the development environment of a Sybase SQL Anywhere Database, it is simple to analyze and describe the rules of foreign keys. All necessary informations are stored in the system tables of the database. The information can be combined into a useful view.
Categories: Sql | Add a Comment
The following short sql funtions show how to get the root directory within a Sybase Sql Anywhere Database. Note that these methods work on all operating systems. call sa_make_object ('function','SAQ_PATHSEPERATOR'); alter function SAQ_PATHSEPERATOR() returns char(1) begin return(if left(property('platform'),7) = 'Windows' then '\\' else '/' endif); end ; call sa_make_object( 'function', 'SAQ_ROOT_DIR' ); alter function SAQ_ROOT_DIR() [...]
Categories: Sql | Add a Comment
Impact on performance Duplicate indexes slow down performance: Each time an indexed column is modified, the value will be changed in the table and also changed in the index. If there are duplicate indexes, each index must be maintained separately every time the data is modified. The amount of index maintenance increases for INSERT, UPDATE, [...]
Categories: Sql | Add a Comment
This short procedure shows a way to disconect all clients with an open connection to a Sql Anywhere Database.
Categories: Sql | Add a Comment
largest-possible-value-int32Everybody knows the min and max value properties in .Net. Dim i As Int32 = Int32.MaxValue The values represents the smallest and the largest value for a datatype. For some of us it might be interesting to get this information within a stored procedure.
Categories: Sql | Add a Comment
If you want to code platform-independ stored procedures, it is important to know the path seperator character to build some path strings while working with files and directories on different operating systems. It is possible to determine the operating system the database server is running on. So far we know that Windows is the only platform using [...]
Categories: english, Sql | Add a Comment
With this statement you can select the database methodes currently in use by a connection in a Sql Anywhere database. select isnull(connection_property ('CurrentProcedure',number),'') currentProc, * from sa_conn_info(); The select statement returns the following result where currently no procedure is in use. currentProcNumberNameUseridDBNumberLastReqTimeReqTypeCommLinkNodeAddrClientPortServerPortBlockedOnLockRowIDLockIndexIDLockTableUncommitOps 2SQL_DBC_1972bfe8DBA02010-10-05 19:34:58.765FETCHlocal00000 1Sybase Central 3DBA02010-10-05 19:34:57.229CLOSElocal00000