Showing posts with label assign. Show all posts
Showing posts with label assign. Show all posts

Sunday, March 25, 2012

Can we call functions that assign a value to a field

Can we call functions that assign a value to a filed. For example, we use
oracle sequence to assign a value to fields. Since SQLSvr does not have
sequences, can a function be used instead to assign a unique value in BCP
tool.JP
What is the version are you using?
Can you be more specific?
How about using an IDENTITY Properies?
"JP" <JP@.discussions.microsoft.com> wrote in message
news:59C56298-7B6D-4A63-B2F7-EE4063CBA6B4@.microsoft.com...
> Can we call functions that assign a value to a filed. For example, we use
> oracle sequence to assign a value to fields. Since SQLSvr does not have
> sequences, can a function be used instead to assign a unique value in BCP
> tool.|||Hi,
The version used by us is SQL SERVER 2005 (9.0)
Since identity property can assign value to only one field, we are looking
for an alternative as we have to more than one field where the sequnece need
s
be set.
We are using the BCP.exe utiliy for inserting the flat file data into the
table.
So at the same time we need the sequence to be generated for some of the
fields in the Format file for the table columns.
"Uri Dimant" wrote:

> JP
> What is the version are you using?
> Can you be more specific?
> How about using an IDENTITY Properies?
>
>
> "JP" <JP@.discussions.microsoft.com> wrote in message
> news:59C56298-7B6D-4A63-B2F7-EE4063CBA6B4@.microsoft.com...
>
>

Can We assign DataSet object to Object Type

Hi Friends,

I am having a Package scope variable DS of type system.object .In the Script Component which accept this variable as ReadWrite type I am Making the following assignment.

Public Overrides Sub PostExecute()

Variables.DsReport = DsReport // DsReport is a Data Set Object Created and Populated inside the script Component

End Sub

I am getting error while doing this sort of assignment.

Please help me to solve this problem

Regards,

Mahe

Which error do you get?

-Tom

Wednesday, March 7, 2012

Can SQL Server 2000's Select statement assign multi-variables from Table?

Can SQL Server 2000's Select statement assign multi-variables from Table?
e.g. Select @.CustomerName = CustomerName, @.EffectiveDateFrom =
EffectiveDateFrom, @.EffectiveDateEnd = EffecitveDateEnd from Customer where
customercode = 'XXX'.> Can SQL Server 2000's Select statement assign multi-variables from Table?
Yes. When multiple rows are returned, only values from the last row
returned are assigned.
Hope this helps.
Dan Guzman
SQL Server MVP
"ABC" <abc@.abc.com> wrote in message
news:eWjrMTBEGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Can SQL Server 2000's Select statement assign multi-variables from Table?
> e.g. Select @.CustomerName = CustomerName, @.EffectiveDateFrom =
> EffectiveDateFrom, @.EffectiveDateEnd = EffecitveDateEnd from Customer
> where customercode = 'XXX'.
>|||Yes it can. Have you tried it and getting an error or just asking?
Andrew J. Kelly SQL MVP
"ABC" <abc@.abc.com> wrote in message
news:eWjrMTBEGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Can SQL Server 2000's Select statement assign multi-variables from Table?
> e.g. Select @.CustomerName = CustomerName, @.EffectiveDateFrom =
> EffectiveDateFrom, @.EffectiveDateEnd = EffecitveDateEnd from Customer
> where customercode = 'XXX'.
>