I am trying to create a booking database...but the design I keep coming up with makes me a bit uneasy. I don't really like it (because of massive joins involved in determining what time slots are available) but I don't see any other way to do this. So this is my design.
--This table stores...
Hi,
I have this select statment in a view
(SELECT
s.MyTime,p.FK_CategoryID,
(s.Col1-p.Col1) as Diff
FROM stats_main s,stats_comparison p WHERE s.FK_ComID = p.ComID)
UNION ALL
(SELECT
s.MyTime,p.FK_CategoryID,
(s.Col2-p.Col2) as Diff
FROM stats_main s,stats_comparison p WHERE s.FK_ComID =...
Hi,
I want to do something like
SELECT * FROM (SELECT tableName FROM MyTables WHERE userID =3)
tableName is a column in the table MyTables. tableName is the name of another table in the database. So what I want is to select from the data in the table whose name is tableName. What I don't...
I have just learned about temporary tables and am wondering when I should use them. I am currently designing a table that is very long (~500 million rows specific to a UserID and a Date) and am wondering if it makes sense to create a temporary table for users for a specific date range when the...
I am creating a database table and depending on how I design my database, this table could be very long, say 500 million rows. It is for an internet application that will be queried a lot (indexed on date and userID). Will it be slow for users to access data from this table? Should I consider...
I have a view that combines data from 4 tables. Can I create an index for the view? or should the indices created for the original tables speed up searching enough?
I want to set a value in a query. Here I want to create a colum MyType in the query and set it either 1 or 2. This doesn't work however.
SELECT
Avg(Col1), 1 as MyType
FROM Table1
UNION ALL
SELECT
Avg(Col2), 2 as MyType
FROM Table1
I have a problem. In my database, I need to group certain data. I can either do about 20 queries (and get all the data separtly). This is a nuscience because the data will not me in a nice form.
Or, I can create a view and union the 20 queries. This would be easier for me to work with but...
I have a data base that has many columns. Basically, there are 36 data columns. However, in some rows, as few as only 10 columns will contain data (the others will be null). Most of the time, only 15 to 20 of the rows will contain data. The columns are of datatype tinyint(3) so i don't think...
I have this code and it is not working. Anyone know why? I'm using ASP.NET and it shows getAttribute as having the following arguments...getAttribute(strAttributeName, [lFlags], AttributeValue) which doesn't make any sense to me. Anyway, here is the code I was trying to use.
<script...
Hi,
Can anyone suggest some nice looking webpages? I'm looking for a layout for a new site and was hoping to see some examples of some good ones before I started.
Hi,
Can anyone suggest some nice looking webpages? I'm looking for a layout for a new site and was hoping to see some examples of some good ones before I started.
Hi,
I have some calculations I need to do. I can create a stored procedure to do them or I can do them in an asp.net page.
So, which is quicker/more efficient?
I know in the aspx source code, I can access the connection strings using "<%$ ConnectionStrings:ConnString%>"
However, I want to access it from the .vb file. How do I do this? CurrentlyI am using the appsettings as a quick fix
ConfigurationSettings.AppSettings("myConnectionString")
Hi,
I am developing a site that allows users to view data. Each user, however, may wish to view the data in slightly different ways (eg, different graphs, different labels, different layouts, etc). Should these user preferences be stored in a cookie or in a database? I'm leaning towards...
Hi,
I want to pass a column name as a variable to a stored procedure. Is this possible? Here is something like what I want although it generates an error.
CREATE FUNCTION `GetMax`(ColName char(10)) RETURNS int(11)
BEGIN
DECLARE MaxScore INT;
SELECT Max(ColName) INTO MaxScore FROM...
Hi,
I am creating an image via code during runtime. I need to display this image on my webpage. One way to do this would be to save the image to a file, and then have an image object reference the file. However, the page gets updated constantly and tons of images would be generated.
so...
Hi,
I think I'm very close to getting the DetailsView insert/update/delete to work but I haven't quite got it. Does anyone know what's wrong? Delete and update don't do anything. Insert adds a new row of data in my database, but the values are NULL except for the identity column.
Here is...
Hi,
I am trying to use the login control to authenticate users based on a MySQL database. Everything works fine except the remember me part of the control. Do you know how I enable this?
this is the only code I needed to authenticate the users
Protected Sub Login1_Authenticate(ByVal...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.