I'm confused as to the difference. Being fairly new to .Net, I know I can query IEnumarables using the Linq extensions. So what is this IQueryable and how does it differ?
i've copy a query from view (by filtering) and when i tried to excute it, it throws an error message that says "invalid object name 'bla bla'".
how can i fix it?
am using windows 7(ultimate) os and sql server 2005 express.
I have a select query producing a big output and I want to execute it in sqldeveloper, and get all the results into a file.
Sql-developer does not allow a result bigger than 5000 lines, and I have 100 000 lines to fetch...
I know i could use SQL+, but let's assume I want to do this in sqldeveloper.
I have a polymorphic association (Class Table Inheritance) and I need use DQL to query entities of a specific child class wich can be done using "x INSTANCE OF Entity" in WHERE clause. Now I need to put conditions specific for that child class but I get this error:
"Class Person has no association named student_field_1"
Person = Parent Class
Employee = Child class
Student = Child class
is there any way yo cast of somehow tell Doctrine that the Person is actually a Student and to allow me to put Student fields in the WHERE?
I have the fql query as shown below.
Select uid,profile_url,pic_square from user where name="Ershad"
here i am getting a response as below.
xml version="1.0" encoding="UTF-8"
fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true"
But i want all the list.All the details uid,profile_url and pic_square.
Please anyone help me out..
[Cross-Posting from ServerFault]
I am in a development environment, and our test Oracle 9i server has been misbehaving for a few days now. What happens is that we have our JDBC connections disconnecting after a few successful connections.
We got this box set up by our IT department and handed over to. It is 'our problem', so options like 'ask you DBA' isn't going to help me. :(
Our server is set up with 3 plain databases (one is the main dev db, the other is the 'experimental' dev db). We use the Oracle 10 ojdbc14.jar thin JDBC driver (because of some bug in the version 9 of the driver). We're using Hibernate to talk to the DB.
The only thing that I can see that changed is that we now have more users connecting to the server. Instead of one developer, we now have 3. With the Hibernate connection pools, I'm thinking that maybe we're hitting some limit?
Anyone has any idea what's going on?
Here's the stack trace on the client:
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) [hibernate3.jar:na]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) [hibernate3.jar:na]
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate3.jar:na]
at org.hibernate.loader.Loader.doList(Loader.java:2235) [hibernate3.jar:na]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) [hibernate3.jar:na]
at org.hibernate.loader.Loader.list(Loader.java:2124) [hibernate3.jar:na]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) [hibernate3.jar:na]
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) [hibernate3.jar:na]
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) [hibernate3.jar:na]
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149) [hibernate3.jar:na]
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate3.jar:na]
...
Caused by: java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:829) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1049) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3415) [ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.4.0"]
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) [hibernate3.jar:na]
at org.hibernate.loader.Loader.getResultSet(Loader.java:1812) [hibernate3.jar:na]
at org.hibernate.loader.Loader.doQuery(Loader.java:697) [hibernate3.jar:na]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) [hibernate3.jar:na]
at org.hibernate.loader.Loader.doList(Loader.java:2232) [hibernate3.jar:na]
I have written this query for retrieving data from mysql as below
select FeedbackCode,EMailID,FeedbackDetail,
Date_Format(FeedbackDate,'%m,%d') as 'Feedback_Date'
from FeedbackDetail
where EMailID not like '' and InstanceCode =5
and I'm binding this data with GridView in asp.net but at the column of Feedback_Date,
instead of Date I receive System.Byte[].
If there exists an old data of a model say ,
query=Emp.objects.filter(pk=profile.id)
Is there a easier way to copy the same values into the same model again..
Now that the id will be different so..
I have this requirement.
Thanks..
Hello,
I would like to format nicely a date received from a query like:
SELECT recdate FROM myrecords;
pratically I am searching the function to pretty formatting with a date pattern,
better if SimpleDateFormat like. And if not possible how can I build a class for formatting
with somtehing like:
SELECT MyFormatter(recdate) FROM myrecords
Hey all-
I'd like to add an index to a table that already contains data. I know that there a few records currently in the table that are not unique with this new index. Clearly, MySQL won't let me add the index until all of them are.
I need a query to identify the rows which currently have the same index. I can then delete or modify these rows as necessary. The new index contains 6 fields.
Thanks-
Jonathan
Hi All,
After Creating Full Text Catalog and Full Text index
i have tried the following query
SELECT gamename FROM sample WHERE CONTAINS(name,'"f1"')
Error:
Msg 30046, Level 16, State 1, Line 1
SQL Server encountered error 0x80070422 while communicating with full-text filter daemon host (FDHost) process. Make sure that the FDHost process is running.
To re-start the FDHost process, run the sp_fulltext_service 'restart_all_fdhosts' command or restart the SQL Server instance.
Geetha.
I want to do something like this in a stored procedure:
IF case_sensitive = FALSE THEN
SET search_collation = "utf8_unicode_ci";
ELSE
SET search_collation = "utf8_bin";
END IF;
INSERT INTO TABLE1 (field1, field2)
SELECT * FROM TABLE 2 WHERE some_field LIKE '%rarf%' collate search_collation;
However, when I do this, I get
ERROR 1273 (HY000): Unknown collation: 'search_collation'
How can I use a dynamic collation without having two copies of the same query?
Hi,
Not really a coding question more a little help with my idea of a Relational database.
If I have 3 tables in a SQL database. In my php script I basically query the companies which are in industry "a" and then insert a row into a seperate table with their details such as companyId , companyName etc is that a type of Relational database ?
I have explained it in a simple way so we don't get confused what I am trying to say.
I was wondering if there is something similar to GCC_XML for C#3; basically a way to represent a program's entire syntactic structure in XML.
Once the representation is created, I was hoping to parse it into an XDocument and interpret or query it from there.
Are there tools out there for this?
Hello Experts,
I posted this query here, but as usual, noone knows / no replies
http://www.anddev.org/viewtopic.php?p=41513#41513
How can I launch the android default mail application through the click of a button in my code?
I would also like to know, how this can be done to launch the contacts list also.
Any help in this regard is appreciated,
Regards,
Rony
How do you specify the the row terminator when outputting query results using sqlcmd?
bcp is not an option.
sqlcmd -E -s" " -Q "Select * From SomeTable" -o C:\Output.txt -W
What is the default row terminator?
Hi,
I need to create a sub-report within a subreport, I'm using xpath as my query language.
Any suggestion on how I can create it.
To Illustrate it:
Line Details - 1st sub-report
Line Detail Info - 2nd sub-report
Each Line Details can have 1 Line Detail Info.
Thanks
In the following model:
class header(models.Model):
title = models.CharField(max_length = 255)
created_by = models.CharField(max_length = 255)
def __unicode__(self):
return self.id()
class criteria(models.Model):
details = models.CharField(max_length = 255)
headerid = models.ForeignKey(header)
def __unicode__(self):
return self.id()
class options(models.Model):
opt_details = models.CharField(max_length = 255)
headerid = models.ForeignKey(header)
def __unicode__(self):
return self.id()
If there is a row in the database for table header as
Id=1, title=value-mart , createdby=CEO
How do i query criteria and options tables to get all the values related to header table
id=1
Also can some one please suggest a good link for queries examples,
Thanks..
I have an Android application that uses kSoap in connecting to my web services. This particular one is passing in a string value as a parameter, then my web service will use that parameter to query my database via a stored procedure. Problem is, I know how to pass the parameter from android, but I don't know how to retrieve it in my .Net(vb) web service and use it. Anyone have any code examples or a link to a tutorial to help me out? Thanks!
I want to write a query like this:
SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice)
FROM Order o
But this isn't how the MAX function works, right? It is an aggregate function so it expects a single parameter and then returns the MAX of all rows. Does anyone know how to do it my way?
does anyone tried doing cache for spring-ntlm NtlmProcessingFilter.java file so that every request no need to query from microsoft active directory to authenticate user ? how to implement such cache using ehcache
Hi all, i have a couple of sql views with composite primary keys that i want to query, and since Hibernate makes it a pain to work with composite keyes, im using createSQLQuery. The problem is that this method can only return a List, and i need to refer to the colums by their index.
Any chance i could do like jdbc and refer to the columns by their sql name insted of their index? thanks
Hi.
I'm using sql plus to execute a query (a select) and dump the result into a file, using spool option.
I have about 14 millions lines, and it takes about 12 minutes to do the dump.
I was wondering if there is something to make the dump faster?
Here below my sql plus options:
whenever sqlerror exit sql.sqlcode
set pagesize 0
set linesize 410
SET trimspool ON
set heading on
set feedback off
set echo off
set termout off
spool file_to_dump_into.txt
select * from mytable;
Thanks.
I have a perl script, which takes a query string parameter, connects to a database and displays data.
I'd like to include that script in a PHP file like so:
include('perlscript.pl?item=302');
Such that the perl script's response is displayed on the PHP/HTML page.
How can I do this?
Is this a correct way for id generation in MySQL ?
INSERT INTO Picture
(PictureId,First_pick,Title,Description,File_Name,Is_Vertical)VALUES
((SELECT max(pictureid)+1 FROM Picture),0,?,?,?,?)
I mean if it is guaranted that PictureId will be unique when this query is run by many threads ?
I can't modify table structure. Should I use any specific locks, index or transaction isolation level ?
Regards, Michal