Viewing 15 posts - 196 through 210 (of 355 total)
You can use the STUFF or SUBSTRING functions as well as the RIGHT function. The SUBSTRING function version is likely to be the fastest, followed by the RIGHT version then...
March 24, 2009 at 11:46 am
OK - here's the table and test data I've used
CREATE TABLE #AccountsTable (
acct_num char(10) PRIMARY KEY,
acct_type char(4) NOT NULL,
acct_value...
March 24, 2009 at 9:13 am
What is the table structure?
On which column(s) is the table's primary key based?
March 24, 2009 at 8:02 am
Basically I have a table that subtracts the avg value (for all accounts) from the account's value - creating a 'difference' column. From there, I want to select the...
March 24, 2009 at 4:09 am
SELECT ROW_NUMBER() OVER (ORDER BY CustomerID) AS SerialNo,
CustomerId,CustomerName FROM dbo.CustMaster
March 21, 2009 at 3:59 am
In SQL Server 2005, the availability of the ROW_NUMBER function makes the query simple.
SELECT SKU,
MAX(CASE WHEN RNK = 1 THEN PO END) AS PO1,
...
March 20, 2009 at 6:04 pm
does setting up SKU column as Primary key help
You can't use the SKU column as a primary key by itself as it's not unique.
If you were using SQL Server...
March 20, 2009 at 5:42 pm
Is there a primary key on your source table?
If so, on which columns is it based?
If not, why not?
March 20, 2009 at 5:12 pm
OK, if you wish to report on the number of rows grouped by day then you need to use an aggregate query and strip out the time component from the...
March 20, 2009 at 4:16 pm
From your post on 16th March I assumed that you wanted the difference in days between the Start and Stop columns. The TSQL DATEDIFF function will return the number of...
March 20, 2009 at 3:56 am
Can you please tell me what is X and N in your code
They are aliases for the table and column that is generated by shredding the XML variable using...
March 20, 2009 at 3:25 am
Does this query do what you're looking for?
CREATE TABLE #xtabtesting (
SKU char(9) NOT NULL,
PO char(5) NOT NULL,
QTY int NOT NULL,
...
March 19, 2009 at 4:04 pm
http://en.wikipedia.org/wiki/Marla_(unit)
The marla is a traditional unit of area in Pakistan, India and Bangladesh. The marla was standardized under British rule to be equal to the square rod, or 272.25 square...
March 19, 2009 at 11:55 am
Is row order important to you?
Does it matter which row's values are stored in PO1, QTY1, Date1 and which in PO2, QTY2 and Date2, etc?
March 19, 2009 at 10:10 am
I have noticed that the last character in @Hex (@Group value of 'C' ) is converted to a 0 and I get the end result of:
0x000000000001403130303039392D353020434164 not
0x0000000000014C3130303039392D353020434164
Any ideas on how...
March 19, 2009 at 3:31 am
Viewing 15 posts - 196 through 210 (of 355 total)