同时更新几行SQL服务器

时间:2017-01-18 16:43:24

标签: tsql reporting-services sql-update spatial geography

我正在创建一个列出城市,州,邮政编码和长/拉特的表格。我在我的表中创建了另一个使用地理数据类型的列(称为GeoLoc)。我想将纬度和经度列合并到GeoLoc列中,以便创建SSRS地图报告。

我可以简单地使用update语句来执行此操作。例如:

<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
    <Setter Property="Template">
        <Setter.Value >
            <ControlTemplate TargetType="{x:Type GroupItem}">
                <Expander x:Name="exp" Background="Firebrick">
                    <Expander.Header>
                        <StackPanel Orientation="Horizontal" Height="40" >
                            <TextBlock Text="{Binding Name}" Margin="0,0,0,0" FontSize="23" VerticalAlignment="Center" Foreground="White" />
                            <TextBlock Text="{Binding ItemCount}" FontSize="25" FontWeight="Bold" Margin="10,0,0,0" VerticalAlignment="Center" Foreground="White" />
                            <TextBlock Text="item(s)" FontSize="25" Margin="10,0,0,0" Width="1000"  VerticalAlignment="Center" Foreground="White"/>
                        </StackPanel>
                    </Expander.Header>
                    <ItemsPresenter />
                    <Expander.Style>
                        <Style TargetType="Expander">
                            <Setter Property="IsExpanded" Value="False"></Setter>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Expander}">
                                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                                            <DockPanel>
                                                <ToggleButton x:Name="HeaderSite" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Content="{TemplateBinding Header}" DockPanel.Dock="Top" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" MinWidth="0" MinHeight="0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                                    <ToggleButton.Template>
                                                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                                                            <Border Padding="{TemplateBinding Padding}">
                                                                <ContentPresenter Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Top"/>
                                                            </Border>
                                                        </ControlTemplate>
                                                    </ToggleButton.Template>
                                                </ToggleButton>
                                                <ContentPresenter x:Name="ExpandSite" DockPanel.Dock="Bottom" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                            </DockPanel>
                                        </Border>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="IsExpanded" Value="true">
                                                <Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
                                            </Trigger>
                                            <Trigger Property="ExpandDirection" Value="Right">
                                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
                                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
                                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}"/>
                                            </Trigger>
                                            <Trigger Property="ExpandDirection" Value="Up">
                                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
                                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
                                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}"/>
                                            </Trigger>
                                            <Trigger Property="ExpandDirection" Value="Left">
                                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
                                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
                                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}"/>
                                            </Trigger>
                                            <Trigger Property="IsEnabled" Value="false">
                                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Name}" Value="Title" >
                                    <Setter Property="IsExpanded" Value="True"></Setter>
                                    <Setter Property="IsEnabled" Value="False" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Expander.Style>
                </Expander>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

问题是,我有超过40,000行都有不同的坐标。我能以某种方式同时在每一行执行此更新吗?

1 个答案:

答案 0 :(得分:1)

这样的东西?

<input type="radio" name="foo" value="N" checked disabled>