Viewing 15 posts - 676 through 690 (of 698 total)
dcarpenter (7/16/2009)
Table - placementconsultant
placementid PK
...
July 16, 2009 at 7:08 am
How is the data stored currently? Is your problem at the importing stage, IE in the text file it's split like that? Or is it in the database already, in...
July 16, 2009 at 6:36 am
It's hard to say from the code you've posted, since there's no example data or table structure, but this seems off to me:
Create Procedure Test (@Name varchar(100))
As
Declare @DupName varchar(100)
Declare @TempName...
July 16, 2009 at 6:31 am
Here you go. Adapted one of my earlier queries to fit. Note that there's a few limitations - you can't have more than a certain number of columns in a...
July 16, 2009 at 6:25 am
If you need each date in a separate column, and you know exactly how many date values you can have, then you can use a Pivot table to pivot the...
July 15, 2009 at 12:12 pm
manikandan (7/15/2009)
how to Perform update in multiple tables using single sql query
There is one other approach you can use, and that's to use the system stored proc sp_MSforeachtable. It's a...
July 15, 2009 at 11:05 am
Robert klimes (7/14/2009)
I believe that the default constraint will only work for newly inserted row not existing ones.
Looks like you're right - didn't realize that. Unfortunate :/
July 15, 2009 at 5:19 am
well, not really sure what you mean by automate it, but if you want the script to create a column with a default value, it's:
ALTER TABLE [TableName] ADD [ColumnName] DEFAULT...
July 14, 2009 at 5:25 am
This should do what you need, though of course, the condition statements will probably be more complex 😛
Keep in mind that you can have nested CASE statements, and you can...
July 10, 2009 at 10:11 am
You could probably do it with a Pivot table. It might not present you the results the same way you want to see them though. EG:
DECLARE @TempTable TABLE
(
ID INT,
[Description] VARCHAR(100)
)
INSERT...
July 10, 2009 at 9:50 am
In that case i think your best bet is to just stick with what you have. Any other solution is going to involve a more complex WHERE clause which will...
July 10, 2009 at 8:52 am
The two cases look identical, am I missing something?
Depending on what you want to do, you could do something like:
declare @OtherAddressDetails nvarchar(1000)
set @OtherAddressDetails ='member address' -- or to whatever...
July 10, 2009 at 8:34 am
if you just want to change that field to an empty string, maybe dropping the column and then making a new column with the default value of empty string would...
July 10, 2009 at 8:10 am
terrance.steadman (7/10/2009)
This might not be a way to cause it to process in the correct order, but it would still work.
SELECT
field1
FROM devTable
WHERE
ISNUMERIC(field1) = 1
AND...
July 10, 2009 at 7:56 am
That being said, you should be careful about doing an update on a large number of rows, in a production database, since the operation will lock the rows that are...
July 10, 2009 at 6:59 am
Viewing 15 posts - 676 through 690 (of 698 total)