Hi guys - I have two tables here: One holds a list of subscriber emails:
(ID, email)
and the other holds a list of domains:
(ID, domain)
I want to figure out a sql statement that allows me to select * the email addresses which belong to the domains listed in the domain table assuming that all emails are of the form:
name@domain
...
I seem to be going wrong somewhere in this INSERT query. Can someone tell me how to make this work?
Thanks.
INSERT INTO tablename ('score', 'coins-earned', 'bonus-used', 'topmultiplier', 'highscore', 'currentposition', 'super', 'star', 'color')
VALUES ('1', '2', 'TRUE', '3', 'TRUE', '4', '5', '6', '7')
...
I just wanna ask best practice
supposed I have three tables. posts, categories, post_Categories. One post can have one or many categories
Post
post_id post_title post_body
1 title 1 body1
2 title 2 body2
Categories
cat_id cat_name
1 C#
2 Java
3 PHP
posts_categories
pc_id pc_p...
Our software currently runs on MySQL. The data of all tenants is stored in the same schema. Since we are using Ruby on Rails we can easily determine which data belongs to which tenant. However there are some companies of course who fear that their data might be compromised, so we are evaluating other solutions.
So far I have seen three ...
Do linq generated queries get cached effectively by SQL Server 2008?
or is it better to use stored procedures with linq or what about a view and then using compiled linq queries... opinions?
cheers
emphasis here is on "effectively", and or is it better....
ie. views are cached well by sql server, and then using linq on the view....
...
I have this table:
option_values table:
option_id (FK)
value_id (PK)
classified_id (FK)
value
example:
option_id (FK) value_id (PK) classified_id (FK) value
1 1 22 'Petrol'
2 2 22 'Manual'
3 ...
txtAddress.Text = DB.ProfileDataset.Tables("tblCustomers").Rows.Item("Address").toString
The above code generated Option Strict On disallows implicit conversions from 'String' to 'Integer' error under the Item("Address")
I don't know what i did wrong...
...
On the home page of my website I want to display the latest posts to the forum however I don't want to show the same topic twice. How can I modify the code below to do this?
http://punbb.informer.com/wiki/punbb13/integration#recent_10_posts
Basically show the latest posts, but only once for each forum topic/thread.
...
I have a SqlServer db that I would like to port to MySQL. What's the best way to to this. Things that need to be ported are:
- Tables (and data)
- FileStream --> MySQL equivalent?
- Stored Procedures
- Functions
...
I have a MySQL table with a primary key field that has AUTO_INCREMENT on.
After reading other posts on here I've noticed people with the same problem and with varied answers. Some recommend not using this feature, others state it can't be 'fixed'.
I have:
course table - with 2 fields - courseID, courseName
Example:
Number of records i...
Is this the correct way to do it?
DELETE t1, t2, t3, t4 FROM
table1 as t1
INNER JOIN table2 as t2 on t1.id = t2.id
INNER JOIN table3 as t3 on t1.id=t3.id
INNER JOIN table4 as t4 on t1.id=t4.id
WHERE t1.username='%s' AND t1.id='%s'
Thank you.
...
I want to INSERT INTO a table in a record varbinary(max) a Byte array How can I do that?
...
I have a table that has a date, item, and quantity.
I need a sql query to return the totals per day, but the total is the quantity minus the previous day totals. The quantity accumulates as the month goes on. So the 1st could have 5 the 2nd have 12 and the 3rd has 20.
So the 1st adds 5
2nd adds 7 to make 12
3rd adds 8 to make 20.
I'v...
Hi folks,
I have the following sql statement, which works perfectly fine. I was hoping to see how this could be refactored so it doesn't require the use of RANK/PARTITION ... if possible.
SELECT LogEntryId, FileId, CreatedOn, EventTypeId
FROM (SELECT a.LogEntryId, a.FileId, a.CreatedOn, a.EventTypeId,
RANK() OVER (PARTITION B...
I am interested in knowing the pros and cons of creating a custom system supported by a database like the one described below:
It has 6 tables that support it.
Entity: Lets say, anything "physical" that can exist and have detail stored against it
(Hilton Hotel, Tony Taxi, One Bar)
Entity Type: A grouping/type of entity
(Bar, Hotel, Re...
I have a MYSQL5 database and PHP 5. I need a query for a games websites index page that only selects the first 12 from each category of games. Here is what I have so far.
$db->query("SELECT * FROM `games` WHERE status = 'game_published' AND `featured` = '1' ORDER BY `category`");
The php code then groups games of the same category ...
HI
I am having problem with getting all the columns back when i execute following code in excel vba. I only get 6 out of 23 columns back.
Connection, command etc works fine (i can see exec command in the SQL Profiler), data headers are created for all 23 columns but i only get data for 6 column.
Side Note: it's not prod level code, h...
suppose i have two tables. articles and comments.
when i am selecting columns from articles table, i also want to select the number of comments on the article in the same select statement... (suppose the common field between these two tables is articleid)
how do I do that? I can get it done, but I do not know if my way would be effici...
I would like to know what data structure / storage strategy I should use for this problem.
Each data entry in the database consists of a list of multiple ordered items, such as A-B-C-D, where A, B, C, D are different items.
Suppose I have 3 entries in a database,
A-B-C-D
E-F-G
G-H-B-A
When the user entered some unordered items, I h...
I'm developing an App on windows mobile and android, i needed a database for this app and as of now have shortlisted 3 lite databases.
SQLite
Ultralite (from Sybase)
Oracle Lite
of these 3, i was unable to configure UltraLite with my existing project on VS2008.
i am currently using SQLite with the dll from http://sqlite.phxsoftware.com ...