I have the below code in test.sql file. When there is a record in test_summary table everything works fine. But when there is no record inside the table it fails. I want it to continue to print the dbms_output message and process when there is no record. How can I do that?
declare
total_var number(20,2) := 0.0;
nl_var ...
Hi there,
I found that Entity SQL support NEWID(), but does ObjectQuery support it as well?
http://msdn.microsoft.com/en-us/library/bb738616.aspx,
Can I write objectquery like:
context.member.orderby("NEWID()").select("it.UserID");
or something like this? or I should write in other way?
I thought if entity sql support NEWID() func...
I am building a web application that will essentially allow authenticated users access to mass amounts of data, but I don't want users to only have read-only access. If there are records missing fields but a user has found information to fill these fields or correct already populated data, I would like the user to be able to do so.
Howe...
The database schema is
CREATE TABLE sites
(
site_id INTEGER PRIMARY KEY AUTOINCREMENT,
netloc TEXT UNIQUE NOT NULL,
last_visited REAL DEFAULT 0,
crawl_rate REAL DEFAULT 2,
crawl_frequency REAL DEFAULT 604800,
robots_txt TEXT DEFAULT 0,
robots_last_fetch REAL DEFAULT ...
Hi,
I'm trying to find the sum of all the listed fields, but given that they are sub queries... I need to use aliases. If i use the listed aliases, I get column/field unknown errors... and if I attempt a sum(points) using a group by, I get an invalid use of group clause error.
SELECT DISTINCT pr.competitorID AS compID, pr.age, CONCAT(p...
I am developing a ASP.net website using VS 2008. There is a table where a file name is inserted. The data type of the table attribute is Varchar(Max). But still ArgumentException is thrown for less than 50 character file names. Is there any other reason for this to happen? Thanks in advance.
...
I have a variable
DECLARE url varchar(3000)
and incoming parameters
scheme VARCHAR(5),
subdomain VARCHAR(55),
domain VARCHAR(55),
tld VARCHAR(55)
yet when i do the following:
SET url = url + ltrim(rtrim(scheme)) + '://';
SET url = url + ltrim(rtrim(subdomain)) + '.';
SET url = url + ltrim(rtrim(domain));
SET url = url+ '.' + ltrim...
I am confronted with a 4-page SAS thing - macro? procedure? it has procedures within it, DATA blocks and PROC blocks, one PROC SQL block for importing from Oracle.
Is there a tool that could translate SAS to something readable? Ideal would be SQL or PL/SQL (both seem applicable here), but almost anything procedural would be an improvem...
I have 5 tables and trying to Join into 1 but I am getting 4 records for each. How can i use correct JOIN statement.
SELECT tbl_meter.[cdate] AS 'CDate',
tbl_meter_backup.[machine_no],
tbl_machines.[accounting_denomination] AS 'Denom',
(tbl_meter.[turnover]- tbl_meter_backup.[turnover])* tbl_machines.[accounting_denomination] AS 'T...
Is that a way that i can schedule to run a SQL agent job to generate the database schema and data script file and then check in to the Team Foundation Server?
...
I already have 80 million records inserted into a table, but need to ensure a few columns are jointly unique. However, the columns already contain non-unique data, so ALTER TABLE doesn't work.
I'd like either a query that will let me easily delete records that are non-unique, while keeping one of them, or one that will allow me to load ...
hey can some tell me the query in sqlite3 which can be used to select the entry only once if it exists more than once in my database
...
I have developed an application as my college project using Visual Studio 2005 and SQL Server Express. Up to five people evaluate the project. At present I have installed it on everyone's machines. However, when I update my application, I need to go to each machine and update the executable file. There is a central server that can be...
SELECT PRJ_CC_id
, PROJECT_COSTCENTER_NAME
, AREA_ID
, AREA_Name
, Activity_ID
, Activity_Name
, SUM(Total)
FROM(
(
SELECT PRJ_CC_id
, PROJECT_COSTCENTER_NAME
, AREA_ID
, AREA_Name
, Activity_ID
, Activity_Name
, (SUM(mon) + SUM(tue) + SUM(wed) + SUM(thu) + SUM(fri) + SUM(sat) + SUM(
sun)) Total
FR...
I have something like this:
foo { a = 1, b = 2, c = 98,3 }
I generate the insert query dynamically so end up with this:
insert foos(a,b,c) (1, 2, 98,3)
anybody knows how to workaround this ?
...
I need to calculate the number of "active minutes" for an event within a database. The start-time is well known.
The complication is that these active minutes should only be counted during a working day - Monday-Friday 9am-6.30pm, excluding weekends and (known) list of holiday days
The start or "current" time may be outside working ho...
Hi All,
Are there any implications of using SqlDependency and LINQ to SQL together. Or do we have to take care of some things specially to make them work properly?
In our application we are using LINQ to SQL as an ORM and business logic is in the Stored Procedures. We cache the output of the SPs and create SQLDependency. Whenever the o...
Hi, I need display navigation in my website with ASP.NET 4 components.
Navigation use XmlSiteMapProvider and file hierarchy as XML file.
Because my website is a CMS I am looking for a solution able to store hierarchy in DataBase or in some sort of Business Logic.
I found out SQL Site Map Provider, which seems a workaround to store hie...
Hi,
In my application when i insert data i have to generate sequential value for a particular column basing on value in other column. Is there any property which i could set in SQL Server 2005.
I am explaining my requirement in more detail:
I have table with two fields id and branchid, i have to insert sequential value for branchid a...
What are the situations when you would use a foreign key to a separate table rather than use a boolean (i.e. BIT in SQL Server)
For example would you replace the following two booleans in this table:
engine_sensors
--------------
id (int, primary key)
name (varchar(50))
fault_code (int)
display_warning (boolean) /* if fault show driver...