SQL выборка записей которые не равны NULL

SELECT TOP (1000) [IACGUID]
  ,[IACObjectClass]
  ,[IACConnector_Guid]
  ,[IACLastMod]
  ,[IACClientID]
  ,[IACPreferredLanguage]
  ,[IACUserClassification]
  ,[AlternateEmailAddress]
  ,[Assistant]
  ,[AccountExpires]
  ,[C]
  ,[CloudLegacyExchangeDN]
  ,[CloudMSExchArchiveStatus]
  ,[CloudMSExchBlockedSendersHash]
  ,[CloudMSExchRecipientDisplayType]
  ,[CloudMSExchSafeRecipientsHash]
  ,[CloudMSExchSafeSendersHash]
  ,[Cn]
  ,[Co]
  ,[CodePage]
  ,[Company]
  ,[CountryCode]
  ,[Department]
  ,[DisplayName]
  ,[DistinguishedName]
  ,[EmployeeID]
  ,[EmployeeNumber]
  ,[EmployeeType]
  ,[ExpiryDate]
  ,[ExtensionAttribute1]
  ,[ExtensionAttribute10]
  ,[ExtensionAttribute11]
  ,[ExtensionAttribute12]
  ,[ExtensionAttribute13]
  ,[ExtensionAttribute14]
  ,[ExtensionAttribute15]
  ,[ExtensionAttribute2]
  ,[ExtensionAttribute3]
  ,[ExtensionAttribute4]
  ,[ExtensionAttribute5]
  ,[ExtensionAttribute6]
  ,[ExtensionAttribute7]
  ,[ExtensionAttribute8]
  ,[ExtensionAttribute9]
  ,[FacsimileTelephoneNumber]
  ,[Gender]
  ,[GenerationQualifier]
  ,[GivenName]
  ,[GroupType]
  ,[HideDLMembership]
  ,[HomePhone]
  ,[HostedName]
  ,[Info]
  ,[Initials]
  ,[InternalPhoneExtension]
  ,[IpPhone]
  ,[JpegPhoto]
  ,[L]
  ,[LegacyExchangeDN]
  ,[Location]
  ,[Mail]
  ,[FimDelete]
  ,[MailNickName]
  ,[managedBy]
  ,[Manager]
  ,[MiddleName]
  ,[Mobile]
  ,[MsDS-HABSeniorityIndex]
  ,[MsDS-PhoneticDisplayName]
  ,[MsExchArchiveGUID]
  ,[MsExchArchiveStatus]
  ,[MsExchAssistantName]
  ,[MsExchAuditAdmin]
  ,[MsExchAuditDelegate]
  ,[MsExchAuditDelegateAdmin]
  ,[MsExchAuditOwner]
  ,[MsExchBlockedSendersHash]
  ,[MsExchBypassAudit]
  ,[MsExchELCExpirySuspensionEnd]
  ,[MsExchELCExpirySuspensionStart]
  ,[MsExchELCMailboxFlags]
  ,[MsExchEnableModeration]
  ,[MsExchExtensionCustomAttribute1]
  ,[MsExchExtensionCustomAttribute2]
  ,[MsExchExtensionCustomAttribute3]
  ,[MsExchExtensionCustomAttribute4]
  ,[MsExchExtensionCustomAttribute5]
  ,[MsExchGroupDepartRestriction]
  ,[MsExchGroupJoinRestriction]
  ,[MsExchHideFromAddressLists]
  ,[MsExchImmutableId]
  ,[MsExchLitigationHoldDate]
  ,[MsExchLitigationHoldOwner]
  ,[MsExchMailboxAuditEnable]
  ,[MsExchMailboxAuditLogAgeLimit]
  ,[MsExchMailboxGuid]
  ,[MsExchModerationFlags]
  ,[MsExchRecipientDisplayType]
  ,[MsExchRecipientTypeDetails]
  ,[MsExchRemoteRecipientType]
  ,[MsExchRequireAuthToSendTo]
  ,[MsExchResourceCapacity]
  ,[MsExchResourceDisplay]
  ,[MsExchRetentionComment]
  ,[MsExchRetentionURL]
  ,[MsExchSafeRecipientsHash]
  ,[MsExchSafeSendersHash]
  ,[MsExchTeamMailboxOwners]
  ,[MsExchTeamMailboxSharepointLinkedby]
  ,[MsExchTeamMailboxSharepointURL]
  ,[MsExchUsageLocation]
  ,[MsOrg-IsOrganizational]
  ,[MsRTCSIP-DeploymentLocator]
  ,[MsRTCSIP-Line]
  ,[MsRTCSIP-OptionFlags]
  ,[MsRTCSIP-PrimaryUserAddress]
  ,[MsRTCSIP-UserEnabled]
  ,[NameSuffix]
  ,[ObjectGUID]
  ,[OoFReplyToOriginator]
  ,[Pager]
  ,[PersonalTitle]
  ,[PhysicalDeliveryOfficeName]
  ,[PostalCode]
  ,[PostOfficeBox]
  ,[PreferredDisplayName]
  ,[PreferredGivenName]
  ,[PreferredLanguage]
  ,[PreferredSN]
  ,[ProvisionOffice365]
  ,[ReportToOriginator]
  ,[ReportToOwner]
  ,[Retired]
  ,[Role]
  ,[sAMAccountName]
  ,[SecurityEnabled]
  ,[Site]
  ,[Sn]
  ,[St]
  ,[Status]
  ,[Street]
  ,[StreetAddress]
  ,[TargetAddress]
  ,[TelephoneAssistant]
  ,[TelephoneNumber]
  ,[ThumbnailPhoto]
  ,[Title]
  ,[UnauthOrig]
  ,[UserAccountControl]
  ,[UserPrincipalName]
  ,[WhenChanged]
  ,[WhenCreated]
  ,[WwwHomePage]
  ,[IACBlockTransition]
  ,[DeltaID]
  ,[DOB]
  ,[internetEncoding]
  ,[Deleted]
  ,[MetaDB-SV_Id]
  ,[passwordAnchor]
  ,[exportSourceAnchor]
  ,[SuppliedPasswords]
  ,[SuppliedPWD]
  ,[SyncBack]
  ,[HasSuppliedKey]
  ,[WorkAddressLine1]
  ,[WorkAddressLine2]
  ,[WorkCity]
  ,[WorkState]
  ,[WorkCountry]
  ,[WorkPostalCode]
  ,[ignore]
  ,[CountryRegion]
  ,[SSN]
  ,[CampusBox]
  ,[PrimarySupervisoryOrganization]
  ,[JobFamily]
  ,[DNreference]
  ,[AS_AuthenticationAddress]
  ,[MsDSHABSeniorityIndex]
  ,[MsDSPhoneticDisplayName]
  ,[msExchTeamMailboxExpiration]
  ,[MsOrgIsOrganizational]
  ,[msRtcSipApplicationOptions]
  ,[MsRTCSIPDeploymentLocator]
  ,[MsRTCSIPLine]
  ,[MsRTCSIPOptionFlags]
  ,[msRtcSipOwnerUrn]
  ,[MsRTCSIPPrimaryUserAddress]
  ,[MsRTCSIPUserEnabled]
  ,[objectSID]
  ,[pwdLastSet]
  ,[MVlastmod]
  ,[ImmutableID]
  ,[Thumbnail]
  ,[StartDate]
  ,[Tenancy_ID]
  ,[IACClassification_ID]
  ,[SSPR_AlternativeEmail]
  ,[SSPR_SMSNumber]
  ,[IacLastModifySource]
  ,[FIM_Guid]
  ,[IACCreation]
  ,[IACFlow]
  ,[msDS-cloudExtensionAttribute1]
  ,[msDS-cloudExtensionAttribute2]
  ,[msDS-cloudExtensionAttribute3]
  ,[msDS-cloudExtensionAttribute4]
  ,[msDS-cloudExtensionAttribute5]
  ,[msDS-cloudExtensionAttribute6]
  ,[msDS-cloudExtensionAttribute7]
  ,[msDS-cloudExtensionAttribute8]
  ,[msDS-cloudExtensionAttribute9]
  ,[msDS-cloudExtensionAttribute10]
  ,[msDS-cloudExtensionAttribute11]
  ,[msDS-cloudExtensionAttribute12]
  ,[msDS-cloudExtensionAttribute13]
  ,[msDS-cloudExtensionAttribute14]
  ,[msDS-cloudExtensionAttribute15]
  ,[msDS-cloudExtensionAttribute16]
  ,[msDS-cloudExtensionAttribute17]
  ,[msDS-cloudExtensionAttribute18]
  ,[msDS-cloudExtensionAttribute19]
  ,[msDS-cloudExtensionAttribute20]
  ,[Disabled]
  ,[InitialSync]
  FROM [dbo].[0e691f83-19a1-454f-8e18-41dab00cca66_Objects]

Помогите сделать так чтобы вывод был только тех столбцов из таблицы которые не равны NULL, Погуглил можно отсортировать какую то одну колонку и там уже ввести IS not NULL и тогда отсортирует по какому то конкретному столбцу который будет указан. Думаю смог объяснить


Ответы (0 шт):