I have a query that I use for charting in reporting services that looks something like:
(SELECT Alpha, Beta, Gamma, Delta, Epsilon, Zeta, Eta, Theta, Iota, Kappa, Lambda, Mu,Nu, Xi from tbl
WHERE
Alpha in (@Alphas) and
Beta in (@Betas) and
Gamma in (@Gammas) and
Delta in (@Deltas) and
Epsilon in (@Epsilons) and
Zeta in (@Zetas) ...
I've read that compound primary keys will confuse the hell out of typical ORM code generators. Which ORMs work best with compound PKs and which to avoid? (I've a particular interest in .NET)
...
Does anyone know any visual MySQL diff tools?
I have about 10 machines all with their own instance of MySQL. No replication is taking place, since each machine acts independently of the others. However, their table structures must be identical, and I would like a quick way to verify their table structures.
I'm not so concerned about ...
Hi all,
I have a problem perplexing me to no end. When I run the following query against an access database:
SELECT *
FROM PreferredSpacer INNER JOIN SpacerThickness ON PreferredSpacer.SpacerTypeID = SpacerThickness.SpacerTypeID
ORDER BY PreferredSpacer.UnitTypeID DESC
(UnitTypeID field is a text type)
The results do not come ...
I have looked at some resources already and just want to clarify and get an opinion.
First of all to totally avoid any problems we could just not bother using identity columns as primary keys instead have them generated ourselves and just have those values replicated both ways presuming they are always unique at any time of creation.
F...
I'm trying to construct a query that will include a column indicating whether or not a user has downloaded a document. I have a table called HasDownloaded with the following columns: id, documentID, memberID. Finding out whether a user has downloaded a specific document is easy; but I need to generate a query where the results will look ...
Hello, I've make an application in php that uses DOMDocument() in php 5.
The problem is that my server uses php4 and DOM object is not recognized. What can I do?
Can I download any kind of software and put it in my server and use include?
wich one?
Thanks a lot.
...
I'm looking for a way to transform a genuine string into it's hexadecimal value in SQL. I'm looking something that is Informix-friendly but I would obviously prefer something database-neutral
Here is the select I am using now:
SELECT SomeStringColumn from SomeTable
Here is the select I would like to use:
SELECT hex( SomeStringC...
Is there a query that returns the names of all the stored procedures in an MS SQL database (excluding "System Stored Procedures" would be a nice touch)?
...
I have a table of data, and I allow people to add meta data to that table.
I give them an interface that allows them to treat it as though they're adding extra columns to the table their data is stored in, but I'm actually storing the data in another table.
Data Table
DataID
Data
Meta Table
DataID
MetaName
MetaData
So...
I need to store a url in a MySQL table. What's the best practice for defining a field that will hold a URL with an undetermined length?
...
A cross join performs a cartesian product on the tuples of the two sets.
SELECT *
FROM Table1
CROSS JOIN Table2
Which circumstances render such an SQL operation particularly useful?
...
SQL databases seem to be the cornerstone of most software. However, it seems optimized for textual data. In fact when doing any queries involving numerical data, integers specifically, it seems inefficient that the numbers are getting converted to text and then back to native formats both ways between the application and the database. Th...
e.g,
foo1
foo2
foo10
foo100
rather than
foo1
foo10
foo100
foo2
Update: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me.
...
Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp).
...
Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn diagram) where I is the Intersection.
I am lo...
I have a script that needs to extract data temporarily to do extra operations on it, but then doesn't need to store it any further after the script has run. I currently have the data in question in a series of temporary local tables (CREATE TABLE #table), which are then dropped as their use is completed. I was considering switching to ...
Are the .net classes relating to DbProviderFactory thread safe?
...
I want to be able to check the status of a publication and subscription in SQL Server 2008 T-SQL. I want to be able to determine if its okay, when was the last successful, sync, etc.. Is this possible?
...
I have a web application that I'm writing (C#, MSSQL) and I need to store the timestamp when a record is stored in the system. Normally, I would just do this with SQL and the DATETIME function. However, the server is located in a different time zone than our company is located... AND we may change to another server in completely differ...