I currently have a stored procedure in which I want to insert new rows into a table. insert into cars (id, Make, Model) values(‘A new Guid’, “Ford”, “Mustang”) So the primary key ‘id’ is a Guid. I …
MySQL: Split comma separated list into multiple rows
I have an unnormalized table with a column containing a comma separated list that is a foreign key to another table: +———-+————-+ +————–+——-+ | part_id | material | …
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 <= 6 I can do this as a RAW sql query, but this is ...
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 help me? Answer If you pass null value to parameter,you will get this error even
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 …