I got this SQL:
UPDATE users2
SET picture = 'sites/site2/files/pictures/' + picture;
WHERE picture NOT IS NULL
And the only thing I get are that all picture fields get the value '0'.
Hi,
I have trying to check whether connection is valid or not and using isValid() method of java.sql.Connection. But this method doesn't return and hangs.
Is there anything I am missing or this method requires any configuration? Using mysql-connector-java-5.0.7-bin.jar
Thanks,
Shahid
Why Nibernate HQL can not handle the following query:
from Deal D where (D.ApprovalDate + INTERVAL 1 Year) < current_timestamp() < (D.RenewalDate + INTERVAL -1 Year)
knowing that INTERVAL and YEAR are keywords in MySQL, so this is kind of mixing Sql within Hql (unless Hql can handle date functions like so and I don't know) . The dialect is MySQLDialect
Its perfectly valid to execute this query
SELECT '2005-01-01' + INTERVAL 1 Year;
Hello, I have to migrate this query (simplified here) from T-SQL to ORACLE
SET IDENTITY_INSERT table ON
INSERT INTO table (id, value) VALUES (1, 2)
SET IDENTITY_INSERT table OFF
id being an Identity field in SQLServer.
I have the same table with a sequence in ORACLE, I couldn't find a snippet that shows how to disable the sequence and set it to start again with the MAX(id) + 1.
Any ORACLE expert can help me with this?
Thanks,
Rodrigo.
i try to create table from excel rows. however; excel columns :
column1 has max 200 character row
column2 has max 300 character row
column3 has max 500 character row
So i need to create sql
create MyTable column3 nvarchar(500) according to Excel Max Character.
Hi, does anybody have any experience writing unit tests for sql server 2000 DTS packages?
I about to start working with DTS and jobs, so I want to be able to unit test as much as possible. I guess i could invoke dtsrun.exe via command line , but perhaps someone else has better ideas.
Thanks
Fede
I need to be able to write a script to automatically connect mysql in batch mode so that I can run some .sql files.
I tried to enter the following at the prompt:
./mysql -u root -p mypassword
but I keep getting a "Enter password: " prompt.
What am I doing incorrectly?
Thanks.
Modeling tool or just a visual tool for drawing.
In fact I only need to draw and later I'll transform the picture into sql by hand
to better control the process.
I want to turn on logging of all SQL statements that modify the database. I could get that on my own machine by setting the log_statement flag in the configuration file, but it needs to be enabled on the user's machine. How do you enable it from program code? (I'm using Python with psycopg2 if it matters.)
I don't know if it is just me, but searching on google didn't reveal me answer to my question "How to install QueryAnalyzer for SQL Compact 3.5 DB on Windows Mobile 6.5 Professional emulator device". Does somebody knows how to do it?
i have some excell data. also excel column i created programmaticaly in sql tablr my excel column on the other hand; some column's name is "mydetail" if converting to to upper MYDETAIL. i must this ToUpper() event : MYDETAIL not MYDETAIL
Hi,
I have a site that processes orders taken by phone into a SQL database. Access to the portal uses Windows Authentication and I would like to pass the username of the order processor along with the order so that I can record who has taken the order.
How can I pass the user name to a form element?
The pages are written in classic asp.
Thanks.
I am using ASP.net with C# and am looking for a tool that given a SQL table name, reads the table columns and populates an aspx form with controls (textboxes with matching labels). Something like ComponentOne InputPanel, except that this product only works for WinForms.
See demo of ComponentOne InputPanel:
http://www.componentone.com/newimages/Products/Videos/StudioEnterprise/InputPanel/ComponentOneInputPanel.html
My boss asked me today to build him a SQL Database and I asked him what color it should be and he said Mauve has the most Ram. However I disagree, I think Orange has the most Ram. Can anyone help??
This may be a dumb question, but I was just watching a screencast on MySQL replication, and I learned that a master database doesn't send SQL over to a slave for replication, it actually sends data over in binary, which makes importing extremely fast. I started wondering, "if a database can export and import binary, why do mysqldumps / imports take so long?" Is there a way to get mysql to dump a database in binary in a similar fashion to speed up that process as well?
I have multiple SQL Server databases with the same schema. I would like to use one WCF data service (Rest service) to access the different databases.
How can I accomplish this so the client can pass in the correct database name or connection string?
I'm looking to build a SharePoint 2010 RTM environment and I'm wondering if there's a guide out there for doing so. I have 4 VMs (AD, WEB, SQL, IDX) to use to build the proper environment.
Hi All,
I have created the sql file to create table in DB,
I am using PHPMYAdmin But i am not able to connect to the DB,
I want to run this as Batch file.
If i try to MYSQL from command prompt it give error as
'mysql' is not recognized as an internal or external command,
operable program or batch file.
Regards,
Dev
i need to store a image(system.web.ui.image) in a sql[i use linq],for that i need to convert it into Binary(System.Data.Linq.Binary)....how to do this ?
I have an export from a MYSQL database on a linux machine however when importing that database into MYSQL on windows all of the table names that were camel cased are now all lower case. The sql dump has the correct case in it but the importing via phpmyadmin seams to remove these.
How can I import it and keep the case?
Thanks
Hi,
How do I write plane SQL queries using Doctrine connection object and display the results? For example, how do I perform:
SELECT * FROM table_name WHERE column_name LIKE '%anything_similar_to_this%';
using Doctrine something like this (this example does not work)
$search_key = 'search_for_this';
$conn = Doctrine_Manager::connection();
$conn->execute('SELECT * FROM table_name WHERE column_name LIKE ?)', $search_key);
echo $conn;
Hi everyone,
I have just made the update/add/delete part for the "Closure table" way of organizing query hierarchical data that are shown on page 70 in this slideshare: http://www.slideshare.net/billkarwin/sql-antipatterns-strike-back
However, I have a bit of an issue getting the full tree back as an multidimensional array from a single query.
Here's what I would like to get back:
array (
'topvalue' = array (
'Subvalue',
'Subvalue2',
'Subvalue3' = array ('Subvalue 1',
'Subvalue 2',
'Subvalue 3'
)
);
);
Hi all,
i am executing a procedure in mysql, procedure is-
delimiter $$
create procedure getFacility (in id int, out MyFacility VARCHAR(200))
begin
select Facility into MyFacility
from facilities
where FacilityID = id ;
end $$
delimiter ;
and it is giving error below-
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end $$
delimiter' at line 1
(0 ms taken)
how to solve this error?
Thanks,
Yugal
i am building a simple PM for my personal website where a user can join and send message to the registered users on my website,
i am stuck in grouping and selecting latest user (by latest msg time) in INBOX page
my table :
id msg_from msg_to msg date in_del out_del
i want to show latest user's id each in a group
here is my SQL query :
SELECT ttalk.id, ttalk.msg_from, users.first_name, users.last_name
FROM ttalk
INNER JOIN users ON ttalk.msg_from = users.id
WHERE ttalk.msg_to = '$_SESSION[user_id]' AND ttalk.in_del='0'
GROUP BY ttalk.msg_from DESC LIMIT 500
Thanks in advance :-)
Hi everybody,
I need to write an ASP.NET application which must handle a very large number of transactions per second - as many as 5000 users may transact at the same time. I think I will use WCF in back to communicate with SQL server. But in front, can IIS handle 5000 users at the same time effectively, or is there any simple way to host my application outside of IIS?