I have a very big SQL query with the following structure in a Java String.
BEGIN;
couple of thousand of INSERT INTO
END;
The class that holds this String is nearly not responsive in Netbeans IDE due to the file size. What is the best way to store, load and run such big queries?
...
In my Production Server i have replication which working fine, i do have Distributed Database which as 2 subscriber db .
My data is replicated from Production envi (working fine) but while
data gets replicated to Distributed database in Subscriber it throws an Error
Err msg =
Replication-Replication Distribution Subsystem: PRD01-XYZ-VR...
This is really dumb question but still my head cannot work it out.
I have a table with Orders, each order has userID in it. User can have unlimited amount of Orders. How do i make count of unique userIDs ?
...
Hi All,
We have an environment where we develop within T-SQL, SSIS and SSRS. We have core databases for our own systems, but we have dependencies to another SQL system that we directly extract data from by calling tables, views and stored procs (not ideal, but that is for another day).
As a developer I want to make sure that at any po...
i am getting the following error while executing the following query in an Stored Procedure..Could anyone help in finding the fault?
UPDATE is not allowed because the statement updates view "sup_item" which participates in a join and has an INSTEAD OF UPDATE trigger.
UPDATE si
SET
name = mc.name,
sup_item_cat_id = mc.res_sup_i...
SQL transactions is used for insert, update, but should it be used for reading records?
...
I have 3 sql tables:
Data36 (Data_ID:int <PK>, type:int),
Data38(Data_ID:int <PK>, clientId:int),
Data47(Data_ID:int <PK>, payerID:int).
I thought the following queries are identical, because I don't use aggregate functions here and GROUP BY should behave the same way as DISTINCT. But they return very different result sets and I do...
INFORMIX-SE 7.32:
I have a transaction table with about 5,000 nrows. The transaction.ticket_number[INT] is a column which gets updated with the next available sequential ticket number every time a specific row is updated. The column is unique indexed. I'm currently using the following SELECT statement to locate the max(transaction.ticke...
I have been trying to add columns to a table using some logic that produces this statement:
ALTER TABLE Master_List
ADD COLUMN Service VARCHAR(100) ,
Vendor VARCHAR(100) ,
Product VARCHAR(100) ,
Service_Description VARCHAR(100) ,
Level/Scale VARCHAR(100) ,
SunGard_...
Hey All,
I am trying one stored procedure as follows.
CREATE OR REPLACE FUNCTION "public"."get_fees" (VARCHAR(5000)) RETURNS text[] AS
$body$
DECLARE
student_ids ALIAS FOR $1;
studetFee text[];
BEGIN
FOR studetFee IN
SELECT * FROM Student_fee WHERE student_id IN ( student_ids::VARCHAR(5000) )
LOOP
**** some ***
END LOOP;
END;
$b...
hi dears,
i have a query like :
SELECT column as averyveryveryverylongalias (more than 30 characters)
FROM Table_name
it returns the error ORA-00972 identifier is too long , is there any tip to make it work without making the alias shorter?
Thanks
...
This question is related to my question: http://stackoverflow.com/questions/3072986/sql-server-and-transactionscope-with-msdtc-sporadically-cant-get-connection
I'm doing some transaction programming using the .net TransactionScope class. If I understand correctly, I can do some SQL operations within a transaction by wrapping the SQL ca...
I have a table of users and a table of questions. The questions table will have records that represent "Questions", "Answers" and "Comments" to questions or answers. I'd like to create a dashboard for each user in which its possible to see activities related to questions and answers. For example if user A creates a question and user B re...
i know the general and the dictionary meaning of it,
what does it mean when it said with respect to website and database designing?
like let say
make this and that for distributed environment,
what events, what criteria should be used, coding method
guidelines
please
thank you
if this question is not in accordance to the rules ...
We are trying to run a query to get all unpaid invoices. When I run the query it hangs our whole system. I am just wondering if there is a way I can make this more efficent. SQL isn't my strong point.
$query = "SELECT SQL_CALC_FOUND_ROWS i.order_id, o., acct., (SELECT SUM(items.item_qty) AS qty FROM items WHERE items.order_id = o.orde...
I would like to make an sql query to compare two tables with identical columns, both names and types. Each table has a unique key. I want the query to return any rows that contain unequal values. I know could do something like this
select *
from table_1, table_2
where
table_1.key = table_2.key
and (
table_1.col1 != table_2.col1 OR
t...
I have a SQL stored procedure of the form
SELECT [fields] FROM [table] WHERE @whereSql
I want to pass the procedure an argument (@whereSql) which specifies the entire WHERE clause, but the following error is returned:
An expression of non-boolean type specified in a context where a condition is expected
Can this be done?
...
Hello all,
I have a table in Oracle 10g that contains some information as follows:
SQL> select * from t_test;
INFO CODIGO GRUPO
---------- ---------- ----------
101 190 VTOS
100 130 VTOS
102 140 VTOS
I'd like to extract all the rows that have GRUPO='VTOS' and transpose those rows t...
For example, there is a string field Name in my C# (Linq-to-SQL); what data type would that SQL field have to be?
varchar? nchar? I'm confused.
...
Not even how to word this question: I have a table that looks like this:
select * from tblServiceUsers
ORDER By ServiceID
0 B88230BB-4943-4C10-AB0E-8ABB88A357A3
0 5653C943-7F9A-4746-B2A3-1160E9204A7E
0 08678EE7-49A7-4F63-BC39-CFCCE2C9AD65
1 B88230BB-4943-4C10-AB0E-8ABB88A357A3
1 5653C943-7F9A-4746-B2A3-1160E9204A7E
2 B8...