Viewing 15 posts - 4,246 through 4,260 (of 5,394 total)
I'm sorry, but I can't understand why UNION ALL doesnt' fit your needs.
Can you post the desired output of your "merged" query please?
May 24, 2010 at 7:24 am
I have worked for a sofware company focused on cross-platform ERP solutions and I think I can throw in my 2 cents.
Writing ANSI SQL is "per se" a pain, but...
May 24, 2010 at 6:59 am
GilaMonster (5/24/2010)
... the logical file name you have specified is not part of the database and you should use RESTORE FILELISTONLY ...
Sorry for echoing, Gail.
May 24, 2010 at 6:33 am
What do you get when you request the filelist (filelistonly)?
I suppose the suffix "_new" is not part of the logical filename.
May 24, 2010 at 6:31 am
Try this:
;WITH messages AS (
SELECT mobile_number,
mobile_opt_in,
Row_Num = ROW_NUMBER() OVER(PARTITION BY mobile_number ORDER BY CAST(mobile_opt_in AS datetime) DESC)
FROM tbl_Messages AS A
INNER JOIN tbl_Mobile AS B
ON A.SWID = B.SWID
)
SELECT...
May 24, 2010 at 3:48 am
Write it by hand. There's a good example in the article I suggested.
Another option is downloading and installing SSMS Tools Pack[/url] and use the "generate insert statements" feature.
May 24, 2010 at 3:38 am
Great. Now post some sample data and you're done.
Be sure to post it as INSERT statement upon the tables you just scripted.
See the article in my signature if you're in...
May 24, 2010 at 3:24 am
I'll be glad to help if you at least try to post some table script and sample data.
May 24, 2010 at 3:17 am
This is the best place to start from if syntax is your issue:
May 24, 2010 at 2:58 am
I would suggest using ROW_NUMBER:
CREATE TABLE #tbl_Messages (
phone_number varchar(50),
time_stamp datetime
)
;WITH messages AS (
SELECT phone_number,
time_stamp,
Row_Num = ROW_NUMBER() OVER(PARTITION BY phone_number ORDER BY time_stamp DESC)
FROM #tbl_Messages
)
SELECT phone_number
FROM messages
WHERE Row_Num...
May 24, 2010 at 2:55 am
josh shilling (5/21/2010)
Try flipping the(Field LIKE @Param OR @Param IS NULL)
To
(@Param IS NULL OR FIELD Like @Param)
See this post by Mark Cohen...
That page contains quite questionable statements. It's...
May 24, 2010 at 2:08 am
Andy in Pembs (5/21/2010)
A very insightful piece, Phil, struck a chord with me.
Now this may be a little off-topic but understanding what...
May 21, 2010 at 6:11 am
tigriswoods (5/20/2010)
May 20, 2010 at 9:54 am
jmerrill 28016 (5/20/2010)
(@parameter is null or column = @parameter)
it won't ever look at the column...
May 20, 2010 at 9:08 am
Brett Robson (5/20/2010)
May 20, 2010 at 2:02 am
Viewing 15 posts - 4,246 through 4,260 (of 5,394 total)