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 > january 2006 > threads for sunday january 22

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

Logic for picking values from columns
Posted by SG at 1/22/2006 10:46:31 PM
Hi Can anyone please help me ceate a logic (and SQL syntax) for this. I have a table which has the 1st column as some Primary key and the rest of the columns has integer values stored in them (there may be any no. of columns with the integer values). Now, I want to read the values in each r...more >>


Execute stored proc dynamically (stored a variable)
Posted by Calvin KD at 1/22/2006 10:31:02 PM
Hi, Can someone please show me how to execute a stored proc which has been assigned to a variable. I have a table of stored procedures and I want to pick out a certain sp, based on a set of criteria, and execute it dynamically. I'm thinking of setting up a CURSOR to loop through the selected ...more >>

2 highest marks of each group
Posted by vernalGreens NO[at]SPAM gmail.com at 1/22/2006 10:25:08 PM
I have a student table that has student name, subject and marks. I want to write a query that returns 2 highest marks of each subject and the name of the students who scored those marks. All are welcome to send their comments. ...more >>

Delete Duplication
Posted by bjeewa NO[at]SPAM hotmail.com at 1/22/2006 8:48:36 PM
Hi, I have a table Name_Note: create table Name_Note ( id varchar (10), Note_num int, Purpose varchar (20), Note text ) With values Like ID Note_Num Purpose Note 1239 2 Outlook Note1 1239 1259 Outlook Note 1 1432 ...more >>

Assign multiple variables from select in stored Procedure
Posted by Jeronimo Bertran at 1/22/2006 8:28:56 PM
Hello, I am writting a stored procedure that adds records to a table where some of the field data depend on a couple of fields from a second table. I am trying to assign more than one columns from a query to multiple local variables... DECLERE @var1 int, @var2 int SET @var1 = SELECT ...more >>

Suppressing SQL Errors
Posted by Kenact at 1/22/2006 8:08:02 PM
I'm trying to write a proc to delete a row from a table whose primary key is a foreign key in 4 other tables. If there are no occurances of the value in the other tables I want to be able to return my own message back to the application, but I can't seem to suppress the SQL error message: ...more >>

Jet OLDB Error on 1/2 of A/A Cluster
Posted by Jay Kusch at 1/22/2006 6:28:02 PM
Evening Folk ... Have an Active/Active cluster of SS2K (SP3) on Windows 2003 server. I have an SP that runs great on one node of the cluster BUT FAILS on the other node of the cluster. So in all the DBs (over 50) on NodeA the SP runs and returns the result set. On NodeB , in all the DBs...more >>

