Viewing 15 posts - 136 through 150 (of 761 total)
dwain.c (12/19/2012)
Since quote is also CHAR(25), you can also do this:CHARINDEX(CHAR(25), string_column) > 0
Single Quote is char(39) Dwain......if I am not wrong. 😉
December 20, 2012 at 2:06 am
Here is another way of doing it:
Select a.ItemID, b.ActionID From
(
Select Distinct ItemID From Items
) As a
CROSS JOIN Actions As b
Except
Select ItemID, ActionID From Items
December 20, 2012 at 1:47 am
Here is another way using Correlated SubQuery:
Create Table Ex1
(
YEAR int,
WEEKS int,
VALUE int
)
Insert Into Ex1
Select 2012, 1,3000
Union ALL
Select 2012, 2,5000
Union ALL
Select 2012, 3,6000
Union...
December 20, 2012 at 12:26 am
If the columns are dynamic then on what persistent basis do you plan to JOIN the columns??.....or is it that it does not matter??......Just by looking at your explanation it...
December 19, 2012 at 11:10 pm
dwain.c (12/17/2012)
CREATE TABLE #varchar_field1...
December 18, 2012 at 12:24 am
Welcome to SQL Server Central busappa.
Following should do what you want :
Declare @string Varchar(10)
Set @string = 'Vinu'
Select STUFF(@String, LEN(@String), 1, '')
If this is not what...
December 18, 2012 at 12:14 am
If the no. of quotes are still confusing for you in the solution provided by Lynn......then you can also use the CHAR() function in sql server to apply quotes by...
December 14, 2012 at 9:52 pm
If I am not too late....here is the dynamic version :
Declare @sql Nvarchar(MAX)
;With CTE
As
(
Select Distinct LabName From #LabValues
)
Select @sql = STUFF((Select ',MAX(Case When LabName...
December 12, 2012 at 4:51 am
shel (11/28/2012)
col1col2date time
brecord set1/1/12 4:10
brecord clear1/1/12 3:12
brecord set1/2/12 13:12
I don't think the sample data you provided is consistent. You can see above that the date time for the 'record...
November 29, 2012 at 12:03 am
Try implementing the following procedure :
Create Procedure PR_SearchDatabase
@field NVarchar(400),
@input NVarchar(400)
As
Begin
Declare @tablename NVarchar(400), @sql NVarchar(Max)
Declare @table Table(Data NVarchar(max))
Declare TableName_Cursor Cursor LOCAL STATIC Forward_Only...
November 20, 2012 at 12:39 am
sivajii (11/15/2012)
hivinu512
thanks for the solution which u just posted for me
You're Welcome. Glad it was halpfull for you.
November 19, 2012 at 4:44 am
This is the process to remove the job from the schedule :
1. Open Tree View in Object Explorer in SSMS.
2. Open SQL Server Agent.
3. Open Jobs under SQL Server...
November 15, 2012 at 9:38 pm
Since, its a conversion error.....I would look at the error to know the datatypes in the error message. Then I would look at comparisons(equal to, greater than, lesser than etc.)...
November 14, 2012 at 11:54 pm
As you can guess from the error....one of your queries is returning more than a single value. But I won't be able to help you much just by looking at...
November 14, 2012 at 10:40 pm
Viewing 15 posts - 136 through 150 (of 761 total)