Question : varchar sort

orderid is a number
select * from trackingnumbers order by orderid desc
this command does not work
is this because orderid is a varchar



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[trackingnumbers](
      [trackingnumberid] [int] IDENTITY(1,1) NOT NULL,
      [date] [datetime] NOT NULL CONSTRAINT [DF_trackingnumbers_date]  DEFAULT (getdate()),
      [orderid] [varchar](50) NOT NULL,
      [trackingnumber] [varchar](50) NULL,
      [shipper] [varchar](10) NULL,
      [cost] [decimal](10, 2) NULL,
      [void] [varchar](20) NULL,
      [name] [varchar](100) NULL,
      [address] [varchar](100) NULL,
 CONSTRAINT [PK__trackingnumbers__2B3F6F97] PRIMARY KEY CLUSTERED
(
      [trackingnumberid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Answer : varchar sort

It looks like all objects are dictionaries where key is a string and value is another dictionary. You can't use numeric indexers to dictionaries. I didn't get keys for segmentos but access should be done with something like below:

Object segmentolElement = ((Dictionary<string, obj>)segmentos)["somekey"];
Object coordinates =  ((Dictionary<string, obj>) segmentolElement )["Coordinates"];
Object longitudes=   ((Dictionary<string, obj>) coordinates )["Longitudes"];

The last would be string of double...
Random Solutions  
 
programming4us programming4us