Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008


all groups > sql server programming > august 2007 > threads for thursday august 2

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Data manipulation query
Posted by SKUMARI at 8/2/2007 10:08:46 PM
I have table with data like this select * from t1 col1 col2 1 0 2 0 3 1 4 2 5 2 6 2 7 3 8 0 9 4 10 4 11 4 My output should be 4 2 6 2 9 4 11 4. Basically whenever previous value changes i ne...more >>

design question
Posted by psawant NO[at]SPAM gmail.com at 8/2/2007 9:46:11 PM
I have design question. thanks in advance.. this is what i need to store. i need to store soldierinfo.(name,id,weapontype). each soldier is allowed one weapon. weapon could be a knife or gun or and it could be anything else. guns(calibre,name) and knife(length,'name') have differe...more >>

Concat Rows
Posted by at 8/2/2007 7:09:02 PM
Hi, Is there a function in 2005 that can do this: Given: Table: Mytable ID Value 1 A 1 C 1 V 2 ...more >>

Using SMO in VBA
Posted by Guy at 8/2/2007 6:32:01 PM
Hi All, I orginally posted this on microsoft.public.access.adp.sqlserver, but as yet have not received a response. Can anyone here help? I've Just completed the conversion of a large .ADP to Access 2007 and the Ribbon. Now in the process of upgrading the backend from SQL Server 2000 to ...more >>

Alias field for 0 records
Posted by jonefer at 8/2/2007 5:42:03 PM
How can I return this Alias record when no records are returned Supervisor |Cost Center|Position ======================= ======= ===== None related to selected Cost centers N/A N/A ======================= ======= ===== Here is the SQL Statem...more >>

Using CASE statement in conjunction with call to Stored Procedure
Posted by MarkusJNZ NO[at]SPAM gmail.com at 8/2/2007 5:38:27 PM
Hi, I am trying to do the following but I keep getting an error "Incorrect syntax near '('." procLoadValue is a stored procedure which takes three arguments a nvarchar, an integer and a bit value @referenceName is an nvarchar @myArgument is an nvarchar exec @intError = procLoadValue @r...more >>

Subquery in Execution Plan
Posted by CLM at 8/2/2007 5:24:00 PM
I've got a query generated by a third party tool (on SS 2000 SP4) that has painful code to say the least. What I noticed is that right in the middle of all this mess is a subquery that has no decent filer and so would scan a very large view that we have. To verify this I pasted the subquery ...more >>

Having trouble with "In" keyword ; perhaps need subquery?
Posted by mister-Ed at 8/2/2007 4:55:30 PM
I am displaying advertisers on a dynamic .net page that users will view via querystrings from a county page, then a city page , as they can pick a zone , then view the advertiser's ad predicated on the zone they pick. I want to have advertisers on a premium plan that can be viewed in all area...more >>



various sql comments
Posted by Wendy Elizabeth at 8/2/2007 3:24:03 PM
The sql server 2005 managment studio that I work with does not recognize a -- as a comment when I am executing a script when the -- starts in column 1. I can put the -- starting in column 10 to whatever as long as there is a sql statement and the -- on the same line. However when the scr...more >>

Pivot?
Posted by at 8/2/2007 1:55:29 PM
I have a table containing 2 columns, custid (varchar) and saledate (datetime). custid, saledate 12, 12/3/2005 10:00 AM 18, 12/4/2005 1:30 PM 43, 12/5/2005 5:00 AM .... I need to pass date range as parameters to this query to produce a time frame of if a custid was sold something on a d...more >>

Syntax error in when statement in stored procedure
Posted by Jack at 8/2/2007 1:20:01 PM
Hi, I am trying to get output of a stored procedure. If 999 is passed to a stored procedure then all the rows corresponding to any combination of the field (tbs_grp) should be calculated. However, if any other parameter is chosen for tbs_grp then the rows corresponding to the paramter chose...more >>

