I'm using the .startsWith() filter in a JDOQL query but it's case sensitive.
So startsWith("ab") doesn't return "Abc" result and so on.
Will I need to use a SQL query to avoid this ?
Is there any free tool for profiler of MYSQL database?
I want to capture the SQL statement from application.
and want to tune it for performenencae.
Can any one suggest?
Thanks,
Paresh
Stupid question:
In SQL, I know I can do
UPDATE TableA SET MyColumn=NULL
But, how do I enter NULL into a cell graphically? I tried entering 'null' and 'NULL' and '' (nothing/empty string) into the MySQL Query Browser with no success.
Our globalization mechanism stores error messages in a SQL 2005 DB.
Some of the error messages are used as subjects on email messages sent to the development team.
Recently, with no clear reason, we started receiving emails with strangely encoded subjects, such as:
=?utf-8?B?Qm1mQm92ZXNwYS5Qb3NUcmFkaW5nRXNwZWNpZmljYWNhbyAtIFN1Y2Vzc28gbm8gcmVwcm
9jZXNzYW1lbnRvLiBEYXRhIFByZWfDo28gPSAzMS8wMy8yMDEwIDAwOjAwOjAwIC0gTsO6bWVyby
BkbyBFdmVudG8gZGUgTmVnw7NjaW8gPSAxMDAyIC0gQ8OzZGlnbyBOYXR1cmV6YSBkYSBPcGVyY
cOnw6NvID0gQyAtIFNlcn...
We don't have any clue on the reason this is happening, nor which encoding pattern is being used here (maybe utf-8?).
I'd really appreciate some help.
We have script/generate migration add_fieldname_to_tablename fieldname:datatype syntax for adding new columns to a model.
On the same line, do we have a script/generate for changing the datatype of a column? Or should I write sql directly into my vanilla migration?
I want to change a column from datetime to date.
Thanks
Is there a way to get all possible values from a MySQL enum column?
The MySQL documentation says the MySQL enum type is returned as a Java String, so I basically would like a way to get all possible strings I can pass when querying a table with such an enum.
I couldn't immediately find anything when I was looking through the metadata returned for such a column, but since enum isn't standard SQL, I'm not sure it's even possible... any suggestions?
I'm using Fluent Nhibernate with the following query on DerivedClass which extends BaseClass:
var query = Session.CreateCriteria<DerivedClass>().SetLockMode(LockMode.Upgrade)
What I want is the lock hints (updlock, rowlock) to be applied to both DerivedClass and BaseClass, but the generated SQL only applies the lock hints to DerivedClass:
SELECT * FROM DerivedClass this_ with (updlock, rowlock) inner join [BaseClass] this_1_ on
this_.Id=this_1_.Id WHERE ...
This is the same situation described in http://opensource.atlassian.com/projects/hibernate/browse/HHH-2392
If anyone could point me in the right direction it would be much appreciated.
Hi there,
We are a 5 developer team that are going to create a 150-200 table application. This is supposed to be written in C#, ASP.NET, MS SQL.
Is SOA a good architecture for us? If yes, what type of it is better to us?
Hello,
I am looking for a tool/command which can compare data between two PostgreSQL databases. The reason to do this is to have some external verification that the SQL script responsible for data migration from one PostgreSQL database to the other have been written correctly.
Any pointers would be appreciated
regards
Sameer
I wanted to find out if ADFS2.0 provides a way for users to be authenticated with a Custom Store? Version 1.0 you could only authenticate users in the Windows domain, using Forms/Windows Integrated/Cardspace. I have an ASP.NEt website, which I would like the users to be authenticated against a custom store in SQL and then ADFS2.0 to take care of the claims issued to the user...
Is mysql_real_escape_string sufficient for cleaning user input in most situations?
::EDIT::
I'm thinking mostly in terms of preventing SQL injection but I ultimately want to know if I can trust user data after I apply mysql_real_escape_string or if I should take extra measures to clean the data before I pass it around the application and databases.
I see where cleaning for HTML chars is important but I wouldn't consider it necessary for trusting user input.
T
The full error is:
Message: Mysqli statement execute
error : Can't create/write to file
'/var/www/zendApp/backup/mysql/1268733580_name.sql'
(Errcode: 13)
I have tried several things already with the /var/www/ZendApp/backup/mysql directory
$chmod 777 mysql
$chmod 1777 mysql
$chown root:root mysql
$chown mysql:mysql mysql
But nothing helps. What am I doing wrong here? Do I have to tell mysql somewhere that I can write to that directory?
Hi
I wanted to know if their is any tool that can be used to create sql migration script of existing database in Ruby on Rails.
Also is their any visual tool that can be used to write Ruby on Rails migration script.
Hi,
I have to read in a large record set, process it, then write it out to a flat file.
The large result set comes from a Stored Proc in SQL 2000.
I currently have:
var results = session.CreateSQLQuery("exec usp_SalesExtract").List();
I would like to be able to read the result set row by row, to reduce the memory foot print
Thanks
In our development we use two servers with PostgreSQL 8.4 - development and production. So, after changes were made on development server we would like to automatically generate SQL migration scripts. I found that EMS DB Comparer for PostgreSQL can do it, but it is only for Windows (our development team use Ubuntu for developing). Do you now alternative tools to do this?
What are the best practices in setting up a new instance of TFS 2008 Workgroup edition?
Specifically, the constraints are as follows:
Must install on an existing Windows Server 2008 64 bit
TFS application layer is 32 bit only
Should I install SQL Server 2008, Sharepoint and the app layer in a virtual instance of Windows Server 2008 or 2003(I am already running Hyper-V) or split the layers with a database on the host OS and the app layer in a virtual machine?
Edit: Apparently, splitting the layers is not recommended
Is there a way in JDBC to find out the cursor opened or not in JAVA.
We are getting an exception when tried to access an un opened cursor.
java.sql.SQLException: Cursor is closed.
Hi guys im using varchar2 for a product name field, but when i query the databa from the run SQL command line it shows too many empty spaces, how can i fixe this withouth changing the datatype
here is the link to the ss
http://img203.imageshack.us/img203/20/varchar.jpg
I have kind of a complicated case and am wondering how this would work in rails:
I want to categories the genres of some singers. Singers can belong to more than one genres, and users can assign tags to each genre
For example:
singers <-- singers_genres -- genres <-- genres_tags -- tags
SQL would look something like:
SELECT * FROM singers S
INNER JOIN singers_genres SG ON S.id=SG.singer_id
INNER JOIN genres G ON G.id = SG.genre_id
LEFT OUTER JOIN genre_tags GT ON G.id = GT.genre_id
INNER JOIN tags T ON GT.tag_id = T.id
What the main differences between SQL Reporting Services 2005 and 2008 in terms of features? I read about 2008 has much better in scalability. How about the features? What's in SSRS 2008 but not 2005? Thanks!
I have an application that is centered around a database (ORM is LINQ-SQL) that has a table called Assignment. I am using the repository pattern to manipulate the database. My application is basically going to perform CRUD operations. I am new to delegates and events and I am asking you what events I should create (like maybe AssignmentCreating, AssignmentCreated) and what kind of delegate to use (like maybe a custom delegate or just an EventHandler)?
Hi,
I tried to search posts, but I only found solutions for SQL Server/Access. I need a solution to MYSQL (5.X).
I have a table with 3 columns: hostid, itemname, itemvalue. If I do a select, it will return
1 A 10
1 B 3
2 A 9
2 C 40
How do I query the database to return something like
A B C
1 10 3
2 9 40
Hi,
I can now if a session contain any changes which must be synchronized with the database with
session.isDirty()
But i have a simple field (modification date) that i would like to be ignore by it.
Example: object Person( name,age,datemodification).
if i just modify the datemodification field i would like that session.isDirty() or othermethod like this to return false so at the end no sql update will occur.
Thanks in advance.
Regards
I have a raw sql query I need to run, but the database name changes in each environment (live: db, dev db_test)
I need to get the current database name from the databases.yml file.
How can I get just the current database name?
I am using the Propel ORM
Hi,
I am doing this:
@person.attributes = params[:person]
Can anyone give me a clue as to why doing an attributes= would cause a bunch of SQL to show in my logs?
I see a couple of SELECT and even an UPDATE.
I swear I am not doing a "save" -- so I have no idea why setting attributes would trigger queries.
Is there a before_ of after_ filter I am missing?
Thanks.