LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 18 Jul 2009 12:52:51 -0400
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: SQL Server Query Equivalent of SAS merge
Comments:   To: Madhav <chavan.madhav@GMAIL.COM>
In-Reply-To:   <cdef9221-6e13-411f-90bf-dda8adecfbfa@y19g2000yqy.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

Madhav: How about you telling us (not me but the list) what you are trying to do? The in= and SAS Macro variable happen to be features of SAS. One SQL query never yields more than one SQL table. Do you have SAS/Access oleDB or ODBC licensed, or do you plan to extract data from a MS SQL Server database independent of a SAS environment. These details matter. S

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Madhav Sent: Saturday, July 18, 2009 8:08 AM To: SAS-L@LISTSERV.UGA.EDU Subject: SQL Server Query Equivalent of SAS merge

Hi can any one give me a SQL Server 2005 query version for following SAS merge code

data prov (rename=(prv_ptr=prv471_ptr)) checkit; merge extract_prov(in=in_prov rename=(prv471_ptr=prv_ptr) drop=hmo_ptr) clmprvhmo (in=in_hmo); by dw_source_system prv_ptr; if in_prov and not in_hmo then hmo_ptr=0; if in_prov then output prov; if in_hmo and not in_prov and dw_source_system in(&dw_source_system) then output checkit; run;

I have extract_prov and clmprvhmo dataset as Table in SQL server I requier pure SQL version to Use in SQL Server 2005 Thanks in advance. Madhav


Back to: Top of message | Previous page | Main SAS-L page