HI i had manullay created textbox's and then used it for creating a new user. I am using SQL SERVER 2005 for backend and Visual Server 2008 for front..
I have this LoginAccount table which stores details of the new user created. When i Click the button(in which i have written code to create a new user through SQL insert),
string str...
Hello guys, I want a stored procedure to return the primary key of the new record after it gets executed. I think it will be returned by OUT parameter in the procedure. But how to select the newly inserted row ID ? I don't want to use select MAX(row_id) as it is a multi user environment.
Any procedure sample will be appreciated.
My plat...
Hi,
Is there anything called dynamic partitioning in SQL server? If so how can i implement it?
...
I'm writing an application in vb.net 2005. The app reads a spreadsheet into a DataSet with ADO.NET and uses a column of that table to populate a ListBox. When a ListBox Item is selected, the user will be presented with detailed information on the selected record.
One part of this information isn't in the DataSet. I have to compare a col...
I have a problem which I'm struggling to fix.
I have a form with many checkboxes containing email addresses, the result of which is sent to another page.
This page will send out newsletters.
This is working at the moment, but what I would like to do is include their name.
From the form received I get the results ([email protected], [email protected]...
Hi,
I have to write an SP which will take an xml as input i have to go thro' each row of the file and check if the data already exists if it exists thn i need to do an update else i need to inert the data. pls help me on how to go abt this
thanks in advance
...
I have this table with pages, these pages have parents that are also pages in the same table.
For this examples sake the table looks like:
table: Pages
PageId :Key
PageParent :Foreign Key
PageName
Now my question is what would the SQL look like when creating a menustructure like:
PageId PageParent PageName
1 NULL ...
Hi,
I am trying to decipher some SQL statements using, SQL Profiler, that are run from a proprietary application.
One of the statements is:
SELECT ID, Groups, Name, Gallery FROM DashboardReports WHERE (Groups & 0x800) <> 0 AND Root = 1 ORDER BY Name
Can anyone explain how the WHERE clause works? I've never seen a WHERE clause like ...
Possible Duplicate:
Oracle sequences: CURRVAL not allowed here?
In my program i am inserting a values using sequence.
Procedure 1
Insert tablename(id,name) values(seq.nextval,somename)
now i need to update this same table. how do i do it. I use another Procedure to update.
Procedure 2
Update set name ='someothername'
wh...
CREATE TABLE `users` (
`UID` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`username` VARCHAR(45) NOT NULL ,
`password` VARCHAR(100) NULL ,
`name` VARCHAR(100) NULL ,
`gender` BIT NULL ,
`email` VARCHAR(255) NULL ,
`phone` VARCHAR(30) NOT NULL ,
`verified` BIT NOT NULL DEFAULT 0 ,
`time_zone` INT NULL ,
`time_register` DAT...
I have just inherited a medium sized Rails application and I want to try to optimize it right away. I want to start with the database to ensure that indexes are placed where they need to be an so forth. I therefore need to quickly find out all possible SQL statements that ActiveRecord might make so that I can compare that with the databa...
HI all,
Is there any way of create view if not exists in sql on mysql db or h2 db.
...
How do i attach debugger to Sql 2008 Express edition from Management Studio?
...
Hi all,
Consider two tables, Product and Supplier. To get the required data for a grid view I need to do something like the following code snippet. SupplierID is a foreign key in the products table, but needs to be displayed in the user friendly SupplierName from the Supplier table.
SELECT Product.ProductID, Product.ProductName, Produc...
I ran this query on my SQL Server database:
begin transaction;
insert into [db].[a].[Table1] ( [IsDeleted], [itemId], [regionId], [deskId], [LastUpdated], [LastUpdatedby])
select [IsDeleted], [itemId], [regionId], 11, [LastUpdated], [LastUpdatedby]
from [db].[a].[Table1]
where deskId = 12;
update [db].[a].[Table1]
set deskId = 3
where...
Hi, I'm trying to write this query, that would calculate the average value of all the columns except the one that contains the type value, which I'm grouping the whole query by.
So for 4 types for example, each column in the resulting table will contain the average of all the other three type's values, i need to exclude the current type...
Hello All,
I have a table with unique values within it and once a stored procedure is called, I use the following code within a sub-query to get a random value from the table:
SELECT TOP 1 UniqueID FROM UniqueValues
WHERE InitiatingID is NULL
ORDER BY NewID() ASC
I have however noticed that I am managing now and then (and I'm guessin...
when I run this sql:
insert into table1(ID,Name) values ('10','Saeed');
it seems that the record has been inserted, and if I read the table using (select * from table1) it shows me the inserted record, but after closing the program, it disappears.
it's the code:
string constr="Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirector...
Hi,
I am creating a WCF service (CALLER) for Azure. The service(CALLER) calls async methods of another third party service(EXTN). The third party service calls the callback methods of another WCF service (LISTNER) hosted by me on Azure. CALLER enter the service details in the databsae with status = PENDING.
In the callback service (LIS...
ALTER PROCEDURE [Lending].[uspHMDALarIncomeGet] (@ApplicationId int)
AS
BEGIN
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
-- Total Income Data
DECLARE @ApplicantId int = (SELECT AT.ApplicantId FROM Lending.Applicant AT WHERE AT.ApplicationId = @ApplicationId)
SELECT
I.Amount
FROM Lending....