3,481 Topics

Member Avatar for
Member Avatar for ansari.wajid

Hi All I am writting an stored procedure to get the recently inserted records primary key as follows: [CODE]ALTER PROCEDURE [DBO].[AddEditUserMsgDetails] ( @iJobID [INT]=NULL, @iUserID [INT]=NULL, @vFromName [VARCHAR](50)=NULL, @vFromAddress [VARCHAR](50)=NULL, @vSubject [VARCHAR](50)=NULL, @iListID [INT]=NULL, @vActualText [VARCHAR](100)=NULL ) AS BEGIN /* Logic Comments: INSERTING OR UPDATING INTO THE TABLE ezlMailJobs EXEC …

Member Avatar for dickersonka
0
210
Member Avatar for lakshma.sugunan

When some datas are inserted in to a DB table from a jsp page, how do i get the primary key in my table autogenerated?? finiding out the highest value for the primary key in the table? Pls help me wid the coding in JAVA or HTML.. I use SQL*PLus.

Member Avatar for dickersonka
0
80
Member Avatar for Cerin

I have an awkward problem. I'm debugging what I believe is a race condition in a legacy codebase. The issue involves a userID column being set to the wrong value. Essentially, one user's record will be non-deterministically reassigned to another user. The real problem is that this column is set …

Member Avatar for dickersonka
0
69
Member Avatar for emilio

hi. i would like to work on my computer without connecting to server. i installed the ms sql management studio 2005 express. how can i create a local host server to work on ?

Member Avatar for dickersonka
0
56
Member Avatar for mattpointblank

Hi everyone. I'm printing a list of articles from my database. Some articles are set as 'sponsored', meaning they appear at the top of the list. Articles also have a 'type' field - if it's set to 0 then there is no specific type, otherwise the value corresponds to a …

Member Avatar for mattpointblank
0
86
Member Avatar for old_yeller

My Internet Explorer keeps "experiencing an unexpected problem" and shutting down. A Google search for a solution led me to this site. I have found this site before when searching for answers to problems and now decided to sign up. So, I'm a new member and hope that I'm doing …

Member Avatar for crunchie
0
177
Member Avatar for Tank50

Hi I wrote simple query like [code=sql]select Code,CashDeposited,Date from dbo.RDBankingDetails where Code='SE0001' group by Date,Code,CashDeposited[/code] It generate report like below TE0001 12000 2005:03:26 TE0001 49150 2005:03.26 TE0001 209000 2005:03.26 I want to generate the report like below Code Date CashDeposisted1 CashDepostis2 CashDeposists3 TE0001 2005:03:26 120000 49150 209000 In above CashDeoposisted …

0
67
Member Avatar for phuynh77

Hi Everyone, I would need your help. I have a project that I need to insert multiple records into my table. Here is more detail. I design a purchase order table with 3 columns (a, b, c): a: is primary key with identity (1,1) primary key b: is defined integer …

Member Avatar for phuynh77
0
3K
Member Avatar for konczuras

Hello Everyone! I'm new to MS SQL, so this may be a dumb error, but anyway, I can't figure it out. I'd like to connect to an SQL server on the internet, I've a valid username and password, but it can't find the server. So, I've tried the following connectionstring: …

Member Avatar for konczuras
0
116
Member Avatar for baburk

Hi, [code=sql] SELECT DISTINCT dbo.RoomRates.RoomID, CASE WHEN (dbo.RoomRates.Overflow = 1 AND MIN(dbo.RoomRates.Availability) <= 5) THEN 5 ELSE MIN(dbo.RoomRates.Availability) END AS Availability, SUM( dbo.RoomRates.Price ) AS RoomTotalPrice FROM dbo.RoomRates WHERE dbo.RoomRates.[Date] BETWEEN @FromDate AND @ToDate GROUP BY dbo.RoomRates.RoomID , dbo.RoomRates.Overflow[/code] Input [code] roomid Date AvailableRooms RoomPrice FreeSale 100 01/12/08 FA 0 …

Member Avatar for Teme64
0
92
Member Avatar for plolic

Hi I hope I have the right forum for this. This is a tricky one....I think! I have a reporting services report that runs off a csv file using integration services 2005. The report is based on a link between two tables linked by cc. The cc field links to …

Member Avatar for plolic
0
94
Member Avatar for pkuchaliya

hi, i m fetching the record from the given xml but not success full please help [code]DECLARE @XMLString xml set @XMLString ='<timetable> <day1 id="DY101"> <lecture1 id="LECT101"> <subject>SUB101</subject> <faculty>FAC101</faculty> <room>ROOM101</room> </lecture1> <lecture2 id="LECT102"> <subject>SUB102</subject> <faculty>FAC102</faculty> <room>ROOM102</room> </lecture2> <lecture3 id="LECT103"> <subject>SUB103</subject> <faculty>FAC103</faculty> <room>ROOM103</room> </lecture3> <lecture4 id="LECT104"> <subject>SUB104</subject> <faculty>FAC104</faculty> <room>ROOM104</room> </lecture4> <lecture5 id="LECT105"> …

0
77
Member Avatar for EddySR

I've got a multi union sql statement however union distinct doesn't work the way I want it to because I just use distinct on 1 column only (link_id). I've several ideas from the internet but I just can't get it to work. Below is the statement. [code] SELECT TOP (500) …

Member Avatar for EddySR
0
140
Member Avatar for svulli

We are trying to implement MySQL clustering on our E-commerce database, but presently the tables are MyISAM based and some of the tables have full text search index on. In the wake of Clustering environment, one of the requirements is moving to InnoDB. However, that would pose the problem of …

Member Avatar for svulli
0
126
Member Avatar for skatamatic

I'm not sure I did this right. It's for an assignment for school where i'm supposed to return the author last name and the balance (described below) relating to each author. It's from the pubs database (I'm thinking that most people have used it for testing/learning before?) I'm an SQL …

0
89
Member Avatar for ferretwoman

New to triggers and SQL programming but I'm trying to figure it out by looking at code examples. I have a table, called child. My program inserts a new child into the child table and stores the parentid as a FK. What I need to do is when a new …

Member Avatar for dickersonka
0
99
Member Avatar for tonyaim83
Member Avatar for Geek-Master
0
190
Member Avatar for deniseaddy

Hi, I'm having trouble building the correct syntax select statement for a system to handle support tickets. The table "tickets" has the following columns: id (int) inserted (smalldatetime) ticket_id (nvarchar) owner (nvarchar) subject( nvarchar) category (nvarchar) message( nvarchar) status (nvarchar) The id is unique for each record but the ticket_id …

Member Avatar for Geek-Master
0
179
Member Avatar for Geek-Master

[I]In this example I'm using the AdventureWorks database in MS SQL Server 2005[/I] I was wondering what other people thought about Schemas vs. Roles when it comes to security access. If you have an employee who just started working for Human Resources and needed access to all the database objects …

Member Avatar for Geek-Master
0
428
Member Avatar for kartik14

Hi, I have a derived attribute in my table and I'm sorting the table in the descending order of this attribute. My query should retrieve all the tuples which have the maximum value for this derived attribute. If I use SELECT TOP 1, I'm only getting one of the required …

Member Avatar for Geek-Master
0
178
Member Avatar for Phrenetic

Heya, what i would like to do in one query is pull out two objs, that are very similar from the same table "ol_obj_data" These two objs are "ratings" and "reviews" they are not linked except for a USER_ID of who submitted them. But they relate to our business data. …

Member Avatar for Phrenetic
0
125
Member Avatar for mubin_attar

Hi, While trying to connect MSSql Server 2000 databse through ASP .Net application using c# I got below errror. Please help. Sql Server does not exist or access denied. Mubin

Member Avatar for n4naeem
0
144
Member Avatar for nithin.gujjar

The two queries are returning two different no of rows.Outer join is not supposed to duplicate the rows in the first table right?How do I correct this. [code=sql]select * from clientcode order by cc_clientcode result:(5627 row(s) affected) select cc.cc_clientcode,cc.cc_rmcode,cc.cc_panno,cc.cc_productname ,c.Client_panno,c.client_userid from clientcode cc LEFT outer join client c on cc.cc_panno=c.client_panno …

Member Avatar for nithin.gujjar
0
100
Member Avatar for Celt.Max

Hi everybody, I have really damned trouble here... On MSSQL 2000 I have something about 140 log tables with three columns in each one. "ID" AS INT, "SomeTextCODE" AS NVARCHAR(20) and "SomeTime" AS DATETIME I made a view (v_SomeView_ALL) in which there are all these tables united. But some SomeTextCODEs …

Member Avatar for dickersonka
0
65
Member Avatar for wiesiek

Can anybody explains me why following sql statements do not work with mssql? create table place (id int primary key, name varchar(64), parent_id int references place (id) on delete cascade); create table transport (id int primary key, name varchar(64)); create table trip (id int primary key, from_id int references transport …

Member Avatar for wiesiek
0
147
Member Avatar for csgraham74

im in the process of looking at a reporting tool for my database system - can anyone point me in the right direction for the best product available. i previously used crystal a very long time ago (it may be called something else by now) but ive read alot about …

0
62
Member Avatar for That Chick

Hi I'm to stupid to write sql but im trying my hand at it anyways. I cant work this out any easier than doing a seperate command but when i do that it takes forever. So i tried doing it as a subquery, but i think somehow i need to …

Member Avatar for dickersonka
0
97
Member Avatar for RahulV

Hai, ive created a SQL database, but now i want to place and use this on another PC. Is it possible to write the database files to a CD or DVD and then copy it to another PC? If yes then please explain how. Thank you

Member Avatar for varmadba
0
62
Member Avatar for cy163

Hi ALL, The project we're working on is a document retrieval system. Two kinds of Features for each document in a repository are extracted as described in table-1 and table-2. Table1 DocID Word Freq 1 Book 9 1 Study 3 2 Work 4 2 Run 5 2 User 2 3 …

0
103
Member Avatar for minbor

Hello, I would appreciate if anyone could help me with this. I'm new to this sort of thing and don't really know where to start. I have a survey results table that looks like this: [CODE]user question answer Mike 1 2 Mike 2 1 Mike 3 5 John 1 5 …

Member Avatar for minbor
0
95
Member Avatar for cosmicfool

Hello, I've just migrated a website built with asp and MsSQL to a new server. The old server used MsSQL 2000 nd the new one uses MsSQL 2005. I know the database became slightly corrupted when it was uploaded. I was just wondering if anyone could tell whether the varchar …

Member Avatar for cosmicfool
0
256
Member Avatar for buknoii

hi there! im a newbie on asp.net and would like to ask you guys if you have any idea on how to convert my connectionstring to mssql <script language="vb" runat="server"> Dim myConnection as OleDbConnection Dim strConnectionString as String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "c:\pubs2000.mdb" any info would be appreciated :)

0
45
Member Avatar for lekfir

Hi, I am trying to break each record into 2 records but failed Is it possible? What is the correct way to do it? Thanks in advance!!! For Example: I have a table that contains 100 records . Each record has the following 10 columns: Col1, Col2, Col3, Col4, Col5, …

Member Avatar for huangzhi
0
148
Member Avatar for scorch20

Must have came in Music Software install, It's bad , located in windows/system32, also came with micro antivirus2009, I think it has invited friends. Please help. Logfile of Trend Micro HijackThis v2.0.2 Scan saved at 10:08:27 PM, on 10/11/2008 Platform: Windows XP SP3 (WinNT 5.01.2600) MSIE: Internet Explorer v7.00 (7.00.6000.16705) …

Member Avatar for jholland1964
0
172
Member Avatar for Jahira

Hello Sir, Can i plz have query of "Find the 6th highest salary from the table" .....plz send me d query

Member Avatar for huangzhi
0
102
Member Avatar for bugmenot

Hi everyone, I'm trying to write a stored procedure select statement which is a little beyond my experience level. I have a table in the DB called addresses which contains the following fields: [LIST] [*]address, VARCHAR [*]count, INT [*](a few more fields) [/LIST] My stored procedure will take in a …

Member Avatar for huangzhi
0
104
Member Avatar for yorks

Hi all I am pretty new to MSSQL and have a problem. The solution is probably very simple but I cant find it :) I have a database field ZIP, I also have string with consists of a number of UK part postcodes eg 'S10 S11 S7 S17 S8 S3 …

Member Avatar for huangzhi
0
209
Member Avatar for fixitsam

Logfile of HijackThis v1.99.1 Scan saved at 19:36:32, on 10/10/2008 Platform: Windows XP SP2 (WinNT 5.01.2600) MSIE: Internet Explorer v6.00 SP2 (6.00.2900.2180) Running processes: C:\WINDOWS\System32\smss.exe C:\WINDOWS\system32\winlogon.exe C:\WINDOWS\system32\services.exe C:\WINDOWS\system32\lsass.exe C:\WINDOWS\system32\svchost.exe C:\WINDOWS\System32\svchost.exe C:\WINDOWS\system32\spoolsv.exe C:\WINDOWS\Explorer.EXE C:\WINDOWS\system32\VTTimer.exe C:\WINDOWS\system32\S3trayp.exe C:\PROGRA~1\Grisoft\AVG7\avgcc.exe C:\PROGRA~1\Grisoft\AVG7\avgemc.exe C:\Program Files\CyberLink\PowerDVD\PDVDServ.exe C:\Program Files\Winamp\winampa.exe C:\Program Files\Ahead\InCD\InCD.exe C:\WINDOWS\SOUNDMAN.EXE C:\Program Files\Common Files\Real\Update_OB\realsched.exe C:\windows\hffext\hffsrv.exe C:\Program Files\Google\Google Desktop …

Member Avatar for crunchie
0
92
Member Avatar for RahulV

HAI, I'm creating a website for a computer forum (using VBScript, SQL server - back end). Im able to display the heading of the threads in a page & also im able to click and redirect to a proper .asp page but, can u tell me how can i show …

0
43
Member Avatar for ries.vos

I have an external application running on a MS SQL server2005 (express-edition) database. I need a notification each time the application reads a special table from the database. As a new user of MsSQL I experienced with the trigger function. But this is only applicable when fields in a table …

0
56
Member Avatar for dsuslow

Hello, I am trying to figure out how best to merge these two queries together: #1 - this is pretty basic: [code=sql] SELECT DISTINCT [vtebase].[EbLastName], [vtebase].[EbFirstName], [vtecomp].[EmAnnual], Str(vtecomp.[EmAnnual] * 1.03,9,2) AS [3% Increase], Str(vtecomp.[EmAnnual] * 1.05,9,2) AS [5% Increase], Str(vtecomp.[EmAnnual] * 1.07,9,2) AS [7% Increase], [vtEqbase].[EqDateNext] AS [Next Review Date], …

Member Avatar for dickersonka
0
70
Member Avatar for berryberrybiru

hi, i hav some problem involving checkboxes 1.how do i submit the values into the database 2.i dont know how to connect with the db below is the sample of my codings p/s;the values of the checkbox will have calculation in the db,can i relate two tables? [code=html] <td><input type="checkbox" …

Member Avatar for debasisdas
0
89
Member Avatar for k2k

I just started learning php and mySQL, if i want to create 2 tables, how do i connect them with a foreign key? In oracle, it is something like below, would any one point out what have to change to make it work in mySQL? phpMyadmin GUI doesn't seem like …

Member Avatar for debasisdas
0
71
Member Avatar for koushikd

Hi, Unable to connect to MSSQL through PHP+ADODB+APache in my laptop. While the same is running fine in the server. Checked the SQL it is running fine. Can anybody help me?

0
45
Member Avatar for _taz_

I need help with a left outer join on a table and some queries (is it possible to outer join with queries?) here's my SQL right now [CODE]SELECT Clients.ClientID, Clients.SSN, Clients.WholeName, Clients.Address1, Clients.Address2, Clients.City, Clients.State, Clients.ZIP, Clients.HomePhone, Clients.WorkPhone, Clients.OtherPhone, DPs.SumOfAmount AS [Client Down Payments_SumOfAmount], Remain.SumOfAmount AS [Client Remaining_SumOfAmount], [MF PTD].SumOfAmount …

0
116
Member Avatar for cosmicfool

Hello, I've been given the task of transferring a website from one server to another. Unfortunately the website was written in asp and is linked to a MS SQL database and I haven't had much experience with either. It was using a MS SQL 2000 database but the new host …

Member Avatar for cosmicfool
0
148
Member Avatar for bimaljr

Hi I have a database running on MSSQL server 2005. Now I want to move all my data in MySQL server 5. I am familiar with MySQL and PhpMyAdmin. Please help me what is the best way to do this. Thanks

Member Avatar for bimaljr
0
163
Member Avatar for greeny_1984

hi, iam having three tables as shown below table 1 table 2 table 3 column1 id column1 cust_id column1 cat_id column2 cust_name column2 cat_id column2 cat_name column3 cust_id column3 training column4 posted_date iam using the following query Select A.id,A.cust_name,B.training from table1 A,table2 B,table3 C WHERE A.ID = B.cust_id AND B.cat_id …

0
74
Member Avatar for jmoya

Why is the result of this query.. [code=mssql] SELECT * FROM (SELECT TOP 5 * FROM (SELECT TOP 20 * FROM ODPSEnrlAccts ORDER BY fld_acctname) AS foo ORDER BY fld_acctname DESC) as bar ORDER BY fld_acctname DESC [/code] Is the same as the result of this one.. [code=mssql] SELECT TOP …

0
46
Member Avatar for spinnaret

I need to write a stored procedure to analyse appointments for the last 12 months. I need to get each salesperson (by ID) and for each person carry out a count of the number of appointments and count them by outcome (sale, second meeting , failure etc.) and then display …

Member Avatar for spinnaret
0
90

The End.