Viewing 15 posts - 286 through 300 (of 2,469 total)
"have to use AS for column aliasing..."...not true...do you actually get an error if you don't use "AS"?!?!?!?!
April 25, 2006 at 7:03 am
Agree with everything said - just curious about one statement..."why do we use AS for column aliases...."..far as I know it's only for readability that we use this - we...
April 25, 2006 at 6:52 am
If you're looking for numbering your rows "on the fly" you'll find several examples on this site...
Here's one way of doing it...
SELECT IDENTITY(INT,1,1) AS RowNum, col1, col2... INTO #tempResults FROM myTable WHERE... SELECT...
April 24, 2006 at 10:34 am
Here's a comprehensive article on the numerous uses of case
April 24, 2006 at 10:03 am
ritesh - it has been more than many months of sundays since I dealt with asp code...I can provide the logic...for syntax hopefully someone else will step in...
1) dim an...
April 24, 2006 at 7:36 am
Have you tried...
select patientName, memoCol from myTable where (memoCol like '%headache%') or (memoCol like '%aspirin%') order by patientName?!
April 24, 2006 at 6:18 am
hmm..it appears that I didn't understand the requirement correctly...(& Paul does.. )..so you can get a string with any day of the week and...
April 24, 2006 at 6:09 am
Rob - Don't think you read Paul's "select" carefully enough...he's using wildcards in his "select..."..
LIKE '%Friday%'...you should read this on BOL for a compreshensive grasp!
April 24, 2006 at 5:55 am
ritesh - please do not cross-post..
follow this post here!
April 24, 2006 at 5:51 am
Are you trying to loop through the same recordset twice ?! If so, you'd have reached "EOF" the first time you loop through it!
Why not just store the values in...
April 24, 2006 at 5:48 am
Bill..for that you'd have to read this discussion
April 21, 2006 at 10:54 am
I always post this link to chris hedgate's article on this topic..
April 21, 2006 at 9:44 am
unless he has other fish to fry of course...
sorry Jeff - you caught me on a Friday when my penchant for silly comebacks is...
April 21, 2006 at 7:14 am
Just realized that Venkat's using information_schema views which is a much better option:
change your select to get your column names from this instead..
DECLARE @strColNames VarChar(500) DECLARE @tblName VarChar(50) SET @tblName =...
April 21, 2006 at 6:06 am
It it's just one table then I can't understand why you don't just type out the column names...
At any rate, Venkat has already posted...
April 21, 2006 at 6:01 am
Viewing 15 posts - 286 through 300 (of 2,469 total)