The stored procedure mapped to a report query builder returns values dynamically mean to say once 8 columns and sometimes 6 columns. My question is how to name the header for the extra added columns?
...
Hi,
imagine i have one textbox (with autocomplete 1.1, not the latest UI version) and a checkbox.
The textbox triggers an asp.net .ashx page that will execute a stored procedure at the sql-server and return the results.
It's all working, but i want to add another feature.
When the checkbox is checked i want stored_procedure_1 to be exe...
I have a sqlite database, with potentially tens of thousands of rows, which is exposed as a UITableView on the iPhone. There's many columns in the relevant table, but for now I only care about a 'name' column. (The database is in a server app, the iPhone app is a client, talking over a socket) Naturally to make this usable, I want to sup...
I'm having trouble with this query. I have 2 date coming from textboxes (don't worry I've taken the necessary sql injection steps). They are used to query a MS SQL Server DATETIME field. I'm getting this error:
Conversion failed when converting date and/or time from character string
Here my code:
//formatting my strings
$from = str...
In an Oracle package I have defined a type
type setTable is table of my_sets.pkey%type;
in the package declaration (the non-body part). The pkey column referenced is a number(38). Then in a function in the package body I have
...
with d as (select column_value from table(sets)),
...
where sets is a parameter to the function of t...
I have a table that simplified looks like this:
create table Test
(
ValidFrom date not null,
ValidTo date not null,
check (ValidTo > ValidFrom)
)
I would like to write a trigger that prevents inserting values that overlap an existing date range. I've written a trigger that looks like this:
create trigger Trigger_Test
on Test
for i...
I've got the following problem.
We have Development, Testing and Production environments for our system. All these environments will contain SQL Server 2005, but different editions. The Production will work with Standard Edition.
Now we would like to install Dev Edition on other servers (to save our money), but as far as I know, Dev Ed...
Hello,
My question deals delivering information to iPhone devices via an online DB. (Essentially, I want to do something like the NYTimes App, which provides the latest news for each device containing the app). I know I need to use a SQL lite database to accomplish this. What is the best way to approach this problem? I am a newbie a...
Two tables
Table1
ID FileName
1 abc
2 abc
3 abc
4 xyz
Table2
ID Table1_ID isDeleted
1 1 1
2 2 1
3 3 0
4 4 0
I need to get the count of filename for the isDeleted=1 by passing any ID of table1, i.e for all the values(1,2,3) of ID, i need the count as 2
I tried with the following query
S...
hi friends,
i want to get the sum of quantity from the below query.
how i write the group by clause in below mention query.
select top 1
EvrId,
TimeStamp,
Date,
BnhTnkMik1 as Quantity,
(select TnkCode from Tanklar where TnkId=BnhTnkId) as Tank,
FuelCode,
InvoiceNo from Evrak
join Hareket on (BnhEvrId=EvrId)
join Stoklar on (StokId=Bn...
Hi there,
I need to alter a macro the way that a parameter can be passed to control the max size of the result set.
My idea was this SQL:
REPLACE MACRO myMacro
( maxRows INTEGER DEFAULT 100 )
AS
(
SELECT TOP :maxRows
FROM myTable;
);
But all I get is the message:
[SQLState 42000] Syntax error,Expected something like an I...
Does anyone know if it is possible to take the date from a random date in pl sql.
example.
SELECT SYSDATE FROM DUAL
and here the output would be say : 26-10-2010 13:30:34
Now I want to have just the date as a number. In this case that would be 26.
Or is there some sort of function like IsNum that can recognize it for me. So I ...
I would like to match patterns inside an IN expression like this:
... WHERE ... IN ('%alma%','%sajt%')
Is it possible somehow and if not, how could I achieve this some other way?
...
Hi,
I'm trying to do the following:
IF NOT EXISTS (
SELECT *
FROM [tbl_web_company]
WHERE [name] = @name
AND [address1] = @address1
AND [address2] = @address2
AND [city] = @city
...
Hi.
I´m developing a app in ASPX .NET2008.
And I have a big problem with the SQL Server Reporting Services.
The button "Print" and the zoom option only is showed in IE browser but I need it showing in Chrome and FireFox too.
I think it is a ACTIVEX problem, but I´m not correctly this.
...
Hi,
I'm having a problem with non-ASCII characters in a where clause
Say for example a record in my table has :
column_a Bom D� Street
And I want to see if this will find the record:
SELECT * FROM [tbl_test] where column_a = 'Bom D� Street'
This always returns no records.
Is there something you have to do to handle non-ASCII char...
When querying two tables (t1, t2) and using a MAX statement for a column in t2, SQL returns multiple entries.
This seems to be because I also query other info from t2 which consists of unique entries.
Simplified table example
t1.number t2.number_id t2.sync_id t2.text
1 1 1 ...
My Issue is that the last query in this sproc is saying that I need to declare @N but I already have any ideas?
DECLARE @t TABLE
(Smpinstanceid UNIQUEIDENTIFIER)
INSERT INTO @t
(Smpinstanceid)
SELECT t.SmpInstanceid
FROM Tasks t
WHERE t.Completed IS NOT NULL and t.SmpInstanceID is not null
DECLARE @N TABLE
(...
I inherited the app and what it does is get data from 4 views with an (xml file in it) in chunks of 1000 records then writes them down in an xml file all this split up by a type parameter that has 9 different possibilities. That means in a worst case there will be 36 connections to the database for each 1000 of that type/view combination...
First off let me say I am running on SQL Server 2005 so I don't have access to MERGE.
I have a table with ~150k rows that I am updating daily from a text file. As rows fall out of the text file I need to delete them from the database and if they change or are new I need to update/insert accordingly.
After some testing I've found that ...