Lets say there is some code that executes the following SQL query:
set rowcount n
But n is unknown. Is there any way to know what n was? I'm using Sybase.
Finding it a little bit tedious migrating to the new Mysql Workbench (5.2.22) even though it has many more features than the older GUI tools. Right now I'm confused why I can't find an SQL reference when I open the Doc Library. Is there a way to access this info within the workbench, I'd prefer not to have to open a browser to access reference info on the web.
Is it possible to deceive SQL Server to return a different date on GetDate() without actually changing the machine date?
This would be great, since we have a database with old data and I'm trying to test some queries that use getdate().
I can change my machine date but that brings some other problems with other applications...
Any tips?
Thanks!
I have a table Course and every Course has many Resources.
Course
==========
course_id
Resource
==========
course_id
number
I want something like a seperate autoincrement for each course_id. Or, in other words, I want to auto-enumerate the resources for a given course. For example, the resource table could look something like:
course_id | number
==================
1 | 1
1 | 2
2 | 1
1 | 3
1 | 4
2 | 2
2 | 3
and so on.
I want to do this in SQL, using IBM DB2.
Before going into production, our client demands actual numbers of how many users our web application can handle.
We have all kinds of features implemented including asset management (file uploads/downloads), documents import/export, various statistics, web-services etc.
Which tool (or set of tools) could do this?
Application details:
XHTML/jQuery
Coldfusion 8
SQL Server 2008
Windows Server 2008
Can someone point me towards a resource or show me an example of a good way of writing sql statements in php.
Most statements seem so ugly and unreadable.
Hi,
I hv a table like this :-
Item Qty Price A Price B
abc 5 36.00 0
qwe 8 0 48.00
zxc 6 12.00 0
poi 4 10.00 0
lkj 9 12.00 0
mnb 3 0 14.00
vfr 7 0 6.00
How can I sum the value using SQL ie. if Price A is zero, it will pick Price B. The expected results will be as follows :-
Item Value
abc 180.00
qwe 384.00
zxc 72.00
poi 40.00
lkj 36.00
mnb 42.00
vfr 42.00
I have one table bbc(country, region, area, population, gdp).
I want to select the regions with a total population of at least 100 million. How can I do it with SQL?
Hi
We've noticed something odd with our Coldfusion 8 client variables DB. We have many more (about 3 times as many) CGlobal entries as we have CData entries.
I would have assumed that the relationship would be 1:1 on the cfid column.
Has any one else noticed this before? I have ruled out old data, my sample is less than 3 hours old. We're using SQL Server 2000 to host the tables.
Thanks in advance,
Ciaran
Hello all,
I am just reading this article and I came across this:
Filter: Remove any functions in the
WHERE clause, don't include views in
your Transact-SQL code, may need
additional indexes.
If I do not use views, what are the alternatives? I mean, in my situation, I want to select some data from a table and then use a few other select queries to work on the subset of data from the first select query?
How can I do this efficiently?
Thanks all
Hi All,
How can we set permissions for users to only allow them to download SSIS packages from the production server and but deny them permissions to run any package in the Server.
http://msdn.microsoft.com/en-us/library/ms141053(SQL.90).aspx
If i assign users to any of the DB roles db_dtsadmin, db_dtsltduser, and db_dtsoperator they will automatically have permission to run the package.
Appreciate your inputs.
Thanks!
What tool for managing Oracle DB do you suggest? I need to execute scripts and manage data in tables and develop some scripts and packages. I'v tried SQL developer and actually don't like it. Want some more features for developing (debug, code assist, integrated help and so on.)
If I have a Parent and Child table in MySQL related by a foreign key, is it possible using a SQL statement to move certain rows from Parent and the related rows from Child into archive tables (e.g. Parent_Archive and Child_Archive) in an atomic manner?
Money, Staff, Skill and preference to open source or commercial is neutral. Lets take the best of the best programmers (for arguments sake) and think about this:
What will perform better overall:
PHP & MySQL
or
ASP.Net & Microsoft SQL
(I don't want biased answers, just
looking for Performance, and Speed).
I am making a windows service to be able to run operations on a sql server database (insert, edit, etc) and invoke Stored Procs.
However, is there a way for me to know the type of the SP? When invoking from C#, I need to knof if it is returning 1 value, or more, or none (so I can use executereader, scalar, etc)?
Thanks
In what cases would a call to java.sql.ResultSetMetaData.isSearchable(int col) return false for an Oracle database? The documentation for the method doesn't really answer the question:
"Indicates whether the designated column can be used in a where clause."
I can think of only one case - when the column is the result of an aggregate function (in which case it would have to be part of a HAVING filter, not a WHERE filter).
Are there any other cases?
Hi,
I have a sql script file that upon import creates a table in a MySQL database and fills it with 2800 record. These are all the postal codes for the country Belgium.
Now I would like to make a Ruby on Rails database migration file from this. Any idea how I can do this?
Thanks,
Michael
We have two tables:
Vehicle: Id, RegistrationNumber, LastAllocationUserName, LastAllocationDate, LastAllocationId
Allocations: Id, VehicleId, UserName, Date
What is the most efficient (easiest) way to update every row in Vehicle table with newest allocation? In SQL Server I would use UPDATE FROM and join every Vehicle with newest Allocation. Oracle doesn't have UPDATE FROM. How do you do it in Oracle?
hi,
i have to create window service which read the xml file and and take the node's value to connect the sql server and create the log file i have already created window application for that but i don't know how to create win services.
Can I have a SQL query to get the data from columna in tableA whose values don't start with 'f' ?
For example:
select * from tableA where columnA
where values don't start with letter 'F'.
I have an application that creates a Sql Server 2008 database. When I create the database, I would also like to create a datasource for SSRS.
How can I do this?
I have this sql query:
SELECT
S.SEARCH,
S.STATUS,
C.TITLE AS CategoryName,
E.SEARCH_ENGINES AS Engine,
S.RESULTS,
S.DATE,
S.TOTAL_RESULTS AS Total,
S.ID
FROM
PLD_SEARCHES AS S
Join PLD_CATEGORY AS C ON C.ID = S.CATEGORY_ID
Join PLD_SEARCH_ENGINES AS E ON S.SEARCH_ENGINES_ID = E.ID
ORDER BY S.DATE ASC
I want to identify if S.STATUS is either 1 or 0 and according to those values to return COMPLETE or PENDING in the query results
Hi,
I got used to the xml support and recursive common table expressions of sql server 2005. I am just wondering whether any free dbs like mysql support these requirements nowadays? Thanks.
Christian
Has anybody done any benchmarking/evaluation of the popular open-source embedded SQL DBs for performance, particularly write performance? I've some 1:1 comparisons for sqlite, Firebird Embedded, Derby and HSQLDB (others I am missing?) but no across the board comparisons... Also, I'd be interested in the overall developer experience for any of these (for a Java app).