I’m using some old code that runs a sql query as a reference. At some point, it gets to something like: sqlDataAdapter.Fill(dataSet); DataRow dataRow = dataSet.Tables[0].Rows[0]; Object obj = …
Tag: sql
mysql Creating a temporary table not working…undeclared variable error…whats wrong with my code?
When I run the code below inside phpmyadmin I get an error “Undefined Variable tmpportfolio” what is the problem? SQL: CREATE TEMPORARY TABLE tmpportfolio (p_name VARCHAR(255),portfolio_id INT …
sql query: return a list that will contain the users / groups who will have access to an application
I’m doing an sql query where I want to return a list that will contain the users / groups who will have access to an application. This is the scheme, we will see if a user have permissions, if not, we …
SqlBulkCopy from a List
How can I make a big insertion with SqlBulkCopy from a List of simple object ? Do I implement my custom IDataReader ?
django: datediff sql queries?
I’m trying to do the equivalent of the following SQL in Django: SELECT * FROM applicant WHERE date_out – date_in >= 1 AND date_out – date_in
Does SQL Server 2008 Service Pack 2 Apply to SQL Server 2008 R2?
I’ve been using SQL Server 2008 R2 for my development. I noticed that service pack 2 for SQL Server 2008 just came out. However, I checked here and Microsoft does not provide a link to any of the service packs for SQL Server 2008 R2. So it is not clear to me whether or not I should apply their service
MySQL Update Column +1?
I was wondering what would be the easiest way to update a column by +1? I will be updating a post count of a category based on when users submits a new post. Thanks.
The parameterized query expects the parameter which was not supplied
I’m having a problem with my code: Once I typed in the string in the textbox to search for an item I get this error: The parameterized query ‘(@Parameter1 nvarchar(4000))SELECT * FROM borrow where (Departme’ expects the parameter ‘@Parameter1’, which was not supplied. Can anyone …
How do I get rows for last 24 hours by unixstamp
I have this; $long = “86400”; $query = “SELECT * FROM users WHERE unixdate = UNIX_TIMESTAMP()-$long ORDER BY unixdate DESC”; But it doesn’t work. I would like to show all new users within …
SQL statement to get all customers with no orders
I have a typical Persons table and an Orders table defined in such a way that I can do JOIN query as the following to return Orders for all Persons. The question is, how do I write a statement that would return all Persons with NO Orders? I’m using mysql. Thank all in advance. Answer You may want to use