why sql server 2000 full text search doesn't work ?
Posted by chan_houw NO[at]SPAM yahoo.com.tw at 1/22/2006 6:10:50 PM
There is a table named [Attach] has a column named [Content] , and it's data type is [image] ! It record upload file ! I define another column named [MyFileType] to record upload file's type ! Now , I upload a excel file and it contains a word "SALI" ! The [Content] record the excel file (it's ...more >>



HELP! Problem with data selection.
Posted by Kachmaryk Yuriy at 1/22/2006 5:30:24 PM
Hi, People, help me with problem to make the query qExpectedRESULT I will accept any suggestion and suppositions! Possibly use of User Defined Functions it is a right way ? -- START of DB Objects CREATE scripts ----------------------- CREATE TABLE [dbo].[Customers] ( [AG_ID] [int] IDE...more >>

Need guidence on notifing when a new users is added
Posted by Jim Abel at 1/22/2006 4:00:02 PM
I have a SQL 2000 satabase that has multiple administrators for it and I need to know when a new user is added to the server. Can you provide some suggestions on how to accpmplosh this task?...more >>

Conditional column NAME on insert/update
Posted by Fabio Cavassini at 1/22/2006 3:28:48 PM
I need to dinamically select a column in which to insert based on a parameter, I have this code, but it throws an incorrect syntax error. The value that I'm inserting is always static (the current date) what I need to be dynamic is the column in which it'll be inserted. How do I dinamically s...more >>

XMLDOC
Posted by Yaniv at 1/22/2006 3:27:24 PM
Ho do I pass any of the following chars (<, >, ', &) in an xml doc. For example I need to pass the char: & inside the bellow string: ''abcde'' spTest @XMLDOC = '<IPS> <IP> Comment=''abcde'' </ip></IPS>' I am using sql2000 sp3a Thanks, Yaniv ...more >>

TimeSpan
Posted by Ewild at 1/22/2006 2:30:02 PM
What is the best way to stoe the length of a movie? .NET has a TimeSpan entity; does Sql Server have anything like this?...more >>

Which one is faster?
Posted by Skywalker at 1/22/2006 2:10:59 PM
Hi All, Say I have to use Cursor on a large table (T1) operation. I need to update the records row by row. Here is the two options, please help me verify which one is faster. Option1: Declare an updatable cursor based on some less-changing(almost unique) columns, using WHERE CURRENT OF...more >>

Relational Design Question
Posted by Jeff at 1/22/2006 12:10:03 PM
I'm designing a database for a medical research group in a university medical center that studies organ transplant patients following surgery. There is no existing database and all data is currently recorded on a lengthy paper form. The paper form has hundreds of checkboxes as well as dozens...more >>

datediff2
Posted by Zuska at 1/22/2006 12:02:01 PM
Hi, I need to make a date difference in hours I have a function, there are declared parameters (datetime type) but the difference is still in a different type (even if its declared as int) ....... declare @date1 as datetime --system date, time declare @date2 as datetime declare @dif ...more >>

What is the best way to transfer databases from one server to anot
Posted by Sam at 1/22/2006 10:57:01 AM
Hi, We are upgrading our network, servers, etc. On top of that, our new domain will be different due corporate restructuring. What is the best way for us to move our databases from one machine in Domain A to another machine in Domain B. Both domains are in the same physical location. We...more >>

Derived Query
Posted by Paul Ilacqua at 1/22/2006 10:51:47 AM
I'm trying to build a "derived" query from 2 seperate table a Build count table and a defect table I've done this before but never with the calculated columns as in Year(TestDate) as 'Yr'. It fails and returns Server: Msg 207, Level 16, State 1, Line 17 Invalid column name 'YR'. Any help ?...more >>

datediff
Posted by pietro at 1/22/2006 10:12:02 AM
hi, Im tryinf to fix in to the function date different. One of the date is in the declared variability and the other is current day why select datediff(hh,@datetime,getdate()) doesnt work in the function? It responds : INVALID USE OF GETDATE WITHIN A FUNCTION Thanks in advance ...more >>

Bulk repopulation of a table
Posted by johnsolver NO[at]SPAM gmail.com at 1/22/2006 7:03:25 AM
Hi, I have a table T with 3 int columns, I need to update it every X hours with a query that returns the same 3 int columns. Currently I'm doing it using a cursor iterating over each row and checking whether I need to DELETE/UPDATE/INSERT it, this however isn't very efficient. So I tested 2 ad...more >>

convert datetime
Posted by pietro at 1/22/2006 6:16:02 AM
Hi im working on a simple function. I have a table with two columns (datetime) and I need to extract date rom one of them and time from another one - and then to join it and save it in the variable (which is declered as a datetime). Please, can somebody help me or advice another waz how to get...more >>

OPENQUERY from ASP.NET Page Problem?
Posted by savvy at 1/22/2006 4:51:20 AM
I'm performing a particular word Search in MS Word, Text, PDF docs and displaying the results through Index Server linked to SQL Server when it is matched. For which I'm using Openquery in the stored procedure which works fine in Query Analyzer of the SQL Server but doesn't work ( shows non...more >>

help me
Posted by shashi at 1/22/2006 4:13:08 AM
hi frnds of this grp, i am new to this grp. i will xplain my problem. please help me out from this. my problem is: i want to install a sql in one system(i mean i want to make one system as server) out of 5 sys i have. they all are in network. now how can i install tht thing in order to have ...more >>

append single character at specific position in string
Posted by sarah.clarke at 1/22/2006 2:14:50 AM
Hi everyone, i am in seek of help. I have a variable (called status) of type char(10). This needs to be extended to type char(11) and i need to append the character 'N' at this position. For example, if 'status' is any of the following strings of type char(10) NYNYYN NY NNYYY Y NNNY ...more >>

Maximum Size for UDT
Posted by Leila at 1/22/2006 12:15:43 AM
Hi, I want to use UserDefined format for my CLR UDT and I need a formula to calculate its MaxSize. Thanks in advance, Leila ...more >>

Null and UDTs
Posted by Leila at 1/22/2006 12:15:36 AM
Hi, I am trying to use Point UDT from MSDN. But when I insert a null into this column, my SELECT on the table generates an error: An error occurred while executing batch. Error message is: Data is Null. This method or property cannot be called on Null values. Any help would be greatly appreciat...more >>

Name property of SqlUserDefinedType
Posted by Leila at 1/22/2006 12:15:32 AM
Hi, MSDN describes that Name property of Microsoft.SqlServer.Server.SqlUserDefinedType is not used by SQL Server, but by VS.NET IDE. I have set a name for my UDT, how can I see its effect it VS.NET IDE? Thanks in advance, Leila ...more >>


DevelopmentNow Blog