Hey All
i have a image gallery and i want to limit the set where is shows 4 images in each row at a max of 3 columns, if its possible how is it made, and well it be easy using php,
Suppose, I want to record say poll choices by users everyday. In this case, i have a table named vote which has columns poll , choice and user-id . So how can i out the constraint (maybe in the django models or wherever possible) that poll and user-id both should not be the same for any entry but like the same user can vote for various different polls once and obviously various users can vote for the same poll. I hope I am clear.
Consider this data
PK field1 field2
1 a b
2 a (null)
3 x y
4 x z
5 q w
I need to get this data
select all columns from all rows where field1 has count 1
i tried and finally settled for
select * from mytable where field1 in
(select field1 from mytable group by field1 having count(field1)>1 ) order by field1
but there has to be a better way than this
I am using ASP.net with C# and am looking for a tool that given a SQL table name, reads the table columns and populates an aspx form with controls (textboxes with matching labels). Something like ComponentOne InputPanel, except that this product only works for WinForms.
See demo of ComponentOne InputPanel:
http://www.componentone.com/newimages/Products/Videos/StudioEnterprise/InputPanel/ComponentOneInputPanel.html
Hi,
I have the DataTable with following columns:
id, Name, Description, ParentId
and would like to create a WPF control (.NET 4.0 framework) which implements a combobox which displays the names which are bound to values of id. So when the user selects a name displayed in the combobox the behind logic has to retrieve its id value.
I would be very thankful if anyone could show the way of doing the described above.
Hi All,
Am having columns as category and songs in my table for each category there are almost 10 songs and in total there are 7 category such that which was tabled as
category1 songCategory1a
category1 songCategory1b
category1 songCategory1c
---
category2 songCategory2a
category2 songCategory2b
category2 songCategory2c
---
category3 songCategory3a
category3 songCategory3b
category3 songCategory3c
---
like that there is table in that i want to get the result as
category1
category2
category3
category4
kindly any one help me ,
i tried
(from s in _context.db_songs
select new { s.Song_Name, s.Song_Category }).Distinct().ToList(); but it didnt work its resulting as such.
I have this datagrid which has columns with a NumericStepper as an itemEditor where the user can change the number of items he wants to buy. How can I calculate the sum of all cells when the user updates datagrid's values?
Thanks in advance
Im able to generate tables with all required columns and with datas in excel sheet. now i want to insert image that is present in my bin.how can i achieve this.
thanks in advance
I've got a table (col1, col2, ...) with an index on (col1, col2, ...). The table has got millions of rows in it, and I want to run a query:
SELECT col1, COUNT(col2) WHERE col1 NOT IN (<couple of exclusions>) GROUP BY col1
Unfortunately, this is resulting in a full table scan of the table, which takes upwards of a minute. Is there any way of getting oracle to use the index on the columns to return the results much faster?
What I am trying to do is to get from SqlAlchemy entity definition all it's Column()'s, determine their types and constraints, to be able to pre-validate, convert data and display custom forms to user.
How can I introspect it?
Example:
class Person(Base):
'''
Represents Person
'''
__tablename__ = 'person'
# Columns
id = Column(String(8), primary_key=True, default=uid_gen)
title = Column(String(512), nullable=False)
birth_date = Column(DateTime, nullable=False)
I want to get this id, title, birth date, determine their restrictions (such as title is string and max length is 512 or birth_date is datetime etc)
Thank you
I have 'Service' table and the following column description as below
Is User Verification Required for service ?
Is User's Email Activation Required for the service ?
Is User's Mobile Activation required for the service ?
I Hesitate in naming these columns as below
IsVerificationRequired
IsEmailActivationRequired
IsMobileActivationRequired
or
RequireVerification
RequireEmailActivation
RequireMobileActivation
I can't determined which way is the best .So, Is one of the above suggested name is the best or is there other better ones ?
Hello.
Recently i found that SQLite don't support DISTINCT ON() clause that seems postgresql-specific. For exeample, if i have table t with columns a and b. And i want to select all items with distinct b. Is the following query the only one and correct way to do so in SQLite?
select * from t where b in (select distinct b from t)
Hi,
Is it possible to find all the varchar() columns in my database?
I am using SQL Server 2008 and would like to get the list in SQL server management console.
JD.
Why does SQL server 2008 always warn about needing to drop tables to rename columns? I was under impression this was not required unless it was a key. If I change a column from null to not null even if is not a key field it wants to drop table and all relations.
I saw this question and it reminded me of AutoGenerateColumns in the old DataGrid. The few times I've used them, I ended up backing it out because I needed data formatting past the standard "spit out the Data Source columns." Likewise, with toggle, it sounds like it would save time, but then you end up needing to keep track of state or something else, and you rewrite the code accordingly.
Are there things that you end up using thinking it will save you time, but end up backing out because it doesn't do what you need?
Hi All:
I want know is there good way to detect Column DataType for Date field (NOT DateTime)?
This what currently I do:
switch (dt.Columns[col].DataType.FullName)
{
case "System.DateTime":
formatedVal = Formatter.GetDateTime(val);
break;
// which is NOT possible, but something equivalent am looking for
case "System.Date":
formatedVal = Formatter.GetDate(val);
break;
default:
formatedVal = val.ToString();
break;
}
Thanks a bunch. :-)
At my job, we have pseudo-standard of creating one table to hold the "standard" information for an entity, and a second table, named like 'TableNameDetails', which holds optional data elements. On average, for every row in the main table will have about 8-10 detail rows in it.
My question is: What kind of performance impacts does this have over adding these details as additional nullable columns on the main table?
Hi
I am trying to perform a 2d convolution in python using numpy
I have a 2d array as follows with kernel H_r for the rows and H_c for the columns
data = np.zeros((nr, nc), dtype=np.float32)
#fill array with some data here then convolve
for r in range(nr):
data[r,:] = np.convolve(data[r,:], H_r, 'same')
for c in range(nc):
data[:,c] = np.convolve(data[:,c], H_c, 'same')
It does not produce the output that I was expecting, does this code look OK
Thanks
How can I change the Default Size of the filterBy text box in Rich Table? In all the columns, it has a same (fix) size.
I used the property width, but it didn't work.
iam having a table with columns like
id || counter
if i do something (some event) i want the counter's value(at a particular id) to increase by one , currently iam doing this :
//get current value
current_value = select counter from myTable where id='someValue'
// increase value
current_value++
//update table with current value
update myTable set counter=current_value where id='someValue';
currently iam running 2 queries for this, please suggest me some way do it in one step.
I am new to sencha , and using sencha 2 mvc. I have a cfc returned json data, which I want to use in my list views. I have read about CFJsonReader and CFQueryReader, but both have been scripted for EXt Js 3 x. I cant see an mvc proper code for sencha 2 anywhere else.I tried many times and all in vein.Please some help suggest me/help me to solve my problem ...My outpur is like :
{"QUERY":{"COLUMNS":["CLIENTID"],"DATA":[[1013],[1010],[1016],[1017],[1013]]},"TOTALROWCOUNT":5}
Please pls help me...
is there an activerecord (any similar SQL-wrapper) for python? which is good for:
used in a server-side python script
light-weight
supports MySQL
what I need to do:
insert (filename, file size, file md5, the file itself) into (string, int, string, BLOB) columns
if the same file (checksum + filename) does not exist in db
thx
If you have a table with a clustered index on the Primary Key (int), is it redundant and bad to have one (ore more) non-clustered indexes that include that primary key column as one of the columns in the non-clustered index?
Hi All,
What LayoutManager should I use to achieve a transposed version of FlowLayout?
Essentially, I want a vertical list which occupies multiple columns if it can't fit all of it's components within one column.
+------------------------+
| item 1 |
| item 2 |
| item 3 |
| item 4 |
| item 5 |
| item 6 |
| item 7 |
| item 8 |
+------------------------+
or
+------------------------+
| item 1 item 7 |
| item 2 item 8 |
| item 3 |
| item 4 |
| item 5 |
| item 6 |
+------------------------+
Is this query equivalent to a LEFT OUTER join?
var rows = from a in query
join s in context.ViewSiteinAdvise on a.Id equals s.SiteInAdviseId
where a.Order == s.Order
select new
{....};
I tried this but it did not result
from s in ViewSiteinAdvise
join q in query on s.SiteInAdviseId equals q.Id into sa
from a in sa.DefaultIfEmpty()
where s.Order == a.Order
select new {s,a}
I need all columns from View