Viewing 15 posts - 856 through 870 (of 1,923 total)
Jeff Moden (3/31/2011)
ColdCoffee (3/31/2011)
You can do it with a WHILE...Alright... who are you and what have you done with the real ColdCoffee?:-P
😛 ah Jeff, i knew it right away that...
March 31, 2011 at 12:22 pm
You can do it with a WHILE or you can utilize dynamic SQL to make each row a EXEC statement and execute it..
March 31, 2011 at 2:27 am
Kev, this is ultra fast method of splitinng the strings.. its called DelimitedSplit8k.. i currently lost the link to it.. search this site for that, u ll be amazed by...
March 31, 2011 at 2:11 am
Copy paste error bro 🙂
here is the corrected code:
-- solution 1
select FlightName , NumberOFsegmets = COUNT(SegmentID)
, (select top 1 inner_temp.DeparturePlace from temp inner_temp
...
March 31, 2011 at 1:32 am
Solution 1:
select FlightName , NumberOFsegmets = COUNT(SegmentID)
, (select top 1 inner_temp.DeparturePlace from temp inner_temp
where inner_temp.FlightName = outer_temp.FlightName
...
March 31, 2011 at 12:55 am
mfink (3/30/2011)
I need it to update the Put_it_Here column
So lazy, are we ?? 😀
Try this:
UPDATE @TheTable
SET put_IT_HERE = NTILE(2) OVER(PARTITION BY Type_Here ORDER BY ( CASE WHEN Tab_id%2 =...
March 30, 2011 at 2:35 pm
LutzM (3/30/2011)
@ Jack / ColdCoffee: do you have a SS2K version around or do you remember the table and column names?
No Lutz, i dont have.. sorry.. i couldnt remember the...
March 30, 2011 at 2:30 pm
How about this?
select * , Rn = NTILE(2) OVER(PARTITION BY Type_Here ORDER BY ( case when Tab_id%2 = 0 THEN 1
else 0 end ) ) From @TheTable
order by Tab_id
March 30, 2011 at 2:19 pm
Whts your expected result out of your sample data?
March 30, 2011 at 1:51 pm
LutzM (3/30/2011)
SELECT t.name AS table_name,
c.name AS column_name,
y.name AS column_type,
...
March 30, 2011 at 1:48 pm
Two ways (there may be more ways :-))
1. Using the INFORMATION_SCHEMA Views such as information_schema.columns, information_schema.tables
2. Using sys.objects, sys.tables and sys.columns SYSTEM views. JOIN these tables to get what you...
March 30, 2011 at 1:46 pm
Craig Farrell (3/29/2011)
I'm assuming this isn't an early April Fool's joke. Jhors...
ROFL :hehe: :hehe:
March 29, 2011 at 3:35 pm
decimal value (30,9) = A value that will have 30 digits in total ( numbers before point and after point , but excluding the character "point") ; AND there can...
March 29, 2011 at 1:38 am
CirquedeSQLeil (3/28/2011)
Or you could do as ColdCoffee has written.
😉
March 28, 2011 at 11:34 pm
How about this?
SELECT
inv.Name,
inv.Domain,
inv.[User],
inv.127.0.0.1,
MAX( CASE WHEN arp.Name LIKE '%Office%' THEN arp.Name END) AS OfficeName ,
MAX( CASE WHEN arp.Name LIKE...
March 28, 2011 at 9:47 pm
Viewing 15 posts - 856 through 870 (of 1,923 total)