User Profile
Collapse
-
thanks a lot Rabbit. -
here is my revised code, but im unable to separate column of sales code and unit price
Code:SELECT [SSI$Sales Price].[Sales Code] ,[SSI$Sales Price].[Item No_] ,[SSI$Sales Price].[Variant Code] ,[SSI$Sales Price].[Unit of Measure Code] ,[SSI$Sales Price].[Unit Price] ,SSI$Item.[Unit Cost] ,[SSI$Sales Price].[Starting Date] ,[SSI$Sales Price].[Ending Date]
Leave a comment:
-
Rabbit,
thanks for the reply.
i want to separate the column of [SSI$Sales Price].[Sales Code] into C00020 and SRP in the same table.
thanks.Leave a comment:
-
here is revised query:
Code:SELECT [SSI$Sales Price].[Sales Code] AS CUSTOMER ,[SSI$Sales Price].[Sales Code] AS SRP ,[SSI$Sales Price].[Item No_] AS [Item No] ,[SSI$Sales Price].[Variant Code] ,[SSI$Sales Price].[Unit of Measure Code] AS [Unit of Measure] ,[SSI$Sales Price].[Unit Price] AS SALES1 ,[SSI$Sales Price].[Unit Price] AS SALES2 ,SSI$Item.[Unit Cost] ,[SSI$Sales
Leave a comment:
-
error message
Msg 1013, Level 16, State 1, Line 3
The objects "SSI$Sales Price" and "SSI$Sales Price" in the FROM clause have the same exposed names. Use correlation names to distinguish them.Leave a comment:
-
here is my query code
Code:USE [SSI-HQ] SELECT [SSI$Sales Price].[Sales Code] ,[SSI$Sales Price].[Item No_] AS [Item No] ,[SSI$Sales Price].[Variant Code] ,[SSI$Sales Price].[Unit of Measure Code] AS [Unit of Measure] ,[SSI$Sales Price].[Unit Price] AS SALES1 ,[SSI$Sales Price].[Unit Price] AS SALES2 ,SSI$Item.[Unit Cost] ,[SSI$Sales Price].[Starting Date] ,[SSI$Sales
Leave a comment:
-
-
Frinavale,
thank you for the reply.
- This is for MS SQL Server.
- Im using SQL Server Management Studio Express to test the sql query, then i will use it in MS Excel to export data from sql server to MS Excel.Leave a comment:
-
Same Column, Same Table - Query
good day.
sample database:
table1
col1 col2 col3
A item1 100
A item2 200
A item3 300
B item1 400
B item2 500
B item3 600
############### ############### ###
query result:
col1 col2 col3 col4 col5
item1 A 100 B 400...
No activity results to display
Show More
Leave a comment: