Viewing 15 posts - 841 through 855 (of 1,479 total)
select itemid,
tbl.col.value('(.)[1]','int')
from Test1 cross apply SerialNumbers.nodes ('/SERIALNUMBERS/SERIALNUMBER') tbl (col)
If what you need is to get the ItemID of a known serial number, you can use the exists method:
select...
September 1, 2009 at 2:59 am
If I understood correctly your requirement, this is one way of doing so. I did 2 joins to table #products. The first one is to get the product’s...
September 1, 2009 at 1:24 am
thombaugh (8/30/2009)
I'm trying to use bcp to export results of a query, the problem is the database uses a column named 'transaction' which of course Sql Server doesn't...
August 31, 2009 at 1:39 am
Christopher Gordon (8/28/2009)
insert into @myTable
(
store
,product
)
select 1 ,'A' union
select 1 ...
August 30, 2009 at 5:55 am
Assuming that by total you ment the sum of the amt_1 columns, you can do it with the combination of sum and case statement. Here is an example...
August 30, 2009 at 5:43 am
It looks as if you don’t understand what group by clause does. Can you explain what are trying to do? There is a good chance that you can...
August 26, 2009 at 5:16 am
I think that you can use the return value of xp_cmdshell. If it is 0, then it was successful. If it returns 1, then an error occurred. ...
August 26, 2009 at 2:17 am
I have to admit that I never understood why anyone would use the option to encrypt the procedure’s or view’s code. If you want to decrypt it, you...
August 25, 2009 at 8:27 am
If you’ll check the value of @@trancount, you’ll see that it is 1. Also if you’ll run a statement that modifies any data in the transaction before you run...
August 25, 2009 at 6:39 am
I don’t see why not. The named instance doesn’t depend on the default instance. Just go to Add/Remove programs and select the default instance.
Adi
August 25, 2009 at 6:29 am
According to the article at http://technet.microsoft.com/en-us/library/cc966419.aspx#XSLTsection130121120120 when one of the conditions is met, it marks the statistics as out of date:
1) The table size has gone from 0...
August 25, 2009 at 4:47 am
Can you explain why you are using varbinary column to store plain text?
In any case here is a small demo that shows you what to do in case that the...
August 19, 2009 at 6:53 am
Another way is to use the information_schema.table_constraints view. Here is an example:
select *
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where CONSTRAINT_TYPE = 'PRIMARY KEY' and TABLE_NAME = 'WriteTableNameHere'
Adi
August 19, 2009 at 6:41 am
I would still try the import with the openrowset function. Make sure that the account that is used by the SQL Server agent has permissions to read data on...
August 18, 2009 at 9:51 am
I think that you got the wrong forum. The forum is T-SQL and you are asking about .Net code. Also notice that the post didn’t go that well....
August 18, 2009 at 9:42 am
Viewing 15 posts - 841 through 855 (of 1,479 total)