Viewing 15 posts - 5,341 through 5,355 (of 15,381 total)
Pritz (3/28/2014)
FirstName varchar(20),null
MiddleName varchar(5),null
LastName varchar(30),null
Position int,null
How to concatenate all these four fields to give result as Name?
I tried this but it is not working properly.
select
LTRIM(RTRIM(isnull(Person.Lastname,' ')+','+isnull(Person.Firstname,'...
March 28, 2014 at 3:12 pm
Bob McClellan-320407 (3/28/2014)
Thanks Sean... I did check it out.... I typically stay away from dynamic sql when I can.
Not a bad rule of thumb but as you can see...
March 28, 2014 at 3:09 pm
sku370870 (3/28/2014)
March 28, 2014 at 3:07 pm
sku370870 (3/28/2014)
March 28, 2014 at 3:04 pm
Bob McClellan-320407 (3/28/2014)
Thanks Sean... I appreciate the heads up on that.Embarrassed to say I did not consider that 🙁
No need to be embarrassed at all. This whole sql thing is...
March 28, 2014 at 1:56 pm
Bob McClellan-320407 (3/28/2014)
Create
ProcdynaSort -- exec dynaSort 1, 'DESC'
@SortID int,
@SortDirection char(4)
as
If @SortID = 1 and @SortDirection = 'ASC'
Begin
--Put your query and correct sort...
March 28, 2014 at 1:26 pm
Bob McClellan-320407 (3/28/2014)
I always use this when I need to compare dates...select convert(char,getdate(),112)
RESULT = 20140328
hth,
..bob
The...
March 28, 2014 at 1:25 pm
This screams of a catch all query. Performance for this type of thing is likely to seriously stink unless you handle it correctly. Take a look at Gail's blog post...
March 28, 2014 at 12:36 pm
Annee (3/28/2014)
Convert(datetime, GetDate(), 101) to
Convert(date, GetDate(), 101)
I see following error:
'Type date is not a defined system type.'
Sorry I am actually using SQL server...
March 28, 2014 at 12:33 pm
buddy__a (3/28/2014)
How do you know it fails? You must be getting an error message to know it fails?
Msg 1781, Level 16, State 1, Line 1
Column already has a DEFAULT bound...
March 28, 2014 at 12:30 pm
The point is to make it easy for us volunteers to help. I really don't want to download several zip files and do a bunch of stuff setting up the...
March 28, 2014 at 12:22 pm
buddy__a (3/28/2014)
Can you elaborate on what the problem is? I assume you must be getting an error message? What version are you running?
What you posted has no primary key and...
March 28, 2014 at 10:58 am
buddy__a (3/28/2014)
The only difference between the two servers is that my local server is running SQL Developer edition while the Dev server is running Standard Edition.
That is the edition not...
March 28, 2014 at 10:53 am
samalex (3/28/2014)
March 28, 2014 at 10:52 am
This looks to be a pretty traditional islands and gaps problem. Take a look at this article. http://www.sqlservercentral.com/articles/T-SQL/71550/%5B/url%5D
March 28, 2014 at 10:50 am
Viewing 15 posts - 5,341 through 5,355 (of 15,381 total)