I Need help with couple of tables design question
Posted by Learner at 8/2/2007 12:49:50 PM
Hi, I have a need to create a 60 questions survey web page and this should save all the 60 answers in the table by clicking on a "Submit" button. Each question will have four answeres (some of questions to check all the answers using check boxes and some of them strictly one answer using e...more >>

How to extract data from two table when the data don't match exact
Posted by mitra at 8/2/2007 12:08:03 PM
Hi All, Is there a way to select from two tables that the first 64 characters match between the column I am matching on. Obvioulsy, the INNER JOIN will only return the rows that have exact match. To give you an example, I like to be able to extract the following sample data:: tbl_1.m...more >>

Database design question - with date view
Posted by tanya.wang NO[at]SPAM gmail.com at 8/2/2007 10:56:28 AM
Hi all, I am writing a system that allows my user to create events in the database and it will be shown on the website based on its start date, end date, and how often it will take place in a week. So my first thought of my main table should be something like this: CREATE TABLE Event_main...more >>

SS 2005 Enterprise installation (clustering)
Posted by FARRUKH at 8/2/2007 10:48:02 AM
I am planning to install sql server 2005 enterprise edition. it will be a cluster environment and active/active cluster. i never installed sql erver 2005 n cluster environement. is there any documents and online tutorial? thank You...more >>

Job failure not being reported
Posted by rmcompute at 8/2/2007 10:22:01 AM
I set up a DTS job which I purposely set up to fail to test the failure procedure. The job fails when I set one of the inner packages to fail. However, when I run it as a scheduled task, there is no indication of failure, even though I know it is failing. The On Failure Action is set to: ...more >>

Stored Procedure runs but displays #Name? in some of the output fi
Posted by Jack at 8/2/2007 9:38:07 AM
Hi, I am calling a stored procedure from an Access unbound form.I made sure that the control source of the unbound form is named in accordance with the output of the stored procedure. However, in some of the fields instead of getting proper value I am getting #Name? in the data. I am not sure...more >>

tsql help
Posted by rodchar at 8/2/2007 8:46:11 AM
hey all, how do you get a list of tables only in a database? thanks, rodchar...more >>

BLOB error - SQL server 2000
Posted by Test Test at 8/2/2007 7:53:51 AM
We have a table with the column of data type 'image' that contains blob data. From the production environment, while retrieving the BLOB data from the application, the users have started getting this error '[Microsoft][ODBC SQL Server Driver][SQL Server] The number that starts with '000000000000...more >>

Select statement, but ignore a few entries
Posted by Dan at 8/2/2007 7:48:01 AM
I have a select statement SELECT vw_Subscriber.FirstName, vw_Subscriber.LastName, vw_DTMFAccessID.DTMFAccessID AS 'Extension' FROM vw_Subscriber INNER JOIN vw_DTMFAccessID ON vw_DTMFAccessID.ParentObjectID=vw_Subscriber.SubscriberObjectId WHERE vw_Subscriber.SubscriberType IN ('1',...more >>

Trouble with precision in a calculation
Posted by SpankyATL at 8/2/2007 7:46:04 AM
I'm getting different results from a calculation I'm performing in a stored proc and in excel. Basically I'm dividing 10000 by 184.844371746143. In excel the result is 54.0995644364739. In my stored proc I am getting 54.099563598632813. Both values are defined as decimal. Which resu...more >>

Problem with trig functions?
Posted by Brian McLean at 8/2/2007 7:10:00 AM
I just reloaded an existing database with new data and then used some existing code to do some trig and save the results back into my table. I have done this many many times already with this db and code (literally billions of table entries). UPDATE dbImageList set cx = COS(RADIANS(CRVAL2)...more >>

problem with trigger and large update
Posted by Petra Meier at 8/2/2007 6:40:54 AM
Hi, I have a trigger that populates various tables when its host table is changed... everything works just fine, now I have legacy data in the host table and I want to fill them up. so I thought of updateing a field on every row so all data would be transfered into the destination tables sinc...more >>

Newbie Q: Doing max(column1) - trying to get value of column2
Posted by Rex at 8/2/2007 6:32:09 AM
Hi All - If I have a table as follows: Client_ID (int) - the Primary Key Location (varchar) ApptDateTime (datetime) For each Client_ID, I want to get the max(ApptDateTime) and for THAT row (for each Client_ID), I want the value of Location. In other words, for each Client_ID, I want the...more >>

prolem with trigger and large update
Posted by Petra Meier at 8/2/2007 6:18:06 AM
Hi, I have a trigger that populates various tables when its host table is changed... everything works just fine, now I have legacy data in the host table and I want to fill them up. so I thought of updateing a field on every row so all data would be transfered into the destination tables sinc...more >>

Query Logic
Posted by Bals at 8/2/2007 5:15:24 AM
Hi , I have a req like this INPUT ID A B 1 1 2 2 2 4 3 4 6 4 6 9 5 11 13 6 13 18 7 18 20 8 22 24 If you see the first row B column and Second row A column Diagonally .. (example 1st row B --> 2 2nd Row A --> 2 they got c...more >>

Sql query has been failed...
Posted by omasis at 8/2/2007 5:10:52 AM
when i was executed sql query , i have following error message "Operand data type nvarchar is invalid for multiply operator." Thanks.... ...more >>

Select date from other table
Posted by jazpar at 8/2/2007 4:34:52 AM
Hi, I have one table, which I want to update with a date from another table. The first table 'ProjEmplTrans' have field TransId, which is used in the related table. In the related table 'ProjTransPosting' there may be several records concerning this Transid, but I will only have the date fro...more >>

Calculate First date and last date of the month
Posted by g at 8/2/2007 3:11:29 AM
Hi Guys, I'm trying to calculate the first date of the month and the last date of the month, the variables that I have to do this are 1. The month number (from @varMonth = month(@someDate)) 2. The year number (from @varYear = year(@someDate)) I need to do it from just digits because of some...more >>

running select statement multiple times
Posted by iCodeSharp NO[at]SPAM gmail.com at 8/2/2007 12:20:31 AM
Hi, I want to know how i can run a select statement multiple times. This is my statement. SELECT RTRIM(ACC_No_Customer) AS Klantnr, RTRIM(ACC_No) AS Rekeningnr, CONVERT(varchar(10), dbo.GetDateFrom(Posting_Date), 112) AS Datum, dbo.InsertCommaPosAmount(Trans_Amount) AS Storting, dbo.Ins...more >>

Avoid two applications doing the same task
Posted by bzh_29 at 8/2/2007 12:00:00 AM
Hi, In my Apps (Vb.Net 1.1), one fonctionnality is to synchronise two databases. At the present time, the synchronisation is done on user demand. But we are working on a way to automatically start this synchronisation. Now we have to avoid that a user and the automatic launch at the same t...more >>

counting poularity
Posted by SOC at 8/2/2007 12:00:00 AM
If Table_log is imported from web logs, showing each instance of each web page being visited, how can a view be created to list the name of each page and the number of visits it has received? That is: Table_log id - page 1 - aaa.htm 2 - bbb.htm 3 - bbb.htm 4 - ccc.htm view_log ...more >>

Query using mathematical function on values from 2 tables has a performance prob
Posted by tennez at 8/2/2007 12:00:00 AM
When I am executing a query that uses a mathematical function on values from 2 tables the query takes much longer than the same query that uses values from 1 table, even though the join remains the same. Why is this happening? Is there a way to bypass this problem? Long query ( values from ...more >>

SQL 2000 default value from another field in same table
Posted by Jason Huang at 8/2/2007 12:00:00 AM
Hi, In the SQL Server 2000, given 2 none key fields fieldA and fieldB in table T. Is it possible to define the default value for the fieldB to be the value of fieldA? Thanks for help. Jason ...more >>


DevelopmentNow Blog